From: Patrick Ohly Date: Thu, 3 Sep 2015 18:42:31 +0000 (+0200) Subject: image-vm.bbclass: support specifying an initramfs X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~29058 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fa76bd923fd643cf0984077321d6064d8ec3a2b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Richard Purdie --- diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass index 3df2c362e03..0632667084f 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"