From patchwork Fri Oct 14 11:02:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mohamed.omarasaker@arm.com X-Patchwork-Id: 13884 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 386D8C43217 for ; Fri, 14 Oct 2022 11:03:28 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.5943.1665745405140007718 for ; Fri, 14 Oct 2022 04:03:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: mohamed.omarasaker@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 EE6A713D5; Fri, 14 Oct 2022 04:03:30 -0700 (PDT) Received: from e126544.arm.com (unknown [10.57.36.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8412B3F792; Fri, 14 Oct 2022 04:03:23 -0700 (PDT) From: mohamed.omarasaker@arm.com To: meta-arm@lists.yoctoproject.org, Ross.Burton@arm.com Cc: nd@arm.com, Satish Kumar Subject: [PATCH 1/4] arm-bsp/u-boot: corstone1000: esrt support Date: Fri, 14 Oct 2022 12:02:48 +0100 Message-Id: <20221014110251.1766159-2-mohamed.omarasaker@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014110251.1766159-1-mohamed.omarasaker@arm.com> References: <20221014110251.1766159-1-mohamed.omarasaker@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 ; Fri, 14 Oct 2022 11:03:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3964 From: Satish Kumar Signed-off-by: Satish Kumar --- .../0030-arm-corstone1000-esrt-support.patch | 223 ++++++++++++++++++ .../recipes-bsp/u-boot/u-boot_%.bbappend | 3 +- 2 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-arm-corstone1000-esrt-support.patch diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-arm-corstone1000-esrt-support.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-arm-corstone1000-esrt-support.patch new file mode 100644 index 00000000..2db5c2a1 --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-arm-corstone1000-esrt-support.patch @@ -0,0 +1,223 @@ +From d8fca6ebd5917df9a12dbf1da6a97f99af06eee9 Mon Sep 17 00:00:00 2001 +From: Satish Kumar +Date: Fri, 19 Aug 2022 09:18:33 +0100 +Subject: [PATCH] arm/corstone1000: esrt support + +The implementation is platform specific and would require +change in future. + +The patch should not be upstreamed as it is to the u-boot. +Redesign of FMP protocol for ESRT and Capsule Update interface +is to be considered in the future. + +Signed-off-by: Satish Kumar +Upstream-Status: Inappropriate [Redesign of FMP protocol for ESRT and Capsule update interface is required] +--- + include/efi_api.h | 2 +- + lib/efi_loader/efi_firmware.c | 133 ++++++++++++++++++++++++++++++++++ + lib/efi_loader/efi_setup.c | 16 ++-- + 3 files changed, 142 insertions(+), 9 deletions(-) + +diff --git a/include/efi_api.h b/include/efi_api.h +index 83c01085fd..26899afd01 100644 +--- a/include/efi_api.h ++++ b/include/efi_api.h +@@ -2014,7 +2014,7 @@ struct efi_firmware_image_descriptor { + u32 last_attempt_status; + u64 hardware_instance; + efi_firmware_image_dep_t *dependencies; +-}; ++} __packed; + + struct efi_firmware_management_protocol { + efi_status_t (EFIAPI *get_image_info)( +diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c +index 28d9a19edb..aa4af8036b 100644 +--- a/lib/efi_loader/efi_firmware.c ++++ b/lib/efi_loader/efi_firmware.c +@@ -14,6 +14,7 @@ + #include + + #include ++#include + + #define FMP_PAYLOAD_HDR_SIGNATURE SIGNATURE_32('M', 'S', 'S', '1') + +@@ -416,8 +417,140 @@ efi_status_t EFIAPI efi_firmware_fit_set_image( + return EFI_EXIT(EFI_SUCCESS); + } + ++#if CONFIG_IS_ENABLED(TARGET_CORSTONE1000) ++ ++/** ++ * efi_firmware_corstone1000_get_image_info - return information about the current ++ firmware image ++ * @this: Protocol instance ++ * @image_info_size: Size of @image_info ++ * @image_info: Image information ++ * @descriptor_version: Pointer to version number ++ * @descriptor_count: Pointer to number of descriptors ++ * @descriptor_size: Pointer to descriptor size ++ * package_version: Package version ++ * package_version_name: Package version's name ++ * ++ * Return information bout the current firmware image in @image_info. ++ * @image_info will consist of a number of descriptors. ++ * Each descriptor will be created based on efi fetched variable. ++ * ++ * Return status code ++ */ ++static ++efi_status_t EFIAPI efi_firmware_corstone1000_get_image_info( ++ struct efi_firmware_management_protocol *this, ++ efi_uintn_t *image_info_size, ++ struct efi_firmware_image_descriptor *image_info, ++ u32 *descriptor_version, ++ u8 *descriptor_count, ++ efi_uintn_t *descriptor_size, ++ u32 *package_version, ++ u16 **package_version_name) ++{ ++ efi_uintn_t var_size; ++ efi_status_t ret = EFI_SUCCESS; ++ efi_uintn_t image_info_size_var = 0; ++ efi_uintn_t image_info_name_size_var; ++ efi_uintn_t image_info_version_size_var; ++ u8 *runner = (u8 *)image_info; ++ u16 fmp_image_name[14] = {'F', 'm', 'p', 'I', 'm', 'a', 'g', 'e', 'N', 'a', 'm', 'e', '1', '\0'}; ++ u16 fmp_version_name[16] = {'F', 'm', 'p', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'N', 'a', 'm', 'e', '1', '\0'}; ++ ++ EFI_ENTRY("%p %p %p %p %p %p %p %p\n", this, ++ image_info_size, image_info, ++ descriptor_version, descriptor_count, descriptor_size, ++ package_version, package_version_name); ++ ++ if (!image_info_size) ++ return EFI_EXIT(EFI_INVALID_PARAMETER); ++ ++ if (*image_info_size && ++ (!image_info || !descriptor_version || !descriptor_count || ++ !descriptor_size || !package_version || !package_version_name)) ++ return EFI_EXIT(EFI_INVALID_PARAMETER); ++ ++ var_size = sizeof(*descriptor_version); ++ ret = efi_get_variable(u"FmpDescriptorVersion", ++ &efi_guid_firmware_management_protocol, NULL, ++ &var_size, descriptor_version); ++ if (ret != EFI_SUCCESS) ++ return EFI_EXIT(ret); ++ ++ if (*descriptor_version != EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION) ++ return EFI_EXIT(EFI_UNSUPPORTED); ++ ++ var_size = sizeof(image_info_size_var); ++ ret = efi_get_variable(u"FmpImageInfoSize", ++ &efi_guid_firmware_management_protocol, NULL, ++ &var_size, &image_info_size_var); ++ if (ret != EFI_SUCCESS) ++ return EFI_EXIT(ret); ++ ++ if (*image_info_size < image_info_size_var) { ++ *image_info_size = image_info_size_var; ++ return EFI_EXIT(EFI_BUFFER_TOO_SMALL); ++ } ++ ++ image_info_name_size_var = image_info_size_var; ++ ++ var_size = sizeof(*descriptor_count); ++ ret = efi_get_variable(u"FmpDescriptorCount", ++ &efi_guid_firmware_management_protocol, NULL, ++ &var_size, descriptor_count); ++ if (ret != EFI_SUCCESS) { ++ return EFI_EXIT(ret); ++ } ++ ++ ret = efi_get_variable(u"FmpImageInfo", ++ &efi_guid_firmware_management_protocol, NULL, ++ &image_info_size_var, image_info); ++ if (ret != EFI_SUCCESS) ++ return EFI_EXIT(ret); ++ ++ runner += image_info_size_var; ++ ++ image_info_name_size_var -= image_info_size_var; ++ image_info_version_size_var = image_info_name_size_var; ++ ++ /* Consider changing the string modfication logic */ ++ fmp_image_name[12] = '0' + (u16)image_info->image_id; ++ ret = efi_get_variable(fmp_image_name, ++ &efi_guid_firmware_management_protocol, NULL, ++ &image_info_name_size_var, runner); ++ if (ret != EFI_SUCCESS) ++ return EFI_EXIT(ret); ++ ++ image_info_version_size_var -= image_info_name_size_var; ++ image_info->image_id_name = runner; ++ runner += image_info_name_size_var; ++ ++ /* Consider changing the string modfication logic */ ++ fmp_version_name[14] = '0' + (u16)image_info->image_id; ++ ret = efi_get_variable(fmp_version_name, ++ &efi_guid_firmware_management_protocol, NULL, ++ &image_info_version_size_var, runner); ++ if (ret != EFI_SUCCESS) ++ return EFI_EXIT(ret); ++ ++ image_info->version_name = runner; ++ ++ *image_info_size = image_info_size_var; ++ ++ *package_version = 0xffffffff; /* not supported */ ++ *package_version_name = NULL; /* not supported */ ++ ++ return EFI_EXIT(ret); ++} ++ ++#endif ++ + const struct efi_firmware_management_protocol efi_fmp_fit = { ++#if CONFIG_IS_ENABLED(TARGET_CORSTONE1000) ++ .get_image_info = efi_firmware_corstone1000_get_image_info, ++#else + .get_image_info = efi_firmware_get_image_info, ++#endif + .get_image = efi_firmware_get_image_unsupported, + .set_image = efi_firmware_fit_set_image, + .check_image = efi_firmware_check_image_unsupported, +diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c +index 6c9e14c37e..6ccda175ff 100644 +--- a/lib/efi_loader/efi_setup.c ++++ b/lib/efi_loader/efi_setup.c +@@ -168,13 +168,6 @@ static efi_status_t efi_init_capsule(void) + + #if IS_ENABLED(CONFIG_TARGET_CORSTONE1000) + int ffa_ret; +- +- ffa_ret = efi_corstone1000_uboot_efi_started_event(); +- if (ffa_ret) +- debug("[efi_boottime][ERROR]: Failure to notify SE Proxy FW update service\n"); +- else +- debug("[efi_boottime][INFO]: SE Proxy FW update service notified\n"); +- + ret = efi_corstone1000_alloc_capsule_shared_buf(); + if (ret != EFI_SUCCESS) { + printf("EFI: Corstone-1000: cannot allocate caspsule shared buffer\n"); +@@ -306,7 +299,14 @@ efi_status_t efi_init_obj_list(void) + if (ret != EFI_SUCCESS) + goto out; + } +- ++#if IS_ENABLED(CONFIG_TARGET_CORSTONE1000) ++ int ffa_ret; ++ ffa_ret = efi_corstone1000_uboot_efi_started_event(); ++ if (ffa_ret) ++ debug("[efi_boottime][ERROR]: Failure to notify SE Proxy FW update service\n"); ++ else ++ debug("[efi_boottime][INFO]: SE Proxy FW update service notified\n"); ++#endif + /* Initialize variable services */ + ret = efi_init_variables(); + if (ret != EFI_SUCCESS) +-- +2.25.1 + diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend b/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend index 420cee65..465f0349 100644 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend @@ -47,7 +47,8 @@ SRC_URI:append:corstone1000 = " \ file://0027-corstone1000-use-a-compressed-kernel.patch \ file://0028-Introduce-external-sys-driver-to-device-tree.patch \ file://0029-Add-mhu-and-rpmsg-client-to-u-boot-device-tree.patch \ - " + file://0030-arm-corstone1000-esrt-support.patch \ + " # # FVP BASE From patchwork Fri Oct 14 11:02:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mohamed.omarasaker@arm.com X-Patchwork-Id: 13885 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 34765C433FE for ; Fri, 14 Oct 2022 11:03:28 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.5773.1665745407068004281 for ; Fri, 14 Oct 2022 04:03:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: mohamed.omarasaker@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 7D3FC13D5; Fri, 14 Oct 2022 04:03:32 -0700 (PDT) Received: from e126544.arm.com (unknown [10.57.36.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2B7033F792; Fri, 14 Oct 2022 04:03:24 -0700 (PDT) From: mohamed.omarasaker@arm.com To: meta-arm@lists.yoctoproject.org, Ross.Burton@arm.com Cc: nd@arm.com, Satish Kumar Subject: [PATCH 2/4] arm-bsp/trusted-firmware-m: corstone1000: bump tfm SHA Date: Fri, 14 Oct 2022 12:02:49 +0100 Message-Id: <20221014110251.1766159-3-mohamed.omarasaker@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014110251.1766159-1-mohamed.omarasaker@arm.com> References: <20221014110251.1766159-1-mohamed.omarasaker@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 ; Fri, 14 Oct 2022 11:03:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3965 From: Satish Kumar The patch bumps the tfm SHA to b065a6b28cc6c692b99e4f7e9387d96f51bf4d07 Signed-off-by: Satish Kumar --- .../trusted-firmware-m-corstone1000.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc index 95c49d06..e57b1a97 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc @@ -11,6 +11,22 @@ TFM_PLATFORM_IS_FVP ?= "FALSE" EXTRA_OECMAKE += "-DPLATFORM_IS_FVP=${TFM_PLATFORM_IS_FVP}" EXTRA_OECMAKE += "-DCC312_LEGACY_DRIVER_API_ENABLED=OFF" +SRCBRANCH_tfm = "master" +SRC_URI = "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https;branch=${SRCBRANCH_tfm};name=tfm;destsuffix=git/tfm \ + git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=master;name=tfm-tests;destsuffix=git/tf-m-tests \ + git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=master;name=mbedtls;destsuffix=git/mbedtls \ + git://github.com/mcu-tools/mcuboot.git;protocol=https;branch=main;name=mcuboot;destsuffix=git/mcuboot \ + " + +# Bumping the SHA of TFM is required as multiple changes are needed in the TFM to support the ESRT +# The most crucial change needed is TFM support for UEFI FMP Image Information +SRCREV_tfm = "b065a6b28cc6c692b99e4f7e9387d96f51bf4d07" +SRCREV_mbedtls = "869298bffeea13b205343361b7a7daf2b210e33d" +SRCREV_mcuboot = "c657cbea75f2bb1faf1fceacf972a0537a8d26dd" +SRCREV_tfm-tests = "3e6c52b4b255e4b1343ba6a257a77fa7a976e8fb" +PV .= "+git${SRCPV}" +SRCREV_FORMAT ?= "tfm" + # libmetal LICENSE += "& BSD-3-Clause" LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c" From patchwork Fri Oct 14 11:02:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mohamed.omarasaker@arm.com X-Patchwork-Id: 13887 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 0CE8AC4332F for ; Fri, 14 Oct 2022 11:03:38 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.5774.1665745408075812658 for ; Fri, 14 Oct 2022 04:03:28 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: mohamed.omarasaker@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 E745B13D5; Fri, 14 Oct 2022 04:03:33 -0700 (PDT) Received: from e126544.arm.com (unknown [10.57.36.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 955523F792; Fri, 14 Oct 2022 04:03:26 -0700 (PDT) From: mohamed.omarasaker@arm.com To: meta-arm@lists.yoctoproject.org, Ross.Burton@arm.com Cc: nd@arm.com, Satish Kumar Subject: [PATCH 3/4] arm-bsp/trusted-firmware-m: corstone1000: fix sournce dir of libmetal and openamp Date: Fri, 14 Oct 2022 12:02:50 +0100 Message-Id: <20221014110251.1766159-4-mohamed.omarasaker@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014110251.1766159-1-mohamed.omarasaker@arm.com> References: <20221014110251.1766159-1-mohamed.omarasaker@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 ; Fri, 14 Oct 2022 11:03:38 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3966 From: Satish Kumar The patch corrects the source dir for libmetal and openamp. Devtool modify on tf-m will work after this fix. Signed-off-by: Satish Kumar --- .../trusted-firmware-m/trusted-firmware-m-corstone1000.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc index e57b1a97..3cd1a4bb 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc @@ -32,14 +32,14 @@ LICENSE += "& BSD-3-Clause" LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c" SRC_URI += "git://github.com/OpenAMP/libmetal.git;protocol=https;branch=main;name=libmetal;destsuffix=git/libmetal" SRCREV_libmetal = "f252f0e007fbfb8b3a52b1d5901250ddac96baad" -EXTRA_OECMAKE += "-DLIBMETAL_SRC_PATH=${WORKDIR}/git/libmetal -DLIBMETAL_BIN_PATH=${B}/libmetal-build" +EXTRA_OECMAKE += "-DLIBMETAL_SRC_PATH=${S}/../libmetal -DLIBMETAL_BIN_PATH=${B}/libmetal-build" # OpenAMP LICENSE += "& BSD-2-Clause & BSD-3-Clause" LIC_FILES_CHKSUM += "file://../openamp/LICENSE.md;md5=a8d8cf662ef6bf9936a1e1413585ecbf" SRC_URI += "git://github.com/OpenAMP/open-amp.git;protocol=https;branch=main;name=openamp;destsuffix=git/openamp" SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d" -EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${WORKDIR}/git/openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build" +EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${S}/../openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build" do_install() { install -D -p -m 0644 ${B}/install/outputs/tfm_s_signed.bin ${D}/firmware/tfm_s_signed.bin From patchwork Fri Oct 14 11:02:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mohamed.omarasaker@arm.com X-Patchwork-Id: 13886 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 08A88C433FE for ; Fri, 14 Oct 2022 11:03:38 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.5776.1665745409292441810 for ; Fri, 14 Oct 2022 04:03:29 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: mohamed.omarasaker@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 2AA5A13D5; Fri, 14 Oct 2022 04:03:35 -0700 (PDT) Received: from e126544.arm.com (unknown [10.57.36.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 10CC13F792; Fri, 14 Oct 2022 04:03:27 -0700 (PDT) From: mohamed.omarasaker@arm.com To: meta-arm@lists.yoctoproject.org, Ross.Burton@arm.com Cc: nd@arm.com, Satish Kumar Subject: [PATCH 4/4] arm-bsp/trusted-firmware-m: corstone1000: secure debug code checkout from yocto Date: Fri, 14 Oct 2022 12:02:51 +0100 Message-Id: <20221014110251.1766159-5-mohamed.omarasaker@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014110251.1766159-1-mohamed.omarasaker@arm.com> References: <20221014110251.1766159-1-mohamed.omarasaker@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 ; Fri, 14 Oct 2022 11:03:38 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3967 From: Satish Kumar Instead of checking out code through internal cmake, the patch explicitly checkout the psa-adac code. Signed-off-by: Satish Kumar --- .../trusted-firmware-m-corstone1000.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc index 3cd1a4bb..dc57eacb 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc @@ -41,6 +41,17 @@ SRC_URI += "git://github.com/OpenAMP/open-amp.git;protocol=https;branch=main;nam SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d" EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${S}/../openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build" +# Secure Debug ADAC +LICENSE += "& BSD-3-Clause" +LIC_FILES_CHKSUM += "file://../psa-adac/license.rst;md5=07f368487da347f3c7bd0fc3085f3afa" +SRC_URI += "git://git.trustedfirmware.org/shared/psa-adac.git;protocol=https;branch=master;name=psa-adac;destsuffix=git/psa-adac" +SRCREV_psa-adac = "427923cc0152578d536fb2065154d5d0dd874910" +# Secure debug is disabled by default +EXTRA_OECMAKE += "-DPLATFORM_PSA_ADAC_SECURE_DEBUG=OFF" +EXTRA_OECMAKE += "-DPLATFORM_PSA_ADAC_SOURCE_PATH=${S}/../psa-adac -DPLATFORM_PSA_ADAC_BUILD_PATH=${B}/libpsa-adac-build" + +DEPENDS += "trusted-firmware-a" + do_install() { install -D -p -m 0644 ${B}/install/outputs/tfm_s_signed.bin ${D}/firmware/tfm_s_signed.bin install -D -p -m 0644 ${B}/install/outputs/bl2_signed.bin ${D}/firmware/bl2_signed.bin