Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 1 | SUMMARY = "U-boot boot scripts for Raspberry Pi" |
| 2 | LICENSE = "MIT" |
Brad Bishop | f27bdd5 | 2018-05-07 15:42:31 +0200 | [diff] [blame] | 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 4 | COMPATIBLE_MACHINE = "^rpi$" |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 5 | |
| 6 | DEPENDS = "u-boot-mkimage-native" |
| 7 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | INHIBIT_DEFAULT_DEPS = "1" |
| 9 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | SRC_URI = "file://boot.cmd.in" |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 11 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 12 | BOOT_MEDIA ?= "mmc" |
| 13 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 14 | do_compile() { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \ |
| 16 | -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \ |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 17 | -e 's/@@BOOT_MEDIA@@/${BOOT_MEDIA}/' \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 18 | "${WORKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd" |
Andrew Geissler | 26e4bea | 2020-11-30 19:54:03 -0600 | [diff] [blame] | 19 | mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 20 | } |
| 21 | |
Andrew Geissler | 26e4bea | 2020-11-30 19:54:03 -0600 | [diff] [blame] | 22 | inherit kernel-arch deploy nopackages |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 23 | |
| 24 | do_deploy() { |
| 25 | install -d ${DEPLOYDIR} |
| 26 | install -m 0644 boot.scr ${DEPLOYDIR} |
| 27 | } |
| 28 | |
| 29 | addtask do_deploy after do_compile before do_build |
Andrew Geissler | 062316f | 2020-05-15 14:19:14 -0500 | [diff] [blame] | 30 | |
| 31 | PROVIDES += "u-boot-default-script" |