summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2020-11-05 13:07:31 +0200
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2020-11-05 13:07:31 +0200
commit9beaf3b689905ca062becbf415c8ae1b2ce3b131 (patch)
tree1de5197c23dc094b4c4d36065c261cd78af19b2f
parent0470394a5e435ab68c0a242783f937bb9402ba8b (diff)
boot.cmd: fix booting from different media
The design of the script allows to use different sources for booting a kernel, dtb and overlays, and using as a rootfs. Using devtype to determine the media of rootfs breaks this ability. Use root_devtype setting to fix this issue. Note the script is still able to use the same devtype for both boot/rootfs media because both boot_devtype and root_devtype set from devtype by default. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in2
1 files changed, 1 insertions, 1 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
index 84268a1..21d298c 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
@@ -70,7 +70,7 @@ env set set_load_overlays_file 'env set load_overlays_file "${load_cmd} \\${load
env set set_apply_overlays 'env set apply_overlays "for overlay_file in \\${fdt_overlays}; do echo Applying Overlay: \\${overlay_file} && ${load_cmd} \\${loadaddr} \\${overlay_file} && fdt apply \\${loadaddr}; env set overlay_file; done; true"'
# Set static commands
-if test ${devtype} = "dhcp"; then
+if test ${root_devtype} = "dhcp"; then
env set rootfsargs_set 'env set rootfsargs "root=/dev/nfs ip=dhcp nfsroot=${rootpath}"'
else
env set uuid_set 'part uuid ${root_devtype} ${root_devnum}:${root_part} uuid'