From b44d8e409041cdbe0024685d97c367582972ffac Mon Sep 17 00:00:00 2001 From: Adam Johnston Date: Fri, 2 Feb 2024 11:35:02 +0000 Subject: [PATCH 1/4] cassini-bsp: Corstone-1000 builds skip components provided by firmware bitbake complains when multiple recipes deploy the same files. This occurs for Corstone-1000 builds because: - some recipes are built for both default and firmware configs - some firmware binaries are then deployed into the default build Fix the error by removing these recipes from the default build - external-system - trusted-firmware-m Signed-off-by: Adam Johnston --- .../include/corstone1000-mps3-cassini-extra-settings.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc b/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc index c824d3c..f9cb9c6 100644 --- a/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc +++ b/conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2023 Arm Limited and/or its +# SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its # affiliates # # SPDX-License-Identifier: MIT @@ -25,3 +25,7 @@ KERNEL_CLASSES:remove = "k3s_kernelcfg_check" # Due to performance limitations, add wait-online helper IMAGE_INSTALL:append:cassini = " wait-online" + +# Skip components which will be provided by the firmware build +EXTRA_IMAGEDEPENDS:remove:cassini = "external-system" +EXTRA_IMAGEDEPENDS:remove:cassini = "trusted-firmware-m" -- GitLab From d916763c47be01e32afecba35e4d7faa8f2eeb09 Mon Sep 17 00:00:00 2001 From: Adam Johnston Date: Wed, 24 Jan 2024 17:41:37 +0000 Subject: [PATCH 2/4] cassini-bsp: Use unpadded image for Corstone-1000 FVP The new OE inherit_defer feature seems to have broken custom image types, which we currently use to create a padded wic image for the Corstone-1000 FVP. Since the FVP now supports unpadded images, rather than debug the issue or wait for a fix, re-configure the FVP to use the unpadded wic image. Changelog: other Signed-off-by: Adam Johnston --- .../corstone1000-fvp-cassini-extra-settings.inc | 5 +++-- .../recipes-core/images/cassini-image-%.bbappend | 13 +------------ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/conf/machine/include/corstone1000-fvp-cassini-extra-settings.inc b/conf/machine/include/corstone1000-fvp-cassini-extra-settings.inc index 801c5c5..9a69624 100644 --- a/conf/machine/include/corstone1000-fvp-cassini-extra-settings.inc +++ b/conf/machine/include/corstone1000-fvp-cassini-extra-settings.inc @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2023 Arm Limited and/or its +# SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its # affiliates # # SPDX-License-Identifier: MIT @@ -9,12 +9,13 @@ include conf/machine/include/corstone1000-mps3-cassini-extra-settings.inc # Corstone-1000's FVP need images to have a extra empty space at the end or the FVP # truncates the mmc card size resulting in invalid GPT entries as the GPT last block is # beyond the MMC cards reported size, so we use the padded image here -FVP_CONFIG[board.msd_mmc.p_mmc_file] = "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.wic.pad" +FVP_CONFIG[board.msd_mmc.p_mmc_file] = "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.wic" # Setup the second MMC card 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] ?= "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.support_unpadded_images] ?= "true" FVP_DATA = "board.flash0=${DEPLOY_DIR_IMAGE}/corstone1000-image-corstone1000-fvp.wic@0x68000000" diff --git a/meta-arm/meta-arm-bsp/recipes-core/images/cassini-image-%.bbappend b/meta-arm/meta-arm-bsp/recipes-core/images/cassini-image-%.bbappend index 6109977..8380b3c 100644 --- a/meta-arm/meta-arm-bsp/recipes-core/images/cassini-image-%.bbappend +++ b/meta-arm/meta-arm-bsp/recipes-core/images/cassini-image-%.bbappend @@ -1,19 +1,8 @@ -# SPDX-FileCopyrightText: Copyright 2023 Arm Limited and/or its +# SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its # affiliates # # SPDX-License-Identifier: MIT -# Corstone-1000's FVP needs images to have a extra empty space at the end or the FVP -# truncates the MMC card resulting in invalid GPT entries as the GPT last block is -# beyond the MMC cards reported size -IMAGE_TYPES += "wic.pad" - -CONVERSIONTYPES += "pad" - -CONVERSION_CMD:pad = "cp ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.pad && dd if=/dev/zero count=1024 bs=512 >> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.pad" - -IMAGE_FSTYPES:append:corstone1000-fvp = " wic.pad wic.pad.gz" - # We do not want to build these machine added extra's in the main cassini image context as # they should only be built in firmware context # This list needs to be kept in sync with the list added in -- GitLab From c601000eff3c7f8aea2248eb913bf0d4c54bfb20 Mon Sep 17 00:00:00 2001 From: Adam Johnston Date: Tue, 30 Jan 2024 12:37:18 +0000 Subject: [PATCH 3/4] cassini-bsp: Fix systemd patch for Corstone-1000 ROOTLIBEXECDIR has been deprecated and replaced by LIBEXECDIR. Update the systemd patch for Corstone-1000 to match Signed-off-by: Adam Johnston --- ...01-Set-networkd-wait-online-timeout-to-5-minutes.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poky/meta/recipes-core/systemd/files/corstone1000/0001-Set-networkd-wait-online-timeout-to-5-minutes.patch b/poky/meta/recipes-core/systemd/files/corstone1000/0001-Set-networkd-wait-online-timeout-to-5-minutes.patch index a8d65fd..bb0b9ac 100644 --- a/poky/meta/recipes-core/systemd/files/corstone1000/0001-Set-networkd-wait-online-timeout-to-5-minutes.patch +++ b/poky/meta/recipes-core/systemd/files/corstone1000/0001-Set-networkd-wait-online-timeout-to-5-minutes.patch @@ -21,8 +21,8 @@ index 3dc5ce9265..5e1fb5c146 100644 [Service] Type=oneshot --ExecStart={{ROOTLIBEXECDIR}}/systemd-networkd-wait-online -+ExecStart={{ROOTLIBEXECDIR}}/systemd-networkd-wait-online --timeout=300 +-ExecStart={{LIBEXECDIR}}/systemd-networkd-wait-online ++ExecStart={{LIBEXECDIR}}/systemd-networkd-wait-online --timeout=300 RemainAfterExit=yes [Install] @@ -34,8 +34,8 @@ index 2fae26d1c0..efd5d65a55 100644 [Service] Type=oneshot --ExecStart={{ROOTLIBEXECDIR}}/systemd-networkd-wait-online -i %i -+ExecStart={{ROOTLIBEXECDIR}}/systemd-networkd-wait-online -i %i --timeout=300 +-ExecStart={{LIBEXECDIR}}/systemd-networkd-wait-online -i %i ++ExecStart={{LIBEXECDIR}}/systemd-networkd-wait-online -i %i --timeout=300 RemainAfterExit=yes [Install] -- GitLab From b86765bb04da9173b7fd1b87d9aa23a10bec3b75 Mon Sep 17 00:00:00 2001 From: Drew Reed Date: Fri, 22 Dec 2023 10:44:52 +0000 Subject: [PATCH 4/4] bsp: Ensure timeouts don't change other package defaults The systemd-conf base recipe already contained a file called system.conf so by adding the same file in the append recipe we were overwriting the original and installing 2 copies of the same file into the image. The file in the append recipe has now been renamed to avoid this. Signed-off-by: Drew Reed --- .../systemd/corstone1000/{system.conf => timeouts.conf} | 0 .../meta-arm-bsp/recipes-core/systemd/systemd-conf_%.bbappend | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename meta-arm/meta-arm-bsp/recipes-core/systemd/corstone1000/{system.conf => timeouts.conf} (100%) diff --git a/meta-arm/meta-arm-bsp/recipes-core/systemd/corstone1000/system.conf b/meta-arm/meta-arm-bsp/recipes-core/systemd/corstone1000/timeouts.conf similarity index 100% rename from meta-arm/meta-arm-bsp/recipes-core/systemd/corstone1000/system.conf rename to meta-arm/meta-arm-bsp/recipes-core/systemd/corstone1000/timeouts.conf diff --git a/meta-arm/meta-arm-bsp/recipes-core/systemd/systemd-conf_%.bbappend b/meta-arm/meta-arm-bsp/recipes-core/systemd/systemd-conf_%.bbappend index 1ca0633..28399fb 100644 --- a/meta-arm/meta-arm-bsp/recipes-core/systemd/systemd-conf_%.bbappend +++ b/meta-arm/meta-arm-bsp/recipes-core/systemd/systemd-conf_%.bbappend @@ -6,10 +6,10 @@ FILESEXTRAPATHS:prepend := "${THISDIR}:" SRC_URI:append:corstone1000 = " \ - file://system.conf \ + file://timeouts.conf \ " # nooelint: oelint.func.specific - Common name set in Corstone-1000 definitions do_install:append:corstone1000() { - install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_system_unitdir}.conf.d/01-${PN}.conf + install -D -m0644 ${WORKDIR}/timeouts.conf ${D}${systemd_system_unitdir}.conf.d/01-${PN}.conf } -- GitLab