diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2019-07-09 14:19:20 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2019-07-29 17:24:30 +0200 |
commit | c4cf9254547ce4fc1d49c0802c152262a26de2ab (patch) | |
tree | 2a3a3bb95e71b1a6e41ff3fb48cad5f287916237 /recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in | |
parent | 3a1e47883914b8f6ea8e58c2cf1a4f25b24dca1e (diff) |
u-boot-distro-boot: add inital distro boot script
This creates a distro boot script boot.scr and deploys it into
the ${DEPLOYDIR}.
Moved here from meta-toradex-torizon u-boot-distro-boot-ostree.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in new file mode 100644 index 0000000..606ffc2 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in @@ -0,0 +1,28 @@ +if test ${devtype} = "ubi" +then + echo "This script is not meant to distro boot from raw NAND flash. + exit +fi + +if test ${distro_bootpart} != 1 +then + echo "Boot partition needs to be the first partition" + exit +fi + +if test -n ${setup} +then + run setup +else + env set setupargs 'console=tty1 consoleblank=0' +fi +test -n ${m4boot} || env set m4boot ';' +test -n ${fdtfile} || env set fdtfile $fdt_file +test -n ${kernel_image} || env set kernel_image ${boot_file} + +env set bootcmd_args 'env set bootargs ${bootargs} ${defargs} ${emmcargs} ${setupargs} ${vidargs} ${tdxargs}' +env set bootcmd_kernel 'load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${kernel_image}' +env set bootcmd_dtb 'load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile}' +env set bootcmd_run '@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr_r}' +env set bootcmd 'run m4boot; run bootcmd_dtb && run bootcmd_args && run bootcmd_kernel && run bootcmd_run' +run bootcmd |