Skip to contentSkip to conversation

arm-bsp/tc1: Fix signed u-boot

PATCH Applied Jon Mason 2 participants 3 messages Apr 20, 2023

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/2 arm-bsp/tc1: Fix signed u-boot

Recent changes in upstream u-boot recipes for signed fitimages, have caused the existing code to no longer boot. Add a newly required variable to get it working again. Tested using tc1 FVP.

---
 meta-arm-bsp/conf/machine/include/tc.inc | 1 +
 1 file changed, 1 insertion(+)
meta-arm-bsp/conf/machine/include/tc.inc +1 -0
index f51497de..59a11b27 100644
@@ -21,6 +21,7 @@ UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb"
 UBOOT_SIGN_KEYNAME = "dev_key"
 UBOOT_SIGN_KEYDIR = "${DEPLOY_DIR_IMAGE}/keys"
 FIT_GENERATE_KEYS = "1"
+FIT_SIGN_INDIVIDUAL = "1"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-arm64-ack"
 
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/2 arm-bsp/tc1: Add FVP support

Add tc1 ecosystem FVP and bits to enable in the tc1 machine config file Also, do some hacks to speed things up.

---
 .gitlab-ci.yml                                |  3 +++
 ci/fvps.yml                                   |  5 ++--
 ci/tc1.yml                                    |  3 ++-
 meta-arm-bsp/conf/machine/include/tc.inc      |  5 ++++
 meta-arm-bsp/conf/machine/tc1.conf            | 24 +++++++++++++++++++
 .../recipes-bsp/u-boot/u-boot/tc/bootargs.cfg |  3 ++-
 meta-arm/recipes-devtools/fvp/fvp-tc1.bb      | 11 +++++++++
 7 files changed, 50 insertions(+), 4 deletions(-)
 create mode 100644 meta-arm/recipes-devtools/fvp/fvp-tc1.bb
.gitlab-ci.yml +3 -0
index 8204eaf0..df1f0f5a 100644
@@ -219,6 +219,9 @@ sgi575:
 
 tc1:
   extends: .build
+  parallel:
+    matrix:
+      - TESTING: testimage
   tags:
     - x86_64
 
ci/fvps.yml +3 -2
index e3bc5fe5..58c29d53 100644
@@ -13,7 +13,8 @@ local_conf_header:
 
 target:
   - nativesdk-fvp-base-a-aem
-  - nativesdk-fvp-n1-edge
-  - nativesdk-fvp-sgi575
   - nativesdk-fvp-corstone500
   - nativesdk-fvp-corstone1000
+  - nativesdk-fvp-n1-edge
+  - nativesdk-fvp-sgi575
+  - nativesdk-fvp-tc1
ci/tc1.yml +2 -1
index fd9acbd2..c1aceead 100644
@@ -2,8 +2,9 @@ header:
   version: 11
   includes:
     - ci/base.yml
+    - ci/fvp.yml
 
 machine: tc1
 
 target:
-  - tc-artifacts-image
+  - core-image-minimal
meta-arm-bsp/conf/machine/include/tc.inc +5 -0
index 59a11b27..f84d55c2 100644
@@ -39,3 +39,8 @@ IMAGE_FSTYPES += "cpio.gz"
 INITRAMFS_IMAGE ?= "core-image-minimal"
 
 SERIAL_CONSOLES = "115200;ttyAMA0"
+
+EXTRA_IMAGEDEPENDS += "trusted-firmware-a optee-os"
+# FIXME - there is signed image dependency/race with testimage.
+# This should be fixed in oe-core
+TESTIMAGEDEPENDS:append = " virtual/kernel:do_deploy"
meta-arm-bsp/conf/machine/tc1.conf +24 -0
index 42c5d8d5..f99bfd2b 100644
@@ -5,3 +5,27 @@
 #@DESCRIPTION: Machine configuration for TC1
 
 require conf/machine/include/tc.inc
+
+TEST_TARGET = "OEFVPSerialTarget"
+TEST_SUITES = "linuxboot"
+
+# FVP Config
+FVP_PROVIDER ?= "fvp-tc1-native"
+FVP_EXE ?= "FVP_TC1"
+
+# FVP Parameters
+FVP_CONFIG[css.scp.ROMloader.fname] ?= "${DEPLOY_DIR_IMAGE}/scp_romfw.bin"
+FVP_CONFIG[css.trustedBootROMloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1-tc.bin"
+FVP_CONFIG[board.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/fip_gpt-tc.bin"
+
+#FVP_CONFIG[board.hostbridge.userNetworking] ?= "true"
+#FVP_CONFIG[board.hostbridge.userNetPorts] ?= "8022=22"
+#smsc ethernet takes a very long time to come up.  disable now to prevent testimage timeout
+#FVP_CONFIG[board.smsc_91c111.enabled] ?= "1"
+
+FVP_CONSOLE = "terminal_s1"
+FVP_TERMINALS[soc.terminal_s0] ?= "Secure Console"
+FVP_TERMINALS[soc.terminal_s1] ?= "Console"
+
+# Boot image
+FVP_DATA ?= "board.dram=${DEPLOY_DIR_IMAGE}/fitImage-core-image-minimal-tc1-tc1@0x20000000"
meta-arm-bsp/recipes-bsp/u-boot/u-boot/tc/bootargs.cfg +2 -1
index 8c316024..a06c44ff 100644
@@ -1,2 +1,3 @@
 CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyAMA0 debug user_debug=31 earlycon=pl011,0x7ff80000 loglevel=9 androidboot.hardware=total_compute androidboot.boot_devices=1c050000.mmci ip=dhcp androidboot.selinux=permissive allow_mismatched_32bit_el0"
+CONFIG_BOOTARGS="console=ttyAMA0 debug user_debug=31 earlycon=pl011,0x7ff80000 loglevel=9 androidboot.hardware=total_compute androidboot.boot_devices=1c050000.mmci androidboot.selinux=permissive allow_mismatched_32bit_el0"
+CONFIG_BOOTDELAY=0
meta-arm/recipes-devtools/fvp/fvp-tc1.bb new file +11 -0
new file mode 100644
index 00000000..4a1295cd
@@ -0,0 +1,11 @@
+require fvp-ecosystem.inc
+
+MODEL = "TC1"
+MODEL_CODE = "FVP_TC1"
+PV = "11.18.28_Linux64"
+
+SRC_URI = "https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/TotalCompute/Total%20Compute%20Update%202022/${MODEL_CODE}_${PV_URL}.tgz;subdir=${BP}"
+SRC_URI[sha256sum] = "3a2b32ecf34dc9581482d6fc682a9378ba6ed151ea9b68914b4ebad39fb5cacf"
+
+LIC_FILES_CHKSUM = "file://license_terms/license_agreement.txt;md5=a50d186fffa51ed55599183aad911298 \
+                    file://license_terms/third_party_licenses/third_party_licenses.txt;md5=34a1ba318d745f05e6197def68ea5411"
Signature · 1 line
2.25.1
Applied
#2 lore raw
In reply to Jon Mason
Quoted 3 lines · Jon Mason

Recent changes in upstream u-boot recipes for signed fitimages, have caused the existing code to no longer boot. Add a newly required variable to get it working again. Tested using tc1 FVP.

Applied, thanks!

[1/2] arm-bsp/tc1: Fix signed u-boot

      commit: 173c9d887e13a20a0fe337c55dbfeeb975514956
[2/2] arm-bsp/tc1: Add FVP support
      commit: 2d8bc0be8e25b09c06ebc8792b306c951d18b8fc

Best regards,

Signature · 1 line
Jon Mason <[email protected]>