aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/rpi-u-boot-scr
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/rpi-u-boot-scr')
-rw-r--r--recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in4
-rw-r--r--recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb5
2 files changed, 6 insertions, 3 deletions
diff --git a/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in b/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
index 627d181..58fd86a 100644
--- a/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
+++ b/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
@@ -1,4 +1,4 @@
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
-fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
-if test ! -e mmc 0:1 uboot.env; then saveenv; fi;
+fatload @@BOOT_MEDIA@@ 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
+if test ! -e @@BOOT_MEDIA@@ 0:1 uboot.env; then saveenv; fi;
@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
diff --git a/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
index 9108f71..bbd8736 100644
--- a/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
+++ b/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
@@ -9,10 +9,13 @@ INHIBIT_DEFAULT_DEPS = "1"
SRC_URI = "file://boot.cmd.in"
+BOOT_MEDIA ?= "mmc"
+
do_compile() {
sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
-e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
- "${WORKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd"
+ -e 's/@@BOOT_MEDIA@@/${BOOT_MEDIA}/' \
+ "${UNPACKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd"
mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
}