From 8807f8e2268ee5297fac4f82e24bff8ba03e43c1 Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Tue, 11 Apr 2017 16:49:11 +0200 Subject: Switch to meta-updater Replace SOTA-related sections with includes, moved u-boot-ota common to minnowboard and qemu to meta-agl-bsp Change-Id: I0629a63154ff90bd712f621297b886505a2f462c Signed-off-by: Anton Gerasimov Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9189 Reviewed-by: Jan-Simon Moeller Tested-by: Jan-Simon Moeller --- .../u-boot-otascript/u-boot-otascript.bb | 32 ++++++++++++++++++++++ .../u-boot-otascript/u-boot-otascript/boot.scr | 3 ++ .../u-boot-otascript/u-boot-otascript/uEnv.cma.txt | 7 +++++ .../u-boot-otascript/u-boot-otascript/uEnv.txt | 7 +++++ 4 files changed, 49 insertions(+) create mode 100644 meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb create mode 100644 meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr create mode 100644 meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt create mode 100644 meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt (limited to 'meta-agl-bsp/meta-raspberrypi') diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb new file mode 100644 index 000000000..ccaefc715 --- /dev/null +++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "Boot script for launching OTA-enabled images on raspberrypi" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +DEPENDS = "u-boot-mkimage-native" + +COMPATIBLE_MACHINE = "raspberrypi" + +SRC_URI = "file://boot.scr \ + file://uEnv.txt \ + file://uEnv.cma.txt \ + " + +S = "${WORKDIR}" + +inherit deploy + +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 + 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 +do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr new file mode 100644 index 000000000..dc13f85b2 --- /dev/null +++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr @@ -0,0 +1,3 @@ +fatload mmc 0:1 $loadaddr /uEnv.txt +env import -t $loadaddr $filesize +run bootcmd diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt new file mode 100644 index 000000000..611119f09 --- /dev/null +++ b/meta-agl-bsp/meta-raspberrypi/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 diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt new file mode 100644 index 000000000..f6c05709b --- /dev/null +++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.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" +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 -- cgit 1.2.3-korg