From 6f7bf76d94519cc390737468e6508c1704f27311 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Thu, 20 Jul 2017 10:30:41 +0800 Subject: meta-secure-core: define new image type secure-core-minimal-image Signed-off-by: Lans Zhang --- meta/recipes-core/images/secure-core-image.bb | 32 ++-------------------- meta/recipes-core/images/secure-core-image.inc | 32 ++++++++++++++++++++++ .../images/secure-core-minimal-image.bb | 1 + 3 files changed, 35 insertions(+), 30 deletions(-) create mode 100644 meta/recipes-core/images/secure-core-image.inc create mode 100644 meta/recipes-core/images/secure-core-minimal-image.bb diff --git a/meta/recipes-core/images/secure-core-image.bb b/meta/recipes-core/images/secure-core-image.bb index 35ea93b..0a8adc8 100644 --- a/meta/recipes-core/images/secure-core-image.bb +++ b/meta/recipes-core/images/secure-core-image.bb @@ -1,33 +1,5 @@ -SUMMARY = "The root image of SecureCore." -LICENSE = "MIT" +require secure-core-image.inc -SECURE_CORE_IMAGE_EXTRA_INSTALL_append += "\ - ${@bb.utils.contains("DISTRO_FEATURES", "efi-secure-boot", \ - "packagegroup-efi-secure-boot", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "tpm", \ - "packagegroup-tpm", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "tpm2", \ - "packagegroup-tpm2", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "ima", \ - "packagegroup-ima", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "encrypted-storage", \ - "packagegroup-encrypted-storage", "", d)} \ -" - -IMAGE_INSTALL = "\ - packagegroup-core-boot \ +IMAGE_INSTALL += "\ packagegroup-core-lsb \ - kernel-initramfs \ - ${SECURE_CORE_IMAGE_EXTRA_INSTALL} \ -" - -IMAGE_LINGUAS = " " - -INITRAMFS_IMAGE = "secure-core-image-initramfs" - -inherit core-image - -IMAGE_ROOTFS_SIZE ?= "8192" -IMAGE_ROOTFS_EXTRA_SPACE_append = "\ - ${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "" ,d)} \ " diff --git a/meta/recipes-core/images/secure-core-image.inc b/meta/recipes-core/images/secure-core-image.inc new file mode 100644 index 0000000..e08b84a --- /dev/null +++ b/meta/recipes-core/images/secure-core-image.inc @@ -0,0 +1,32 @@ +SUMMARY = "The root image of SecureCore." +LICENSE = "MIT" + +SECURE_CORE_IMAGE_EXTRA_INSTALL_append += "\ + ${@bb.utils.contains("DISTRO_FEATURES", "efi-secure-boot", \ + "packagegroup-efi-secure-boot", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "tpm", \ + "packagegroup-tpm", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "tpm2", \ + "packagegroup-tpm2", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "ima", \ + "packagegroup-ima", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "encrypted-storage", \ + "packagegroup-encrypted-storage", "", d)} \ +" + +IMAGE_INSTALL = "\ + packagegroup-core-boot \ + kernel-initramfs \ + ${SECURE_CORE_IMAGE_EXTRA_INSTALL} \ +" + +IMAGE_LINGUAS = " " + +INITRAMFS_IMAGE = "secure-core-image-initramfs" + +inherit core-image + +IMAGE_ROOTFS_SIZE ?= "8192" +IMAGE_ROOTFS_EXTRA_SPACE_append = "\ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "" ,d)} \ +" diff --git a/meta/recipes-core/images/secure-core-minimal-image.bb b/meta/recipes-core/images/secure-core-minimal-image.bb new file mode 100644 index 0000000..63ddf34 --- /dev/null +++ b/meta/recipes-core/images/secure-core-minimal-image.bb @@ -0,0 +1 @@ +require secure-core-image.inc -- cgit v1.2.3-54-g00ecf