summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}