summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
blob: 2437d9a84e4ee1b6c9c51e5229f44e581731874c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI_append =" \
    ${@bb.utils.contains('AGL_XEN_WANTED','1',' file://boot_xen.cmd','',d)} \
"

do_compile_append() {

 # if xen feature is activated we overwirte the boot script with xen specific one
   if [ "${AGL_XEN_WANTED}" = "1" ]; then
        sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
      	    -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
    	    -e 's/@@MACHINE@@/${MACHINE}/' \
              "${WORKDIR}/boot_xen.cmd" > "${WORKDIR}/boot.cmd"

     	mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
   fi
}