summaryrefslogtreecommitdiffstats
path: root/meta-sota
diff options
context:
space:
mode:
Diffstat (limited to 'meta-sota')
-rw-r--r--meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript.bb9
-rw-r--r--meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt7
2 files changed, 14 insertions, 2 deletions
diff --git a/meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript.bb b/meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript.bb
index 9f5f0ca..82d0410 100644
--- a/meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript.bb
+++ b/meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript.bb
@@ -7,7 +7,8 @@ DEPENDS = "u-boot-mkimage-native"
COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI = "file://boot.scr \
- file://uEnv.txt"
+ file://uEnv.txt \
+ file://uEnv.cma.txt"
S = "${WORKDIR}"
@@ -17,7 +18,11 @@ do_deploy() {
install -d ${DEPLOYDIR}/bcm2835-bootfiles
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Ostree boot script" -d ${S}/boot.scr ${DEPLOYDIR}/bcm2835-bootfiles/boot.scr
- install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt
+ if [ "${ENABLE_CMA}" = "1" ]; then
+ install -m 0755 ${S}/uEnv.cma.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt
+ else
+ install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt
+ fi
}
addtask deploy before do_package after do_install
diff --git a/meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt b/meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt
new file mode 100644
index 0000000..611119f
--- /dev/null
+++ b/meta-sota/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt
@@ -0,0 +1,7 @@
+fdt_addr_r=0x0c800000
+bootcmd_dtb=fdt addr $fdt_addr_r; fdt get value bootargs_fdt /chosen bootargs
+bootcmd_otenv=ext2load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize
+bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 coherent_pool=6M smsc95xx.turbo_mode=N"
+bootcmd_load=ext2load mmc 0:2 $kernel_addr_r "/boot"$kernel_image; ext2load mmc 0:2 $ramdisk_addr_r "/boot"$ramdisk_image
+bootcmd_run=bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r
+bootcmd=run bootcmd_dtb; run bootcmd_otenv; run bootcmd_args; run bootcmd_load; run bootcmd_run