Page History
...
In absence of a valid extlinux.conf file, U-Boot will scan the boot_targets list looking for a file named boot.scr.uimg or boot.scr (in that order) and run any commands located in the script file. If your environment requires a different sequence of commands or behaviour, you can edit the boot.scr file to suit your needs.
Install u-boot-tools on Linux OS
Before using the mkimage function, the u-boot-tools needs to be installed.
Code Block | ||||
---|---|---|---|---|
| ||||
sudo apt-get update
sudo apt install u-boot-tools
|
Modifying an existing boot.scr file
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# This is a boot script for U-Boot # Generate boot.scr: # mkimage -c none -A arm -T script -d boot.script boot.scr # ################ imageub_addr=0x10000000 # imageub_flash_addr=0x200000 imageub_flash_size=0xD90000 echo [TE_BOOT-01] Trenz Boot-file version 0.1 (development); echo [TE_BOOT-10] Chosen Bootmode is ${modeboot} from boot_targets=${boot_targets}; echo [TE_BOOT-11] Found boot.scr in device: ${target} for boot_target in ${boot_targets}; do # Boot target is sd card: BOOT.bin, boot.scr and image.ub on sd cardmmc0 if test "${boot_target}" = "mmc0" || test "; then echo [TE_BOOT-20] Try to use: image.ub from ${boot_target}" = "mmc1"; then; mmc dev 0 if test -e ${devtype} ${devnum}0:${distro_bootpart} /image.ub; then fatload echo Boot target source files are on MMC: boot.scr and image.ub are on sd card;${devtype} 0:${distro_bootpart} ${imageub_addr} image.ub; bootm ${imageub_addr}; fi fi if test "${boot_target}" = "mmc1"; then echo [TE_BOOT-21] Try to use: image.ub from ${boot_target}; mmc dev 1 if test -e ${devtype} 1:${distro_bootpart} /image.ub; then fatload ${devtype} ${devnum}1:${distro_bootpart} ${imageub_addr} image.ub; bootm ${imageub_addr}; exit; fi fi # Boot target is qspi: BOOT.bin, boot.scr and image.ub on qspi; image.ub and boot.src file areis included in BOOT.bin if test "${boot_target}" = "qspi"; then echo Boot target source files are on qspi flash: boot.scr and [TE_BOOT-30] Try to use: image.ub are on qspi flashfrom ${boot_target}; sf probe 0 0 0; if test "image.ub" = "image.ub"; then sf read ${imageub_addr} ${imageub_flash_addr} ${imageub_flash_size}; bootm ${imageub_addr}; exit; fi exit; fi done done |
Note: The alias name ${devnum} used so far does not work in all variants tested as described in the following chapter "Tested boot combinations with example boot script file for TE0715", therefore the mmc boot_targets were split up
Please And remember that the boot.script file needs to be converted back into the boot.scr file after the edits are complete
...
Set Boot Mode is SD-Boot:
SD-Card | QSPI-Flash | Comments | |
---|---|---|---|
Variant 1 | BOOT.bin^1 image.ub boot.scr | '-- | recommended workflow |
Variant 2 | BOOT.bin^1 image.ub | BOOT.bin^2 | used boot.scr from QSPI-Flash and image.ub |
from SD card | |||
Variant 3 | BOOT.bin^1 boot.scr | BOOT.bin^2 | used boot.scr from SD card and image.ub from QSPI-Flash |
Variant 4 | BOOT.bin^1 image.ub | BOOT. |
bin^3 | used boot.scr from QSPI-Flash and image.ub from SD card |
Set Boot Mode is QSPI-Boot:
SD-Card | QSPI-Flash | Comments | |
---|---|---|---|
Variant 1 | '-- | BOOT.bin^2 zynq_fsbl_flash | Boot only from QSPI flash |
Variant 2 | image.ub boot.scr | BOOT.bin^1 zynq_fsbl_flash | used boot.scr and image.ub from SD card |
Variant 3 | BOOT.bin^1 image.ub | BOOT.bin^3 zynq_fsbl_flash | used boot.scr from QSPI-Flash and image.ub from SD card |
BOOT.bin^1 (for SD Card or qspi flash):
...
- fsbl.elf
- test_board.bit
- u-boot.elf
- image.ub
- boot.scr
BOOT.bin^3 (for qspi flash):
- fsbl.elf
- test_board.bit
- u-boot.elf
- image.ub
BOOT.bin^4 (for qspi flash):
- fsbl.elf
- test_board.bit
- u-boot.elf
- boot.scr
...