aboutsummaryrefslogtreecommitdiffstats
path: root/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb')
-rw-r--r--dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb34
1 files changed, 34 insertions, 0 deletions
diff --git a/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb
new file mode 100644
index 00000000..87619d01
--- /dev/null
+++ b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb
@@ -0,0 +1,34 @@
+SUMMARY = "U-boot boot script for Xen on Raspberry Pi 4"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+COMPATIBLE_MACHINE = "^raspberrypi4-64$"
+
+DEPENDS = "u-boot-mkimage-native"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "file://boot.cmd.xen.in"
+
+RPI_DOM0_MEM ??= "256M"
+RPI_DEBUG_XEN_ARGS ??= "sync_console bootscrub=0"
+
+do_compile() {
+ sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
+ -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
+ -e 's/@@RPI_DOM0_MEM@@/${RPI_DOM0_MEM}/' \
+ -e 's/@@RPI_DEBUG_XEN_ARGS@@/${RPI_DEBUG_XEN_ARGS}/' \
+ "${WORKDIR}/boot.cmd.xen.in" > "${WORKDIR}/boot.cmd"
+
+ mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
+}
+
+inherit kernel-arch deploy nopackages
+
+do_deploy() {
+ install -d ${DEPLOYDIR}
+ install -m 0644 boot.scr ${DEPLOYDIR}
+}
+
+addtask do_deploy after do_compile before do_build
+
+PROVIDES += "u-boot-default-script"