Menu Close

U-Boot System boot commands

This article talks about the U-Boot system boot commands which allow for various methods to boot the development board, such as remote booting, that are used most commonly.

For related subjects, please refer to the SOC Table of Contents.


In order to boot Linux, we will first need to copy the image file into DRAM, as with using device trees. We can do this by using nfs or tftp to copy it over from the SD card.


Using bootm

bootm is used to boot core images stored in memory that has been processed by mkimage. Because our image.ub file is U-Boot fitImage, it contains the Linux core and device trees. Thus, we can directly write the image file to DRAM and use bootm to boot. The command to boot the Linux core is as follows:

bootm addr

Where addr is the starting address of image.ub in DRAM. We will now use tftp to boot Linux, and make sure image.ub can be found in the /tftpboot directory. We will then download image.ub to 0x10000000 in DRAM, and boot using bootm.

tftpboot 10000000 image.ub
bootm 10000000

Note that you may also choose to directly use the command run netboot, as it is a shortcut for the two commands. The system should boot right up.


Using bootz

bootz is similar to bootm, the difference being bootz is used to boot zImage image files. The formatting is as follows:


Where add is the location of zImage in DRAM, initrd is the location of initrd in DRAM (if you don’t use initrd you may replace it with “-”), and fdt is the location of the device tree in DRAM. Both the zImage file and system.dtb file can be found in the /tftpboot directory.

We will use tftpboot to download the zImage file to 0x00000000 in DRAM and download the device tree file system.dtb to 0x05000000. Finally, we will use bootz to boot the system.

tftpboot 00000000 zImage
tftpboot 05000000 system.dtb
bootz 00000000 – 05000000


Using boot

The boot command is used to simply boot the Linux system. It will read the environment variable bootcmd to boot Linux. If we want to use tftpboot to boot Linux from the network, we can set bootcmd to “tftpboot 10000000 image.ub;bootm”, and then use the bootcommand to boot Linux from the network.

setenv bootcmd ‘tftpboot 10000000 image.ub;bootm’

Posted in Textbook and Training Project

Related Articles

Leave a Reply

Your email address will not be published.

Leave the field below empty!