diff options
author | Anton Gerasimov <anton@advancedtelematic.com> | 2016-10-25 11:08:50 +0200 |
---|---|---|
committer | Anton Gerasimov <anton@advancedtelematic.com> | 2016-10-27 11:35:21 +0200 |
commit | d6573cf9e0ca272433876ac517ed9924bd741268 (patch) | |
tree | b6313dd364c4d98b173e65d5be5e20c9dd3c4d41 /recipes-bsp | |
parent | 3dfa44ab995f813172eb239bb2067ba7b0f6103d (diff) | |
download | meta-updater-d6573cf9e0ca272433876ac517ed9924bd741268.tar.gz |
OSTree-enabled image for raspberry Pi
Bug-AGL: SPEC-254
v2 [jsmoeller]: change rpi fdt addr to 200M (fix cma),
re-add inherit gobject-introspection (!)
v3 [oytis]: move boot logic to editable uEnv.txt
Change-Id: Ic54aadc8377ed1e2a8f2f4ab87db2a7a6660cd15
Signed-off-by: Anton Gerasimov <anton@advancedtelematic.com>
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend | 1 | ||||
-rw-r--r-- | recipes-bsp/bootfiles/rpi-config_git.bbappend | 3 | ||||
-rw-r--r-- | recipes-bsp/u-boot-otascript/u-boot-otascript.bb | 26 | ||||
-rw-r--r-- | recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr | 3 | ||||
-rw-r--r-- | recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt | 7 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot_2016.11.bb | 7 |
6 files changed, 47 insertions, 0 deletions
diff --git a/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend b/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend new file mode 100644 index 0000000..74aa6b1 --- /dev/null +++ b/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend | |||
@@ -0,0 +1 @@ | |||
RDEPENDS_${PN} += " u-boot-otascript" | |||
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bbappend b/recipes-bsp/bootfiles/rpi-config_git.bbappend new file mode 100644 index 0000000..6e53993 --- /dev/null +++ b/recipes-bsp/bootfiles/rpi-config_git.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | do_deploy_append() { | ||
2 | echo "device_tree_address=0x0c800000" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
3 | } | ||
diff --git a/recipes-bsp/u-boot-otascript/u-boot-otascript.bb b/recipes-bsp/u-boot-otascript/u-boot-otascript.bb new file mode 100644 index 0000000..9f5f0ca --- /dev/null +++ b/recipes-bsp/u-boot-otascript/u-boot-otascript.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | DESCRIPTION = "Boot script for launching OTA-enabled images on raspberrypi" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | |||
5 | DEPENDS = "u-boot-mkimage-native" | ||
6 | |||
7 | COMPATIBLE_MACHINE = "raspberrypi" | ||
8 | |||
9 | SRC_URI = "file://boot.scr \ | ||
10 | file://uEnv.txt" | ||
11 | |||
12 | S = "${WORKDIR}" | ||
13 | |||
14 | inherit deploy | ||
15 | |||
16 | do_deploy() { | ||
17 | install -d ${DEPLOYDIR}/bcm2835-bootfiles | ||
18 | |||
19 | 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 | ||
20 | install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt | ||
21 | } | ||
22 | |||
23 | addtask deploy before do_package after do_install | ||
24 | do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" | ||
25 | |||
26 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr b/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr new file mode 100644 index 0000000..dc13f85 --- /dev/null +++ b/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr | |||
@@ -0,0 +1,3 @@ | |||
1 | fatload mmc 0:1 $loadaddr /uEnv.txt | ||
2 | env import -t $loadaddr $filesize | ||
3 | run bootcmd | ||
diff --git a/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt b/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt new file mode 100644 index 0000000..f6c0570 --- /dev/null +++ b/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | fdt_addr_r=0x0c800000 | ||
2 | bootcmd_dtb=fdt addr $fdt_addr_r; fdt get value bootargs_fdt /chosen bootargs | ||
3 | bootcmd_otenv=ext2load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize | ||
4 | bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192" | ||
5 | bootcmd_load=ext2load mmc 0:2 $kernel_addr_r "/boot"$kernel_image; ext2load mmc 0:2 $ramdisk_addr_r "/boot"$ramdisk_image | ||
6 | bootcmd_run=bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r | ||
7 | bootcmd=run bootcmd_dtb; run bootcmd_otenv; run bootcmd_args; run bootcmd_load; run bootcmd_run | ||
diff --git a/recipes-bsp/u-boot/u-boot_2016.11.bb b/recipes-bsp/u-boot/u-boot_2016.11.bb new file mode 100644 index 0000000..a05b37f --- /dev/null +++ b/recipes-bsp/u-boot/u-boot_2016.11.bb | |||
@@ -0,0 +1,7 @@ | |||
1 | require recipes-bsp/u-boot/u-boot.inc | ||
2 | |||
3 | DEPENDS += "dtc-native" | ||
4 | |||
5 | SRCREV = "5ea3e51fc481613a8dee8c02848d1b42c81ad892" | ||
6 | |||
7 | PV = "v2016.11+git${SRCPV}" | ||