diff options
Diffstat (limited to 'recipes-test/images/initramfs-tiny-image.bb')
-rw-r--r-- | recipes-test/images/initramfs-tiny-image.bb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/recipes-test/images/initramfs-tiny-image.bb b/recipes-test/images/initramfs-tiny-image.bb index 4fd06a2..e9f185b 100644 --- a/recipes-test/images/initramfs-tiny-image.bb +++ b/recipes-test/images/initramfs-tiny-image.bb @@ -10,13 +10,12 @@ PACKAGE_INSTALL = " \ # Do not pollute the initrd image with rootfs features IMAGE_FEATURES = "debug-tweaks" - -export IMAGE_BASENAME = "initramfs-tiny-image" IMAGE_LINGUAS = "" LICENSE = "MIT" IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" +IMAGE_NAME_SUFFIX ?= "" inherit core-image IMAGE_ROOTFS_SIZE = "8192" @@ -35,3 +34,16 @@ local_autologin () { sed -i -e 's/^\(ExecStart *=.*getty \)/\1--autologin root /' ${LOCAL_GETTY} } ROOTFS_POSTPROCESS_COMMAND += "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'local_autologin;', '', d)}" + +# We'd like to include extra packages provided by layers which we do not depend +# on. This can be handled by .bbappends, but then image recipes including this +# one would not get all these tools. So simulate dynamic bbappend here. +# +# To use it define PACKAGE_INSTALL_foo-layer variable containing the list of +# packages to be installed if (and only if) layer foo-layer is enabled. +python() { + for layer in d.getVar("BBFILE_COLLECTIONS", True).split(): + extra = d.getVar("PACKAGE_INSTALL_%s" % layer) + if extra: + d.appendVar("PACKAGE_INSTALL", " " + extra) +} |