summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/recipes-bsp/initramdisk
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2022-12-01 17:06:46 -0800
committerMark Hatle <mark.hatle@amd.com>2023-04-07 17:50:36 -0700
commitdd9498d832c606fb8ab26c3f2b8e129ed62ba425 (patch)
treec3665ca7e7826d8f046b798bfaaf6b6dad227008 /meta-xilinx-core/recipes-bsp/initramdisk
parenta21bb9a63f89ce486fe64e457b9a88b29db9d764 (diff)
downloadmeta-xilinx-dd9498d832c606fb8ab26c3f2b8e129ed62ba425.tar.gz
initramdisk-xilinx: Add a recipe to package the INITRAMFS_IMAGE
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core/recipes-bsp/initramdisk')
-rw-r--r--meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb b/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb
new file mode 100644
index 00000000..af786e7e
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb
@@ -0,0 +1,37 @@
1INITRAMFS_IMAGE ??= ""
2
3# Adjust our name to be explicit to what we're going to produce
4PN = "initramdisk-${INITRAMFS_IMAGE}"
5
6DESCRIPTION = "Provide the initramdisk available via a package, installed in /boot"
7
8DEPENDS = "${INITRAMFS_IMAGE}"
9
10LICENSE = "MIT"
11
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14do_configure[noexec] = "1"
15do_compile[noexec] = "1"
16
17do_install[vardepsexclude] += "DEPLOY_DIR_IMAGE"
18do_install[depends] += "${INITRAMFS_IMAGE}:do_image_complete"
19do_install[cleandirs] = "${D}"
20do_install() {
21 if [ -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot ]; then
22 install -d ${D}/boot/
23 install -m 0644 ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot ${D}/boot/.
24 else
25 bbfatal "Unable to find expected initramfs: ${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot"
26 fi
27}
28
29PACKAGES = "${PACKAGE_BEFORE_PN} ${PN}"
30
31RPROVIDES:${PN} = "initramdisk"
32FILES:${PN} = "/boot/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot"
33
34python() {
35 if not d.getVar('INITRAMFS_IMAGE'):
36 bb.parse.SkipRecipe("No init ramdisk enabled. This package requires INITRAMFS_IMAGE to be defined.")
37}