[oe-commits] Patrick Ohly : image-vm.bbclass: support specifying an initramfs
git at git.openembedded.org
git at git.openembedded.org
Sun Sep 6 14:27:16 UTC 2015
Module: openembedded-core.git
Branch: master
Commit: 7fa76bd923fd643cf0984077321d6064d8ec3a2b
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=7fa76bd923fd643cf0984077321d6064d8ec3a2b
Author: Patrick Ohly <patrick.ohly at intel.com>
Date: Thu Sep 3 20:42:31 2015 +0200
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 at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/image-vm.bbclass | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index 3df2c36..0632667 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"
More information about the Openembedded-commits
mailing list