diff mbox series

[1/4] bsp: Move Corstone-1000 U-Boot configuration entries

Message ID 20240214140303.38535-2-drew.reed@arm.com
State New
Headers show
Series Corstone-1000 Configuration changes | expand

Commit Message

drew.reed@arm.com Feb. 14, 2024, 2:03 p.m. UTC
From: Drew Reed <Drew.Reed@arm.com>

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 <Drew.Reed@arm.com>
---
 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 mbox series

Patch

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
 }