[3rdparty,3/6] u-boot-digi: Generalize boot script

Submitted by Gonzalez, Alex on Feb. 21, 2019, 3:24 p.m. | Patch ID: 158984

Details

Message ID 1550762666-17995-4-git-send-email-alex.gonzalez@digi.com
State New
Headers show

Commit Message

Gonzalez, Alex Feb. 21, 2019, 3:24 p.m.
Generalize the boot script used to boot Linux so that it can be shared
by multiple ConnectCore 6UL SOM based boards.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
---
 recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt | 4 ++--
 recipes-bsp/u-boot/u-boot-digi_2017.03.bb              | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt b/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt
index 06b42bedcf9a..8f2614d9ed7c 100644
--- a/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt
+++ b/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt
@@ -2,6 +2,6 @@ 
 # U-Boot bootscript for NAND images created by Yocto.
 #
 
-setenv fdt_file imx6ul-ccimx6ulsbcexpress.dtb
-setenv zimage zImage-ccimx6ulsbcexpress.bin
+setenv fdt_file imx6ul-${platform}.dtb
+setenv zimage zImage-${platform}.bin
 dboot linux nand ${mtdbootpart}
diff --git a/recipes-bsp/u-boot/u-boot-digi_2017.03.bb b/recipes-bsp/u-boot/u-boot-digi_2017.03.bb
index aa7757276fdd..e5f9b9fdb4b6 100644
--- a/recipes-bsp/u-boot/u-boot-digi_2017.03.bb
+++ b/recipes-bsp/u-boot/u-boot-digi_2017.03.bb
@@ -30,6 +30,7 @@  UBOOT_ENV = "boot"
 UBOOT_ENV_SUFFIX = "scr"
 
 do_compile_append () {
+    sed -i -e 's/\${platform}/${MACHINE}/g' ${WORKDIR}/bootscript.txt
     uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
         -n "boot script" -d ${WORKDIR}/bootscript.txt \
         ${WORKDIR}/${UBOOT_ENV_BINARY}