fatload mmc 和 bootm 在 uboot 中是什么意思?

3 embedded-linux u-boot

我无法理解这些命令,例如

fatload mmc 0 0x3000000 uImage
fatload mmc 0 0x2A00000 devicetree.dtb
bootm 0x3000000 - 0x2A00000
Run Code Online (Sandbox Code Playgroud)

#fatload mmc 0 0x3000000 uImage. 它在做什么?是否将uImage作为胖分区加载并加载到RAM地址0x3000000?

bootm 0x3000000 - 0x2A00000- ? 这是否意味着从 RAM 地址 0x3000000 启动到 0x2A00000?

Sye*_*ris 5

U-Boot runs code placed in (processor's) RAM, although it can also read data from other media. The boot process normally takes place in two steps:

  1. 从媒体(以太网、闪存、USB、MMC)读取操作系统映像到 RAM 中
  2. 跳转到 RAM 中图像的第一条指令

uImage 是(很可能是 Linux)内核。

xxx.dtb 是编译形式的设备树。它包含硬件信息,因此可以将这些信息与内核分开保存。

现在,要从 FAT 格式的 MMC 卡中读取图像,命令是:

fatload mmc <dev>[:partition] <loadAddress> <bootfilename>

所以这 2 个fatload命令将 2 个文件从 MMC 卡加载到处理器的内存/RAM 中。

现在,关于bootm:此命令启动运行的内核映像。语法是:

bootm <address of kernel> <address of ramdisk> <address of dtb>

如果内核配置得不需要它/它们,ramdisk和/或的地址dtb可以省略。

在您的情况下,您没有使用中间ramdisk的破折号-