summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-09-03 20:42:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-06 15:24:25 +0100
commit7fa76bd923fd643cf0984077321d6064d8ec3a2b (patch)
treef62b77d3df11659f3836e0cd9899879e99a551d6
parent7418709450e428010545dc9943802dd64c9582e1 (diff)
downloadopenembedded-core-7fa76bd923fd643cf0984077321d6064d8ec3a2b.tar.gz
openembedded-core-7fa76bd923fd643cf0984077321d6064d8ec3a2b.tar.bz2
openembedded-core-7fa76bd923fd643cf0984077321d6064d8ec3a2b.zip
image-vm.bbclass: support specifying an initramfs
Set INITRD_IMAGE to automatically add a custom initramfs to the boot partition. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image-vm.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index 3df2c362e0..0632667084 100644
--- a/meta/classes/image-vm.bbclass
+++ b/meta/classes/image-vm.bbclass
@@ -3,6 +3,11 @@ SYSLINUX_PROMPT ?= "0"
SYSLINUX_LABELS = "boot"
LABELS_append = " ${SYSLINUX_LABELS} "
+# Using an initramfs is optional. Enable it by setting INITRD_IMAGE.
+INITRD_IMAGE ?= ""
+INITRD ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE}' else ''}"
+do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE}:do_rootfs' if '${INITRD_IMAGE}' else ''}"
+
# need to define the dependency and the ROOTFS for directdisk
do_bootdirectdisk[depends] += "${PN}:do_rootfs"
ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext4"