From 4d52c59b60f19078ecf62bb5de4fd1f59d3034ee Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Fri, 5 Feb 2021 11:25:52 +0200 Subject: boot.cmd: Add flag skip_fdt_overlays This flag allows one to skip loading and applying overlay dtbo files, e.g. in case, these files prevent the system from booting. Related-to: ELB-3405 Signed-off-by: Oleksandr Suvorov (cherry picked from commit b65bfad82caf4cd388f4b4316764d49edd826ecd) --- recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'recipes-bsp') 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 index 56998ec..9f3f2e6 100644 --- a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in +++ b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in @@ -24,6 +24,12 @@ # - Static IP-address of TFTP/NFS server: serverip := {legal IPv4 address} # - Static IP-address of the module: ipaddr := {legal IPv4 address} # - Root-path on NFS-server: rootpath := {legal path, exported by an NFS-server} +# +# Common flags: +# - Skip loading overlays: skip_fdt_overlays := {1, 0} +# 1 - skip, any other value (or undefined variable) - don't skip. +# This variable is adopted from the TorizonCore and shouldn't be +# renamed separately. if test ${devtype} = "ubi"; then echo "This script is not meant to distro boot from raw NAND flash." @@ -96,7 +102,11 @@ fi env set bootcmd_args 'run rootfsargs_set && env set bootargs ${defargs} ${rootfsargs} ${setupargs} ${vidargs} ${tdxargs}' env set fdt_resize 'fdt addr ${fdt_addr_r} && fdt resize 0x20000' -env set bootcmd_overlays 'run load_overlays_file && run fdt_resize && run apply_overlays' +if test ${skip_fdt_overlays} != 1; then + env set bootcmd_overlays 'run load_overlays_file && run fdt_resize && run apply_overlays' +else + env set bootcmd_overlays true +fi env set bootcmd_boot 'echo "Bootargs: \${bootargs}" && @@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr_r}' env set bootcmd_prepare 'run set_bootcmd_kernel; run set_bootcmd_dtb; run set_load_overlays_file; run set_apply_overlays' env set bootcmd_run 'run m4boot; run bootcmd_dtb && run bootcmd_overlays && run bootcmd_args && run bootcmd_kernel && run bootcmd_unzip && run bootcmd_boot; echo "Booting from ${devtype} failed!" && false' -- cgit v1.2.3