diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2019-07-09 14:19:20 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2019-07-29 17:24:30 +0200 |
commit | c4cf9254547ce4fc1d49c0802c152262a26de2ab (patch) | |
tree | 2a3a3bb95e71b1a6e41ff3fb48cad5f287916237 /recipes-bsp/u-boot/u-boot-distro-boot.bb | |
parent | 3a1e47883914b8f6ea8e58c2cf1a4f25b24dca1e (diff) |
u-boot-distro-boot: add inital distro boot script
This creates a distro boot script boot.scr and deploys it into
the ${DEPLOYDIR}.
Moved here from meta-toradex-torizon u-boot-distro-boot-ostree.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-distro-boot.bb')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-distro-boot.bb | 35 |
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}" |