From eed6bc24d129a0ca97fa1f44f5cbc781ea7c9a43 Mon Sep 17 00:00:00 2001 From: Drew Reed Date: Tue, 30 Apr 2024 17:29:55 +0100 Subject: [PATCH] arm-bsp: corstone1000: Make ESP partition available to Corstone-1000 The SystemReady IR ACS test suite require that there is a valid ESP partition available to the system. This change creates a new image that only contains a ESP partition and ensures it's mounted on the second MMC card so it's available when the SystemReady tests run. The diagnostic level of the 2 MMC cards have also been lowered to improve the ACS test duration. Corrected a spelling mistake in the corstone1000-flash-firmware-image.bb file. Signed-off-by: Drew Reed Signed-off-by: Jon Mason --- .../conf/machine/corstone1000-fvp.conf | 5 ++-- .../conf/machine/include/corstone1000.inc | 4 ++- .../images/corstone1000-esp-image.bb | 25 +++++++++++++++++++ .../corstone1000-flash-firmware-image.bb | 2 +- meta-arm-bsp/wic/efi-disk-esp-only.wks.in | 9 +++++++ meta-arm-bsp/wic/efi-disk-no-swap.wks.in | 4 +-- 6 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 meta-arm-bsp/recipes-bsp/images/corstone1000-esp-image.bb create mode 100644 meta-arm-bsp/wic/efi-disk-esp-only.wks.in diff --git a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf index c567058c..2c724bfe 100644 --- a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf +++ b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf @@ -52,7 +52,7 @@ FVP_TERMINALS[extsys0.extsys_terminal] ?= "Cortex M3" # MMC card configuration FVP_CONFIG[board.msd_mmc.card_type] ?= "SDHC" FVP_CONFIG[board.msd_mmc.p_fast_access] ?= "0" -FVP_CONFIG[board.msd_mmc.diagnostics] ?= "2" +FVP_CONFIG[board.msd_mmc.diagnostics] ?= "0" FVP_CONFIG[board.msd_mmc.p_max_block_count] ?= "0xFFFF" FVP_CONFIG[board.msd_config.pl180_fifo_depth] ?= "16" FVP_CONFIG[board.msd_mmc.support_unpadded_images] ?= "true" @@ -61,10 +61,11 @@ FVP_CONFIG[board.msd_mmc.p_mmc_file] ?= "${IMAGE_NAME}.wic" # MMC2 card configuration FVP_CONFIG[board.msd_mmc_2.card_type] ?= "SDHC" FVP_CONFIG[board.msd_mmc_2.p_fast_access] ?= "0" -FVP_CONFIG[board.msd_mmc_2.diagnostics] ?= "2" +FVP_CONFIG[board.msd_mmc_2.diagnostics] ?= "0" FVP_CONFIG[board.msd_mmc_2.p_max_block_count] ?= "0xFFFF" FVP_CONFIG[board.msd_config_2.pl180_fifo_depth] ?= "16" FVP_CONFIG[board.msd_mmc_2.support_unpadded_images] ?= "true" +FVP_CONFIG[board.msd_mmc_2.p_mmc_file] ?= "corstone1000-esp-image-${MACHINE}.wic" # Virtio-Net configuration FVP_CONFIG[board.virtio_net.enabled] ?= "1" diff --git a/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm-bsp/conf/machine/include/corstone1000.inc index 3b8dcb79..c78cc061 100644 --- a/meta-arm-bsp/conf/machine/include/corstone1000.inc +++ b/meta-arm-bsp/conf/machine/include/corstone1000.inc @@ -59,5 +59,7 @@ FIRMWARE_DEPLOYMENT ?= "firmware-deploy-image" FIRMWARE_DEPLOYMENT:firmware ?= "" EXTRA_IMAGEDEPENDS += "${FIRMWARE_DEPLOYMENT}" -ARM_SYSTEMREADY_FIRMWARE = "${FIRMWARE_DEPLOYMENT}:do_deploy" +ARM_SYSTEMREADY_FIRMWARE = "${FIRMWARE_DEPLOYMENT}:do_deploy \ + corstone1000-esp-image:do_image_complete \ + " ARM_SYSTEMREADY_ACS_CONSOLE ?= "default" diff --git a/meta-arm-bsp/recipes-bsp/images/corstone1000-esp-image.bb b/meta-arm-bsp/recipes-bsp/images/corstone1000-esp-image.bb new file mode 100644 index 00000000..bd1a206a --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/images/corstone1000-esp-image.bb @@ -0,0 +1,25 @@ +SUMMARY = "Corstone1000 platform esp Image" +DESCRIPTION = "This builds a simple image file that only contains an esp \ + partition for use when running the SystemReady IR ACS tests." +LICENSE = "MIT" + +COMPATIBLE_MACHINE = "corstone1000" + +# IMAGE_FSTYPES must be set before 'inherit image' +# https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_FSTYPES +IMAGE_FSTYPES = "wic" + +inherit image + +IMAGE_FEATURES = "" +IMAGE_LINGUAS = "" + +PACKAGE_INSTALL = "" + +# This builds a very specific image so we can ignore any customization +WKS_FILE = "efi-disk-esp-only.wks.in" +WKS_FILE:firmware = "efi-disk-esp-only.wks.in" + +EXTRA_IMAGEDEPENDS = "" +# Don't write an fvp configuration file for this image as it can't run +IMAGE_POSTPROCESS_COMMAND:remove = "do_write_fvpboot_conf;" diff --git a/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb b/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb index 904d8518..4a32192d 100644 --- a/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb +++ b/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb @@ -1,4 +1,4 @@ -SUMARY = "Corstone1000 platform Image" +SUMMARY = "Corstone1000 platform Image" DESCRIPTION = "This is the main image which is the container of all the binaries \ generated for the Corstone1000 platform." LICENSE = "MIT" diff --git a/meta-arm-bsp/wic/efi-disk-esp-only.wks.in b/meta-arm-bsp/wic/efi-disk-esp-only.wks.in new file mode 100644 index 00000000..739cc5a4 --- /dev/null +++ b/meta-arm-bsp/wic/efi-disk-esp-only.wks.in @@ -0,0 +1,9 @@ +# short-description: Create an EFI disk image with only an ESP partition +# long-description: Creates a partitioned EFI disk image that the user +# can directly dd to boot media. This image only contains an ESP +# partition that can be used by the SystemReady ACS test to store +# EFI data and process capsule updates. + +part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid --part-name="ESP" --part-type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B --fixed-size 256M + +bootloader --ptable gpt --timeout=1 --append="${GRUB_LINUX_APPEND}" diff --git a/meta-arm-bsp/wic/efi-disk-no-swap.wks.in b/meta-arm-bsp/wic/efi-disk-no-swap.wks.in index 61902dfd..6ae7ad9d 100644 --- a/meta-arm-bsp/wic/efi-disk-no-swap.wks.in +++ b/meta-arm-bsp/wic/efi-disk-no-swap.wks.in @@ -3,8 +3,8 @@ # can directly dd to boot media. This image will not contain a swap # partition but will contain custom machine specific grub arguments. -part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid +part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid --part-name="ESP" --part-type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B --fixed-size 256M -part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid +part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid --exclude-path boot/ bootloader --ptable gpt --timeout=1 --append="${GRUB_LINUX_APPEND}"