From patchwork Tue Apr 30 16:29:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emekcan Aras X-Patchwork-Id: 42975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68953C10F16 for ; Tue, 30 Apr 2024 16:30:11 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20461.1714494609190364199 for ; Tue, 30 Apr 2024 09:30:09 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: emekcan.aras@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 39E66339; Tue, 30 Apr 2024 09:30:35 -0700 (PDT) Received: from e126835.cambridge.arm.com (e126835.cambridge.arm.com [10.1.29.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 45D023F73F; Tue, 30 Apr 2024 09:30:08 -0700 (PDT) From: emekcan.aras@arm.com To: meta-arm@lists.yoctoproject.org Cc: Drew Reed Subject: [PATCH 1/6] arm-systemready: Fix regex in arm-systemready-ir-acs recipe Date: Tue, 30 Apr 2024 17:29:52 +0100 Message-Id: <20240430162957.94499-2-emekcan.aras@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240430162957.94499-1-emekcan.aras@arm.com> References: <20240430162957.94499-1-emekcan.aras@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 30 Apr 2024 16:30:11 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5666 From: Drew Reed The regex used to validate compatible machines is incorrect as it's only checking the machine name starts with "fvp" not "fvp-" as intended. It's also been modified to allow FVPs called xxx-fvp to be compatible with Corstone-1000. Signed-off-by: Drew Reed --- .../recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb index f9226c31..41ac2f77 100644 --- a/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb +++ b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb @@ -41,7 +41,7 @@ file://${COMMON_LICENSE_DIR}/Zlib;md5=87f239f408daca8a157858e192597633 \ " IMAGE_CLASSES:remove = "license_image" -COMPATIBLE_MACHINE = "fvp-*" +COMPATIBLE_MACHINE = "(fvp-.+|.+-fvp)" TEST_SUITES = "arm_systemready_ir_acs" From patchwork Tue Apr 30 16:29:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emekcan Aras X-Patchwork-Id: 42974 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 760F9C25B10 for ; Tue, 30 Apr 2024 16:30:11 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20462.1714494609841990803 for ; Tue, 30 Apr 2024 09:30:09 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: emekcan.aras@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E67662F4; Tue, 30 Apr 2024 09:30:35 -0700 (PDT) Received: from e126835.cambridge.arm.com (e126835.cambridge.arm.com [10.1.29.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 131593F73F; Tue, 30 Apr 2024 09:30:08 -0700 (PDT) From: emekcan.aras@arm.com To: meta-arm@lists.yoctoproject.org Cc: Drew Reed Subject: [PATCH 2/6] arm: Handle nodistro in firmware deployment Date: Tue, 30 Apr 2024 17:29:53 +0100 Message-Id: <20240430162957.94499-3-emekcan.aras@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240430162957.94499-1-emekcan.aras@arm.com> References: <20240430162957.94499-1-emekcan.aras@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 30 Apr 2024 16:30:11 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5667 From: Drew Reed The nodistro settings in poky set the TMPDIR variable to include the TCLIBC value so we need to spot that and swap the TCLIBC for the musl one used in the firmware multiconfig. Signed-off-by: Drew Reed --- meta-arm/recipes-bsp/images/firmware-deploy-image.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-arm/recipes-bsp/images/firmware-deploy-image.bb b/meta-arm/recipes-bsp/images/firmware-deploy-image.bb index 76c82738..2f347f0b 100644 --- a/meta-arm/recipes-bsp/images/firmware-deploy-image.bb +++ b/meta-arm/recipes-bsp/images/firmware-deploy-image.bb @@ -15,7 +15,8 @@ do_install[noexec] = "1" FIRMWARE_BINARIES ?= "" do_deploy() { - firmware_loc="${TMPDIR}_${MACHINE}/deploy/images/${MACHINE}" + firmware_loc=$(echo "${TMPDIR}" | sed "s/${TCLIBC}/musl/") + firmware_loc="${firmware_loc}_${MACHINE}/deploy/images/${MACHINE}" for firmware in ${FIRMWARE_BINARIES}; do echo "cp -av ${firmware_loc}/${firmware} ${DEPLOYDIR}/" cp -av "${firmware_loc}/${firmware}" ${DEPLOYDIR}/ From patchwork Tue Apr 30 16:29:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emekcan Aras X-Patchwork-Id: 42973 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57DD6C41513 for ; Tue, 30 Apr 2024 16:30:11 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20463.1714494610546004855 for ; Tue, 30 Apr 2024 09:30:10 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: emekcan.aras@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A5DFA113E; Tue, 30 Apr 2024 09:30:36 -0700 (PDT) Received: from e126835.cambridge.arm.com (e126835.cambridge.arm.com [10.1.29.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C0FFB3F73F; Tue, 30 Apr 2024 09:30:09 -0700 (PDT) From: emekcan.aras@arm.com To: meta-arm@lists.yoctoproject.org Cc: Drew Reed Subject: [PATCH 3/6] arm-bsp: corstone1000: Configure Corstone-1000 to use the meta-arm-systemready layer Date: Tue, 30 Apr 2024 17:29:54 +0100 Message-Id: <20240430162957.94499-4-emekcan.aras@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240430162957.94499-1-emekcan.aras@arm.com> References: <20240430162957.94499-1-emekcan.aras@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 30 Apr 2024 16:30:11 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5668 From: Drew Reed Added the missing meta-arm-systemready required variable to enable its use with the corstone1000-fvp machine. Also explicitly set all the consoles. Signed-off-by: Drew Reed --- meta-arm-bsp/conf/machine/corstone1000-fvp.conf | 5 ++++- meta-arm-bsp/conf/machine/include/corstone1000.inc | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf index b15c0faa..c567058c 100644 --- a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf +++ b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf @@ -14,7 +14,10 @@ TEST_SUITES = "fvp_boot" # FVP Config FVP_PROVIDER ?= "fvp-corstone1000-native" FVP_EXE ?= "FVP_Corstone-1000" -FVP_CONSOLE ?= "host_terminal_0" +FVP_CONSOLES[default] = "host_terminal_0" +FVP_CONSOLES[tf-a] = "host_terminal_1" +FVP_CONSOLES[se] = "secenc_terminal" +FVP_CONSOLES[extsys] = "extsys_terminal" #Disable Time Annotation FASTSIM_DISABLE_TA = "0" diff --git a/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm-bsp/conf/machine/include/corstone1000.inc index 7a8905d7..3b8dcb79 100644 --- a/meta-arm-bsp/conf/machine/include/corstone1000.inc +++ b/meta-arm-bsp/conf/machine/include/corstone1000.inc @@ -55,6 +55,9 @@ WKS_FILE:firmware ?= "corstone1000-flash-firmware.wks.in" WKS_FILE_DEPENDS:append = " ${EXTRA_IMAGEDEPENDS}" # If not building under the firmware multiconf we need to build the actual firmware -FIRMWARE_DEPLOYEMENT ?= "firmware-deploy-image" -FIRMWARE_DEPLOYEMENT:firmware ?= "" -EXTRA_IMAGEDEPENDS += "${FIRMWARE_DEPLOYEMENT}" +FIRMWARE_DEPLOYMENT ?= "firmware-deploy-image" +FIRMWARE_DEPLOYMENT:firmware ?= "" +EXTRA_IMAGEDEPENDS += "${FIRMWARE_DEPLOYMENT}" + +ARM_SYSTEMREADY_FIRMWARE = "${FIRMWARE_DEPLOYMENT}:do_deploy" +ARM_SYSTEMREADY_ACS_CONSOLE ?= "default" From patchwork Tue Apr 30 16:29:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emekcan Aras X-Patchwork-Id: 42976 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D96EC41513 for ; Tue, 30 Apr 2024 16:30:21 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20464.1714494611432743043 for ; Tue, 30 Apr 2024 09:30:11 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: emekcan.aras@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7C5F52F4; Tue, 30 Apr 2024 09:30:37 -0700 (PDT) Received: from e126835.cambridge.arm.com (e126835.cambridge.arm.com [10.1.29.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8E6F33F73F; Tue, 30 Apr 2024 09:30:10 -0700 (PDT) From: emekcan.aras@arm.com To: meta-arm@lists.yoctoproject.org Cc: Drew Reed Subject: [PATCH 4/6] arm-bsp: corstone1000: Make ESP partition available to Corstone-1000 Date: Tue, 30 Apr 2024 17:29:55 +0100 Message-Id: <20240430162957.94499-5-emekcan.aras@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240430162957.94499-1-emekcan.aras@arm.com> References: <20240430162957.94499-1-emekcan.aras@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 30 Apr 2024 16:30:21 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5669 From: Drew Reed 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 --- .../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 73fc1766..fee640a8 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}" From patchwork Tue Apr 30 16:29:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emekcan Aras X-Patchwork-Id: 42977 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D92BC10F16 for ; Tue, 30 Apr 2024 16:30:21 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.20351.1714494612303217881 for ; Tue, 30 Apr 2024 09:30:12 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: emekcan.aras@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 61CA7339; Tue, 30 Apr 2024 09:30:38 -0700 (PDT) Received: from e126835.cambridge.arm.com (e126835.cambridge.arm.com [10.1.29.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 56C763F73F; Tue, 30 Apr 2024 09:30:11 -0700 (PDT) From: emekcan.aras@arm.com To: meta-arm@lists.yoctoproject.org Cc: Drew Reed Subject: [PATCH 5/6] arm-bsp/corstone1000: Update Corstone-1000 user guide Date: Tue, 30 Apr 2024 17:29:56 +0100 Message-Id: <20240430162957.94499-6-emekcan.aras@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240430162957.94499-1-emekcan.aras@arm.com> References: <20240430162957.94499-1-emekcan.aras@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 30 Apr 2024 16:30:21 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5670 From: Drew Reed Update the Corstone-1000 user guide with the new instructions on how to build/use an ESP image and how to use the meta-arm-systemready layer to run the ACS tests. Signed-off-by: Drew Reed --- .../documentation/corstone1000/user-guide.rst | 132 ++++-------------- 1 file changed, 27 insertions(+), 105 deletions(-) diff --git a/meta-arm-bsp/documentation/corstone1000/user-guide.rst b/meta-arm-bsp/documentation/corstone1000/user-guide.rst index 073ea213..4b15d6c3 100644 --- a/meta-arm-bsp/documentation/corstone1000/user-guide.rst +++ b/meta-arm-bsp/documentation/corstone1000/user-guide.rst @@ -395,77 +395,12 @@ running the ACS tests. **Common to FVP and FPGA:** -#. Create an empty 100 MB partition: - :: - - dd if=/dev/zero of=corstone1000-efi-partition.img iflag=fullblock bs=512 count=204800 && sync - -#. Use OpenSuse Raw image to copy the contents of EFI partition. - - To download OpenSUSE Tumbleweed raw image: - - Under `OpenSUSE Tumbleweed appliances `__ - - The user should look for a Tumbleweed-ARM-JeOS-efi.aarch64-* Snapshot, for example, - ``openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64--Snapshot.raw.xz`` - - Once the .raw.xz file is downloaded, the raw image file needs to be extracted: - - :: - - unxz - - - The above command will generate a file ending with extension .raw image. Use the - following command to get address of the first partition - - :: - - fdisk -lu /openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64--Snapshot.raw - -> Device Start End Sectors Size Type - /openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64--Snapshot.raw1 8192 40959 32768 16M EFI System - /openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64--Snapshot.raw2 40960 1064959 1024000 500M Linux swap - /openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64--Snapshot.raw3 1064960 5369822 4304863 2.1G Linux filesystem - - -> = 8192 - -> = 32768 - -#. Copy the ESP from opensuse image to empty image: - - :: - - dd conv=notrunc if=openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64--Snapshot.raw skip= of=corstone1000-efi-partition.img seek= iflag=fullblock seek= bs=512 count= && sync - - -#. Create the file efi_disk.layout locally. Copy the content of provided disk layout below to the efi_disk.layout to label the ESP correctly. - - efi_disk.layout - :: - - label: gpt - label-id: AC53D121-B818-4515-9031-BE02CCEB8701 - device: corstone1000-efi-partition.img - unit: sectors - first-lba: 34 - last-lba: 204766 - - corstone1000-efi-partition.img : start=8192, size=32768, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=792D821F-98AE-46E3-BABD-948003A650F8, name="p.UEFI" - - And use the following command the label the newly created ESP. - - :: - - sfdisk corstone1000-efi-partition.img < efi_disk.layout - - To test the image, you can now mount the disk image - - :: - - fdisk -lu corstone1000-efi-partition.img - -> Device Start End Sectors Size Type - corstone1000-efi-partition.img1 8192 40959 32768 16M EFI System - - = 8192 * 512 (sector size) = 4194304 +:: + kas build meta-arm/kas/corstone1000-{mps3,fvp}.yml:meta-arm/ci/debug.yml --target corstone1000-esp-image - sudo mount -o loop,offset=4194304 corstone1000-efi-partition.img /mount_point +Once the build is successful ``corstone1000-esp-image-corstone1000-{mps3,fvp}.wic`` will be available in either: + - ``<_workspace>/build/tmp/deploy/images/corstone1000-fvp/`` folder for FVP build; + - ``<_workspace>/build/tmp/deploy/images/corstone1000-mps3/`` folder for FPGA build. **Using ESP in FPGA:** @@ -476,19 +411,16 @@ confirm). Be cautious here and don't confuse your host machine own hard drive wi USB drive. Run the following commands to prepare the ACS image in USB stick: :: - - sudo dd if=corstone1000-efi-partition.img of=/dev/sdb iflag=direct oflag=direct status=progress bs=512; sync; + sudo dd if=corstone1000-esp-image-corstone1000-mps3.wic of=/dev/sdb iflag=direct oflag=direct status=progress bs=512; sync; Now you can plug this USB stick to the board together with ACS test USB stick. **Using ESP in FVP:** -The ESP disk image can directly be used in Corstone-1000 FVP by simply passing it as -the 2nd MMC card image. +The ESP disk image once created will be used automatically in the Corstone-1000 FVP as the 2nd MMC card image. :: - - kas shell meta-arm/kas/corstone1000-fvp.yml:meta-arm/ci/debug.yml -c "../meta-arm/scripts/runfvp -- -C board.msd_mmc.p_mmc_file="${/ir_acs_live_image.img}" -C board.msd_mmc_2.p_mmc_file="${/corstone1000-efi-partition.img}" + kas shell meta-arm/kas/corstone1000-fvp.yml:meta-arm/ci/debug.yml -c "../meta-arm/scripts/runfvp -- -C board.msd_mmc.p_mmc_file="${/ir_acs_live_image.img}" Clean Secure Flash Before Testing (applicable to FPGA only) =========================================================== @@ -616,36 +548,16 @@ the platform is booted to linux at the end of the ACS tests. FVP instructions for ACS image and run ====================================== -Download ACS image from: - - ``https://gitlab.arm.com/systemready/acs/arm-systemready/-/tree/main/IR/prebuilt_images/v23.03_2.0.0`` - -Use the below command to run the FVP with EFI and ACS image support in the -SD cards. - +The FVP has been integrated in the meta-arm-systemready layer so the running of the ACS tests can be handled automatically as follows :: - unxz ${/ir-acs-live-image-generic-arm64.wic.xz} - - kas shell meta-arm/kas/corstone1000-fvp.yml:meta-arm/ci/debug.yml -c "../meta-arm/scripts/runfvp --terminals=xterm -- -C board.msd_mmc.p_mmc_file=/ir-acs-live-image-generic-arm64.wic -C board.msd_mmc_2.p_mmc_file="${/corstone1000-efi-partition.img}" + kas build meta-arm/ci/corstone1000-fvp.yml:meta-arm/ci/debug.yml:kas/arm-systemready-ir-acs.yml -The test results can be fetched using following commands: - -:: - - sudo mkdir /mnt/test - sudo mount -o rw,offset= /ir-acs-live-image-generic-arm64.wic /mnt/test/ - fdisk -lu /ir-acs-live-image-generic-arm64.wic - -> Device Start End Sectors Size Type - /ir-acs-live-image-generic-arm64.wic1 2048 206847 204800 100M Microsoft basic data - /ir-acs-live-image-generic-arm64.wic2 206848 1024239 817392 399.1M Linux filesystem - /ir-acs-live-image-generic-arm64.wic3 1026048 1128447 102400 50M Microsoft basic data +The details of how this layer works can be found in : ``<_workspace>/meta-arm-systemready/README.md`` - -> = 1026048 * 512 (sector size) = 525336576 +**NOTE:** You can't use the standard meta-arm/kas/corstone1000-fvp.yml kas file as it sets the build up for only building firmware -The FVP will reset multiple times during the test, and it might take up to 1 day to finish -the test. At the end of test, the FVP host terminal will halt showing a shell prompt. -Once test is finished, the FVP can be stoped, and result can be copied following above -instructions. +**NOTE:** These test might take up to 1 day to finish **NOTE:** A rare issue has been noticed (5-6% occurence) during which the FVP hangs during booting the system while running ACS tests. If this happens, please apply the following patch, rebuild the software stack for FVP and re-run the ACS tests. @@ -796,12 +708,24 @@ the on disk method. Copying the FVP capsules ======================== -First, mount the IR image: +First, Find the 1st partition offset: + +:: + + fdisk -lu /ir-acs-live-image-generic-arm64.wic + -> Device Start End Sectors Size Type + /ir-acs-live-image-generic-arm64.wic1 2048 206847 204800 100M Microsoft basic data + /ir-acs-live-image-generic-arm64.wic2 206848 1024239 817392 399.1M Linux filesystem + /ir-acs-live-image-generic-arm64.wic3 1026048 1128447 102400 50M Microsoft basic data + + -> = 2048 * 512 (sector size) = 1048576 + +Next, mount the IR image: :: sudo mkdir /mnt/test - sudo mount -o rw,offset=1048576 /ir-acs-live-image-generic-arm64.wic /mnt/test + sudo mount -o rw,offset= /ir-acs-live-image-generic-arm64.wic /mnt/test Then, copy the capsules: @@ -817,8 +741,6 @@ Then, unmount the IR image: sudo umount /mnt/test -**NOTE:** Please refer to `FVP instructions for ACS image and run`_ section to find the first partition offset. - ****************************** Performing the capsule update ****************************** From patchwork Tue Apr 30 16:29:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emekcan Aras X-Patchwork-Id: 42978 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80C11C4345F for ; Tue, 30 Apr 2024 16:30:21 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20466.1714494612994832513 for ; Tue, 30 Apr 2024 09:30:13 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: emekcan.aras@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1CF7F2F4; Tue, 30 Apr 2024 09:30:39 -0700 (PDT) Received: from e126835.cambridge.arm.com (e126835.cambridge.arm.com [10.1.29.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3ABF73F73F; Tue, 30 Apr 2024 09:30:12 -0700 (PDT) From: emekcan.aras@arm.com To: meta-arm@lists.yoctoproject.org Cc: Drew Reed Subject: [PATCH 6/6] ci: Add Corstone-1000 to the SystemReady ACS build Date: Tue, 30 Apr 2024 17:29:57 +0100 Message-Id: <20240430162957.94499-7-emekcan.aras@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240430162957.94499-1-emekcan.aras@arm.com> References: <20240430162957.94499-1-emekcan.aras@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 30 Apr 2024 16:30:21 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5671 From: Drew Reed Added the Corstone-1000 FVP platform to the ACS test build as well as adding the arm-systemready-firmware variant to the Corstone-1000 FVP build. Signed-off-by: Drew Reed --- .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7876daa..3adea45e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,6 +151,7 @@ corstone1000-fvp: TESTING: [testimage, tftf] - FIRMWARE: none TESTING: testimage + - SYSTEMREADY_FIRMWARE: arm-systemready-firmware corstone1000-mps3: extends: .build @@ -192,6 +193,19 @@ fvp-base: - FIRMWARE: edk2 - SYSTEMREADY_FIRMWARE: arm-systemready-firmware +arm-systemready-ir-acs: + extends: .build + timeout: 12h + parallel: + matrix: + # arm-systemready-ir-acs must be specified after fvp-base for ordering + # purposes for the jobs-to-kas output. It is not enough to just have it + # in the job name because fvp-base.yml overwrites the target. + - PLATFORM: [fvp-base, corstone1000-fvp] + ARM_SYSTEMREADY_IR_ACS: arm-systemready-ir-acs + tags: + - ${ACS_TAG} + fvps: extends: .build