meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb
Leon Anavi 434ed33c90
Some checks failed
Mirrors / Yocto Git Mirror (push) Has been cancelled
rpi-u-boot-scr: WORKDIR -> UNPACKDIR transition
This adapts to the oe-core rework to enforce a separate directory
for unpacking local sources (UNPACKDIR) instead of directly using
WORKDIR.

Follows the preliminary guideline from:
https://lists.openembedded.org/g/openembedded-architecture/message/2007

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2024-07-18 11:51:41 +01:00

35 lines
897 B
BlitzBasic

SUMMARY = "U-boot boot scripts for Raspberry Pi"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
COMPATIBLE_MACHINE = "^rpi$"
DEPENDS = "u-boot-mkimage-native"
INHIBIT_DEFAULT_DEPS = "1"
SRC_URI = "file://boot.cmd.in"
BOOT_MEDIA ?= "mmc"
do_compile() {
sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
-e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
-e 's/@@BOOT_MEDIA@@/${BOOT_MEDIA}/' \
"${UNPACKDIR}/boot.cmd.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
S = "${WORKDIR}/sources"
UNPACKDIR = "${S}"
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"