Switch to meta-updater
[AGL/meta-agl.git] / meta-agl-bsp / meta-raspberrypi / recipes-bsp / u-boot-otascript / u-boot-otascript.bb
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            file://uEnv.cma.txt \
12           "
13
14 S = "${WORKDIR}"
15
16 inherit deploy
17
18 do_deploy() {
19     install -d ${DEPLOYDIR}/bcm2835-bootfiles
20
21     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
22     if [ "${ENABLE_CMA}" = "1" ]; then
23         install -m 0755 ${S}/uEnv.cma.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt
24     else
25         install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt
26     fi
27 }
28
29 addtask deploy before do_package after do_install
30 do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles"
31
32 PACKAGE_ARCH = "${MACHINE_ARCH}"