From 036274b3fb9bef70dff1defe9bf620cbf61df77f Mon Sep 17 00:00:00 2001 From: Drew Reed Date: Wed, 14 Feb 2024 14:03:02 +0000 Subject: [PATCH] bsp,ci: Switch to poky distro We can now use the standard poky distro configured to be small by switching distrobution and using the standard minimal image from poky. To do this we also remove and image configuration options from the machine config and apply them in the kas files. Signed-off-by: Drew Reed --- ci/corstone1000-common.yml | 31 +++++++++++++++++-- .../conf/machine/include/corstone1000.inc | 18 ++--------- .../images/corstone1000-initramfs-image.bb | 25 --------------- 3 files changed, 31 insertions(+), 43 deletions(-) delete mode 100644 meta-arm-bsp/recipes-bsp/images/corstone1000-initramfs-image.bb diff --git a/ci/corstone1000-common.yml b/ci/corstone1000-common.yml index 09472285..42cf4c95 100644 --- a/ci/corstone1000-common.yml +++ b/ci/corstone1000-common.yml @@ -3,13 +3,40 @@ header: includes: - ci/base.yml - ci/meta-openembedded.yml - - ci/poky-tiny.yml - ci/meta-secure-core.yml local_conf_header: - extrapackages: | + extrapackages: | # Intentionally blank to prevent perf from being added to the image in base.yml + distrosetup: | + DISTRO_FEATURES = "usbhost ipv4" + + initramfsetup: | + # Telling the build system which image is responsible of the generation of the initramfs rootfs + INITRAMFS_IMAGE_BUNDLE = "1" + INITRAMFS_IMAGE ?= "core-image-minimal" + IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" + IMAGE_NAME_SUFFIX = "" + + # enable mdev/busybox for init + INIT_MANAGER = "mdev-busybox" + VIRTUAL-RUNTIME_init_manager = "busybox" + + # prevent the kernel image from being included in the intramfs rootfs + PACKAGE_EXCLUDE += "kernel-image-*" + # Don't include kernel binary in rootfs /boot path + RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = "" + + # Disable openssl in kmod to shrink the initramfs size + PACKAGECONFIG:remove:pn-kmod = "openssl" + + # all optee packages + IMAGE_INSTALL += "optee-client" + + # TS PSA API tests commands for crypto, its, ps and iat + IMAGE_INSTALL += "packagegroup-ts-tests-psa" + target: - corstone1000-image - perf diff --git a/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm-bsp/conf/machine/include/corstone1000.inc index 64e166af..4d33b575 100644 --- a/meta-arm-bsp/conf/machine/include/corstone1000.inc +++ b/meta-arm-bsp/conf/machine/include/corstone1000.inc @@ -33,17 +33,13 @@ GRUB_LINUX_APPEND ?= "${LINUX_KERNEL_ARGS}" IMAGE_CMD:wic[vardeps] += "GRUB_LINUX_APPEND" # Linux kernel -PREFERRED_PROVIDER_virtual/kernel:forcevariable = "linux-yocto" -PREFERRED_VERSION_linux-yocto = "6.6.%" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +PREFERRED_VERSION_linux-yocto ?= "6.6.%" KERNEL_IMAGETYPE = "Image.gz" # add FF-A support in the kernel MACHINE_FEATURES += "arm-ffa" # enable this feature for kernel debugging # MACHINE_FEATURES += "corstone1000_kernel_debug" -# Telling the build system which image is responsible of the generation of the initramfs rootfs -INITRAMFS_IMAGE_BUNDLE = "1" -INITRAMFS_IMAGE ?= "corstone1000-initramfs-image" -IMAGE_NAME_SUFFIX = "" # login terminal serial port settings SERIAL_CONSOLES ?= "115200;ttyAMA0" @@ -52,13 +48,3 @@ WKS_FILE ?= "corstone1000-image.corstone1000.wks" # making sure EXTRA_IMAGEDEPENDS will be used while creating the image WKS_FILE_DEPENDS:append = " ${EXTRA_IMAGEDEPENDS}" - -# prevent the kernel image from being included in the intramfs rootfs -PACKAGE_EXCLUDE += "kernel-image-*" -# Don't include kernel binary in rootfs /boot path -RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = "" - -# Disable python usage in opkg-utils since it won't build with tiny config -PACKAGECONFIG:remove:pn-opkg-utils = "python" -# Disable openssl in kmod to shink the initramfs size -PACKAGECONFIG:remove:pn-kmod = "openssl" diff --git a/meta-arm-bsp/recipes-bsp/images/corstone1000-initramfs-image.bb b/meta-arm-bsp/recipes-bsp/images/corstone1000-initramfs-image.bb deleted file mode 100644 index cac3b73c..00000000 --- a/meta-arm-bsp/recipes-bsp/images/corstone1000-initramfs-image.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMARY = "Corstone1000 platform Initramfs Image" -DESCRIPTION = "This is the main Linux image which includes an initramfs kernel/rootfs bundle." - -LICENSE = "MIT" - -COMPATIBLE_MACHINE = "corstone1000" - -IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" - -inherit core-image - -# By default all basic packages required for a bootable system are installed -# by core-image . These packages are: packagegroup-core-boot and -# packagegroup-base-extended - -inherit image-buildinfo - -#package management is not supported in corstone1000 -IMAGE_FEATURES:remove = "package-management" - -# all optee packages -IMAGE_INSTALL += "optee-client" - -# TS PSA API tests commands for crypto, its, ps and iat -IMAGE_INSTALL += "packagegroup-ts-tests-psa"