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 boot image
- try to use retrieved images as u-boot script
- try to use retrieved images as u-boot image with kernel etc.
- 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
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_mmc_from_net
update_boot_sd_from_net
update_boot_mmc_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.
image.bin
Updating Similar scripts are available to update image.ub
:
update_image_qspi_from_net
update_image_mmc_from_net
update_image_sd_from_net
update_image_qspi_from_sd
update_image_mmc_from_sd