summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
blob: 1e9f47d239fe57c412cf80ab75142608af45699a (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
}