From 6e2a547482fb29eadf939d847fb6e7962f19740e Mon Sep 17 00:00:00 2001 From: Drew Reed Date: Thu, 7 Mar 2024 11:18:35 +0000 Subject: [PATCH] kas: Corstone-1000 kas files updated The 2 Corstone-1000 kas files files are updated following the multiconfig changes. The pinned commits have been commented out and the default branch changed to master to allow the file to build valid images. Signed-off-by: Drew Reed Signed-off-by: Jon Mason --- ci/corstone1000-common.yml | 39 +---------------------- ci/corstone1000-firmware-only.yml | 20 ++---------- kas/corstone1000-base.yml | 19 ++++++----- kas/corstone1000-firmware-only.yml | 21 +++++++++++++ kas/corstone1000-fvp.yml | 21 ++++++++----- kas/corstone1000-image-configuration.yml | 40 ++++++++++++++++++++++++ kas/corstone1000-mps3.yml | 2 ++ 7 files changed, 89 insertions(+), 73 deletions(-) create mode 100644 kas/corstone1000-firmware-only.yml create mode 100644 kas/corstone1000-image-configuration.yml diff --git a/ci/corstone1000-common.yml b/ci/corstone1000-common.yml index 4c715176..7fe9e879 100644 --- a/ci/corstone1000-common.yml +++ b/ci/corstone1000-common.yml @@ -4,44 +4,7 @@ header: - ci/base.yml - ci/meta-openembedded.yml - ci/meta-secure-core.yml - -local_conf_header: - extrapackages: | - # Intentionally blank to prevent perf from being added to the image in base.yml - - firmwarebuild: | - # Only needed as kas doesn't add it automatically unless you have 2 targets in seperate configs - BBMULTICONFIG ?= "firmware" - - distrosetup: | - DISTRO_FEATURES = "usbhost ipv4" - - initramfsetup: | - # Telling the build system which image is responsible of the generation of the initramfs rootfs - INITRAMFS_IMAGE_BUNDLE:firmware = "1" - INITRAMFS_IMAGE:firmware ?= "core-image-minimal" - IMAGE_FSTYPES:firmware:pn-core-image-minimal = "${INITRAMFS_FSTYPES}" - IMAGE_NAME_SUFFIX:firmware = "" - - # enable mdev/busybox for init - INIT_MANAGER:firmware = "mdev-busybox" - VIRTUAL-RUNTIME_init_manager:firmware = "busybox" - - # prevent the kernel image from being included in the intramfs rootfs - PACKAGE_EXCLUDE:firmware += "kernel-image-*" - - # Disable openssl in kmod to shrink the initramfs size - PACKAGECONFIG:remove:firmware:pn-kmod = "openssl" - - imageextras: | - # Don't include kernel binary in rootfs /boot path - RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = "" - - # all optee packages - CORE_IMAGE_EXTRA_INSTALL += "optee-client" - - # TS PSA API tests commands for crypto, its, ps and iat - CORE_IMAGE_EXTRA_INSTALL += "packagegroup-ts-tests-psa" + - kas/corstone1000-image-configuration.yml target: - core-image-minimal diff --git a/ci/corstone1000-firmware-only.yml b/ci/corstone1000-firmware-only.yml index 9cc4299a..8af0146a 100644 --- a/ci/corstone1000-firmware-only.yml +++ b/ci/corstone1000-firmware-only.yml @@ -1,24 +1,8 @@ --- header: version: 14 - -local_conf_header: - rescuebuild: | - # Need to ensure the rescue linux options are selected - OVERRIDES .= ":firmware" - - # Need to ensure we build with a small libc - TCLIBC="musl" - - mass-storage: | - # Ensure the Mass Storage device is absent - FVP_CONFIG[board.msd_mmc.p_mmc_file] = "invalid.dat" - - test-configuration: | - TEST_SUITES = "_qemutiny ping" - # Remove Dropbear SSH as it will not fit into the corstone1000 image. - IMAGE_FEATURES:remove = "ssh-server-dropbear" - CORE_IMAGE_EXTRA_INSTALL:remove = "ssh-pregen-hostkeys" + includes: + - kas/corstone1000-firmware-only.yml target: - corstone1000-flash-firmware-image diff --git a/kas/corstone1000-base.yml b/kas/corstone1000-base.yml index 1ab65455..a8b98603 100644 --- a/kas/corstone1000-base.yml +++ b/kas/corstone1000-base.yml @@ -1,14 +1,11 @@ header: version: 14 -env: - DISPLAY: "" - -distro: poky-tiny +distro: poky defaults: repos: - branch: nanbield + branch: master repos: meta-arm: @@ -19,14 +16,14 @@ repos: poky: url: https://git.yoctoproject.org/git/poky - commit: 2e9c2a2381105f1306bcbcb54816cbc5d8110eff + # commit: 2e9c2a2381105f1306bcbcb54816cbc5d8110eff layers: meta: meta-poky: meta-openembedded: url: https://git.openembedded.org/meta-openembedded - commit: 1750c66ae8e4268c472c0b2b94748a59d6ef866d + # commit: 1750c66ae8e4268c472c0b2b94748a59d6ef866d layers: meta-oe: meta-python: @@ -34,15 +31,17 @@ repos: meta-secure-core: url: https://github.com/wind-river/meta-secure-core.git - commit: e29165a1031dcf601edbed1733cedd64826672a5 + # commit: e29165a1031dcf601edbed1733cedd64826672a5 layers: - meta: + meta-secure-core-common: meta-signing-key: meta-efi-secure-boot: local_conf_header: base: | CONF_VERSION = "2" + + setup: | PACKAGE_CLASSES = "package_ipk" BB_NUMBER_THREADS ?= "16" PARALLEL_MAKE ?= "-j16" @@ -51,4 +50,4 @@ local_conf_header: machine: unset target: - - corstone1000-image + - corstone1000-flash-firmware-image diff --git a/kas/corstone1000-firmware-only.yml b/kas/corstone1000-firmware-only.yml new file mode 100644 index 00000000..f1640367 --- /dev/null +++ b/kas/corstone1000-firmware-only.yml @@ -0,0 +1,21 @@ +--- +header: + version: 14 + +local_conf_header: + firmwarebuild: | + # Need to ensure the rescue linux options are selected + OVERRIDES .= ":firmware" + + # Need to ensure we build with a small libc + TCLIBC="musl" + + mass-storage: | + # Ensure the Mass Storage device is absent + FVP_CONFIG[board.msd_mmc.p_mmc_file] = "invalid.dat" + + test-configuration: | + TEST_SUITES = "_qemutiny ping" + # Remove Dropbear SSH as it will not fit into the corstone1000 image. + IMAGE_FEATURES:remove = "ssh-server-dropbear" + CORE_IMAGE_EXTRA_INSTALL:remove = "ssh-pregen-hostkeys" diff --git a/kas/corstone1000-fvp.yml b/kas/corstone1000-fvp.yml index abf40703..0d6d5fee 100644 --- a/kas/corstone1000-fvp.yml +++ b/kas/corstone1000-fvp.yml @@ -2,15 +2,22 @@ header: version: 14 includes: - kas/corstone1000-base.yml + - kas/corstone1000-image-configuration.yml + - kas/corstone1000-firmware-only.yml - kas/fvp-eula.yml -machine: corstone1000-fvp +env: + DISPLAY: + WAYLAND_DISPLAY: + XAUTHORITY: local_conf_header: - fvp-config: | - # Remove Dropbear SSH as it will not fit into the corstone1000 image. - IMAGE_FEATURES:remove = " ssh-server-dropbear" - INHERIT += "fvpboot" + testimagefvp: | + LICENSE_FLAGS_ACCEPTED += "Arm-FVP-EULA" + IMAGE_CLASSES += "fvpboot" -target: - - corstone1000-image + mass-storage: | + # Ensure the Mass Storage device is absent + FVP_CONFIG[board.msd_mmc.p_mmc_file] = "invalid.dat" + +machine: corstone1000-fvp diff --git a/kas/corstone1000-image-configuration.yml b/kas/corstone1000-image-configuration.yml new file mode 100644 index 00000000..2b285223 --- /dev/null +++ b/kas/corstone1000-image-configuration.yml @@ -0,0 +1,40 @@ +header: + version: 14 + +local_conf_header: + extrapackages: | + # Intentionally blank to prevent perf from being added to the image in base.yml + + firmwarebuild: | + # Only needed as kas doesn't add it automatically unless you have 2 targets in seperate configs + BBMULTICONFIG ?= "firmware" + + distrosetup: | + DISTRO_FEATURES = "usbhost ipv4" + + initramfsetup: | + # Telling the build system which image is responsible of the generation of the initramfs rootfs + INITRAMFS_IMAGE_BUNDLE:firmware = "1" + INITRAMFS_IMAGE:firmware ?= "core-image-minimal" + IMAGE_FSTYPES:firmware:pn-core-image-minimal = "${INITRAMFS_FSTYPES}" + IMAGE_NAME_SUFFIX:firmware = "" + + # enable mdev/busybox for init + INIT_MANAGER:firmware = "mdev-busybox" + VIRTUAL-RUNTIME_init_manager:firmware = "busybox" + + # prevent the kernel image from being included in the intramfs rootfs + PACKAGE_EXCLUDE:firmware += "kernel-image-*" + + # Disable openssl in kmod to shrink the initramfs size + PACKAGECONFIG:remove:firmware:pn-kmod = "openssl" + + imageextras: | + # Don't include kernel binary in rootfs /boot path + RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = "" + + # all optee packages + CORE_IMAGE_EXTRA_INSTALL += "optee-client" + + # TS PSA API tests commands for crypto, its, ps and iat + CORE_IMAGE_EXTRA_INSTALL += "packagegroup-ts-tests-psa" diff --git a/kas/corstone1000-mps3.yml b/kas/corstone1000-mps3.yml index 7d63a185..30f465a2 100644 --- a/kas/corstone1000-mps3.yml +++ b/kas/corstone1000-mps3.yml @@ -2,5 +2,7 @@ header: version: 14 includes: - kas/corstone1000-base.yml + - kas/corstone1000-image-configuration.yml + - kas/corstone1000-firmware-only.yml machine: corstone1000-mps3