From patchwork Wed Feb 14 14:03:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: drew.reed@arm.com X-Patchwork-Id: 39286 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 2AB23C48BC3 for ; Wed, 14 Feb 2024 14:03:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.41637.1707919394703235827 for ; Wed, 14 Feb 2024 06:03:14 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: drew.reed@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 5E6C11FB; Wed, 14 Feb 2024 06:03:55 -0800 (PST) Received: from C02DP1BVML7H.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7A2F43F5A1; Wed, 14 Feb 2024 06:03:13 -0800 (PST) From: drew.reed@arm.com To: meta-arm@lists.yoctoproject.org, Ross.Burton@arm.com Cc: nd@arm.com, Drew Reed Subject: [PATCH 1/4] bsp: Move Corstone-1000 U-Boot configuration entries Date: Wed, 14 Feb 2024 14:03:00 +0000 Message-ID: <20240214140303.38535-2-drew.reed@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240214140303.38535-1-drew.reed@arm.com> References: <20240214140303.38535-1-drew.reed@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 ; Wed, 14 Feb 2024 14:03:22 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5380 From: Drew Reed Moved the U-Boot configuration items from the machine definition to the Corstone-1000 specific U-Boot append file as it makes it easier to the U-Boot configuration for a machine in one place and to make it more consistant with other platforms. Signed-off-by: Drew Reed --- meta-arm-bsp/conf/machine/include/corstone1000.inc | 11 ----------- .../recipes-bsp/images/corstone1000-image.bb | 5 +++++ .../recipes-bsp/u-boot/u-boot-corstone1000.inc | 12 ++++++++++-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm-bsp/conf/machine/include/corstone1000.inc index 06b630a5..a1e67c21 100644 --- a/meta-arm-bsp/conf/machine/include/corstone1000.inc +++ b/meta-arm-bsp/conf/machine/include/corstone1000.inc @@ -20,22 +20,11 @@ TFA_BL2_RE_IMAGE_LOAD_ADDRESS = "0x62353000" TFA_BL2_RE_SIGN_BIN_SIZE = "0x2d000" TFA_FIP_RE_IMAGE_LOAD_ADDRESS = "0x68130000" TFA_FIP_RE_SIGN_BIN_SIZE = "0x00200000" -RE_LAYOUT_WRAPPER_VERSION = "0.0.7" -TFM_SIGN_PRIVATE_KEY = "${libdir}/tfm-scripts/root-RSA-3072_1.pem" -RE_IMAGE_OFFSET = "0x1000" # u-boot PREFERRED_VERSION_u-boot ?= "2023.07%" EXTRA_IMAGEDEPENDS += "u-boot" -UBOOT_CONFIG ??= "EFI" -UBOOT_CONFIG[EFI] = "corstone1000_defconfig" -UBOOT_ENTRYPOINT = "0x80000000" -UBOOT_LOADADDRESS = "0x80000000" -UBOOT_BOOTARGS = "earlycon=pl011,0x1a510000 console=ttyAMA0 loglevel=9" -UBOOT_ARCH = "arm" -UBOOT_EXTLINUX = "0" - #optee PREFERRED_VERSION_optee-os ?= "4.1.%" EXTRA_IMAGEDEPENDS += "optee-os" diff --git a/meta-arm-bsp/recipes-bsp/images/corstone1000-image.bb b/meta-arm-bsp/recipes-bsp/images/corstone1000-image.bb index 714a57cb..e7d00596 100644 --- a/meta-arm-bsp/recipes-bsp/images/corstone1000-image.bb +++ b/meta-arm-bsp/recipes-bsp/images/corstone1000-image.bb @@ -17,6 +17,11 @@ UEFI_FIRMWARE_BINARY = "${PN}-${MACHINE}.${CAPSULE_IMGTYPE}" UEFI_CAPSULE_CONFIG = "${THISDIR}/files/${PN}-capsule-update-image.json" CAPSULE_IMGTYPE = "wic" +# TF-X settings for signing host images +RE_LAYOUT_WRAPPER_VERSION = "0.0.7" +TFM_SIGN_PRIVATE_KEY = "${libdir}/tfm-scripts/root-RSA-3072_1.pem" +RE_IMAGE_OFFSET = "0x1000" + do_sign_images() { # Sign TF-A BL2 sign_host_image ${RECIPE_SYSROOT}/firmware/${TFA_BL2_BINARY} \ diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc index cf0640a3..2585ff25 100644 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc @@ -1,10 +1,18 @@ # Corstone1000 specific U-boot support -DEPENDS:append = " gnutls-native openssl-native efitools-native" +DEPENDS:append = " openssl-native efitools-native" CORSTONE1000_DEVICE_TREE:corstone1000-mps3 = "corstone1000-mps3" CORSTONE1000_DEVICE_TREE:corstone1000-fvp = "corstone1000-fvp" EXTRA_OEMAKE:append = ' DEVICE_TREE=${CORSTONE1000_DEVICE_TREE}' +UBOOT_CONFIG ??= "EFI" +UBOOT_CONFIG[EFI] = "corstone1000_defconfig" +UBOOT_ENTRYPOINT = "0x80000000" +UBOOT_LOADADDRESS = "0x80000000" +UBOOT_BOOTARGS = "${LINUX_KERNEL_ARGS} loglevel=9" +UBOOT_ARCH = "arm" +UBOOT_EXTLINUX = "0" + SYSROOT_DIRS:append = " /boot" SRC_URI:append = " \ @@ -52,7 +60,7 @@ SRC_URI:append = " \ file://0042-corstone1000-enable-virtio-net-support.patch \ " -do_configure:append(){ +do_configure:append() { openssl req -x509 -sha256 -newkey rsa:2048 -subj /CN=CRT/ -keyout ${B}/CRT.key -out ${B}/CRT.crt -nodes -days 365 cert-to-efi-sig-list ${B}/CRT.crt ${B}/corstone1000_defconfig/CRT.esl }