Selecting boot medium
The boot medium can be selected by DIP switch on the board. DIOT board can boot from QSPI, eMMC or microSD card.
NOTE: In most cases there is no need to change the boot source/medium.
NOTE: On the first bach of the boards, the DIP switches were not working as described on the board. For details see issue #211 (closed).
U-boot Booting
Default boot order
During the startup of u-boot, if a user does not press a key on a console, the u-boot will run the following automatic sequence:
- obtain IP address together with IP of TFTP server and filename of an image
- download the pointed image from network
- try to execute retrieved image as an u-boot script
- try to boot retrieved image
- try to download
image.ub
via network - try to use retrieved image as an u-boot script
- try to boot retrieved image
- try to boot
image.ub
from the first partition on microSD - try to boot
image.ub
from the first partition on eMMC - try to boot from the address
0x02040000
of QSPI - if none of the above was successful, reset the board
Manual selection of boot source
From U-boot's console it is possible to boot from a desired source by executing one of the following scripts:
boot_net_script
boot_net
boot_sd
boot_emmc
boot_qspi
E.g.
run boot_net
Will try to get image.ub
from the TFTP server and try boot it.
Create boot script to be used by network booting
Create text file with valid u-boot commands to be executed. E.g.:
echo "echo hello!" > boot_script.txt
Make a uboot image out of that file:
mkimage -A arm -O linux -C none -T script -n 'boot script' -d boot_script.txt boot_script.img
Updating boot images
BOOT.BIN
from U-boot
Updating To ease the update of u-boot image (BOOT.BIN
) or kernel image (image.ub
) on different mediums there are several scripts available in the u-boot. For u-boot image:
update_boot_qspi_from_net
update_boot_emmc_from_net
update_boot_sd_from_net
update_boot_emmc_from_sd
update_boot_qspi_from_sd
Names are self-explanatory. To run these scipts type:
run <script_name>
E.g. run update_boot_qspi_from_net
updates the BOOT.BIN
in QSPI memory.
BOOT.BIN
in eMMC/microSD from Linux
Updating Copy BOOT.BIN
to the mounted first partition of eMMC/microSD (/run/media/mmcblk0p1
for eMMC; /run/media/mmcblk1p1
for microSD). Then issue sync
. E.g.
cp BOOT.BIN /run/media/mmcblk0p1
sync
BOOT.BIN
in QSPI from Linux
Updating flash_erase /dev/mtd0 0 0
cat BOOT.BIN > /dev/mtd0
image.bin
Updating Similar scripts are available to update image.ub
:
update_image_qspi_from_net
update_image_emmc_from_net
update_image_sd_from_net
update_image_qspi_from_sd
update_image_emmc_from_sd