blob: 1dff808b408c38444d27d659911f08609a2435b8 [file] [log] [blame]
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -06001SUMMARY = "U-boot boot scripts for Raspberry Pi"
2LICENSE = "MIT"
Brad Bishopf27bdd52018-05-07 15:42:31 +02003LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05004COMPATIBLE_MACHINE = "^rpi$"
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -06005
6DEPENDS = "u-boot-mkimage-native"
7
Brad Bishop316dfdd2018-06-25 12:45:53 -04008INHIBIT_DEFAULT_DEPS = "1"
9
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010SRC_URI = "file://boot.cmd.in"
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060011
Patrick Williams169d7bc2024-01-05 11:33:25 -060012BOOT_MEDIA ?= "mmc"
13
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060014do_compile() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050015 sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
16 -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
Patrick Williams169d7bc2024-01-05 11:33:25 -060017 -e 's/@@BOOT_MEDIA@@/${BOOT_MEDIA}/' \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018 "${WORKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd"
Andrew Geissler26e4bea2020-11-30 19:54:03 -060019 mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060020}
21
Andrew Geissler26e4bea2020-11-30 19:54:03 -060022inherit kernel-arch deploy nopackages
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060023
24do_deploy() {
25 install -d ${DEPLOYDIR}
26 install -m 0644 boot.scr ${DEPLOYDIR}
27}
28
29addtask do_deploy after do_compile before do_build
Andrew Geissler062316f2020-05-15 14:19:14 -050030
31PROVIDES += "u-boot-default-script"