summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot/u-boot-distro-boot.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-distro-boot.bb')
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot.bb35
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot.bb b/recipes-bsp/u-boot/u-boot-distro-boot.bb
new file mode 100644
index 0000000..474ec66
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-distro-boot.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "Boot script for launching images with U-Boot distro boot"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "u-boot-mkimage-native"
+
+SRC_URI = " \
+ file://boot.cmd.in \
+"
+
+KERNEL_BOOTCMD ??= "bootz"
+KERNEL_BOOTCMD_aarch64 ?= "booti"
+
+S = "${WORKDIR}"
+
+inherit deploy
+
+do_compile() {
+ sed -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
+ "${WORKDIR}/boot.cmd.in" > boot.cmd
+ mkimage -T script -C none -n "Distro boot script" -d "${WORKDIR}/boot.cmd" boot.scr
+}
+
+do_deploy() {
+ install -d ${DEPLOYDIR}
+ install -m 0644 boot.scr ${DEPLOYDIR}
+}
+
+addtask deploy after do_install before do_build
+
+do_install[noexec] = "1"
+do_populate_sysroot[noexec] = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"