Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor bugfix and refine of u-boot #550

Merged
merged 5 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From b38646e913886c05ec35ccffe7071cfeed5b5161 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Li Hua Qian <huaqian.li@siemens.com>
Date: Fri, 22 Mar 2024 10:24:26 +0800
Subject: [PATCH] arm: dts: iot2050: Disable lock-step mode for all iot2050
Expand All @@ -18,7 +18,7 @@ Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi b/arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi
index 42adb881..48f187f2 100644
index 42adb8815f38..48f187f23cf8 100644
--- a/arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi
+++ b/arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi
@@ -9,11 +9,6 @@
Expand All @@ -34,7 +34,7 @@ index 42adb881..48f187f2 100644
cp2102n_reset_pin_default: cp2102n-reset-default-pins {
pinctrl-single,pins = <
diff --git a/arch/arm/dts/k3-am65-iot2050-common.dtsi b/arch/arm/dts/k3-am65-iot2050-common.dtsi
index 279d97a1..f4f6aeba 100644
index 279d97a16c7a..f4f6aeba2586 100644
--- a/arch/arm/dts/k3-am65-iot2050-common.dtsi
+++ b/arch/arm/dts/k3-am65-iot2050-common.dtsi
@@ -599,3 +599,8 @@
Expand All @@ -47,7 +47,7 @@ index 279d97a1..f4f6aeba 100644
+ ti,cluster-mode = <0>;
+};
diff --git a/arch/arm/dts/k3-am6528-iot2050-basic.dts b/arch/arm/dts/k3-am6528-iot2050-basic.dts
index be9c8db4..87928ff2 100644
index be9c8db4c43a..87928ff28214 100644
--- a/arch/arm/dts/k3-am6528-iot2050-basic.dts
+++ b/arch/arm/dts/k3-am6528-iot2050-basic.dts
@@ -22,8 +22,3 @@
Expand All @@ -59,6 +59,3 @@ index be9c8db4..87928ff2 100644
- /* lock-step mode not supported on this board */
- ti,cluster-mode = <0>;
-};
--
2.30.2

32 changes: 0 additions & 32 deletions recipes-bsp/u-boot/files/keys/x509-sysfw-template.txt

This file was deleted.

13 changes: 3 additions & 10 deletions recipes-bsp/u-boot/files/rules.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@ SET_CROSS_BUILD_TOOLS=CROSS_BUILD_TOOLS=y
endif

override_dh_auto_build:
if [ -e keys ]; then \
if [ "${SB_SIGN}" = "1" ]; then \
tools/key2dtsi.py -c -s keys/custMpk.pem arch/arm/dts/custMpk.dtsi; \
openssl x509 -in keys/custMpk.crt -out custMpk.crt.pem -outform der; \
rm -f custMpk.esl; \
efisiglist -a -c custMpk.crt.pem -o custMpk.esl; \
rm -f ubootefi.var; \
tools/efivar.py set -i ubootefi.var -n PK -d custMpk.esl -t file; \
tools/efivar.py set -i ubootefi.var -n KEK -d custMpk.esl -t file; \
tools/efivar.py set -i ubootefi.var -n db -d custMpk.esl -t file; \
fi
$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_CONFIG}
$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN} \
Expand All @@ -29,10 +22,10 @@ override_dh_auto_build:
else \
./scripts/get_default_envs.sh >u-boot-initial-env; \
fi
$(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools
if [ -e keys ]; then \
if [ "${SB_SIGN}" = "1" ]; then \
tools/iot2050-sign-fw.sh keys/custMpk.pem ${FIRMWARE_SECURE_VER}; \
fi
$(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools

override_dh_auto_install:
mv tools/env/lib.a tools/env/libubootenv.a
Expand Down
6 changes: 4 additions & 2 deletions recipes-bsp/u-boot/u-boot-iot2050.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ SRC_URI:append:secureboot = " \
file://keys/custMpk.crt \
file://keys/custMpk.key \
file://keys/custMpk.pem \
file://keys/x509-sysfw-template.txt \
file://secure-boot.cfg"
SRC_URI:append:otpcmd = " \
file://otpcmd.cfg"
Expand All @@ -42,8 +41,11 @@ DEBIAN_BUILD_DEPENDS:append:secureboot = ", python3-pycryptodome:native, \
DEPENDS:append:otpcmd = " secure-boot-otp-provisioning"
DEBIAN_BUILD_DEPENDS:append:otpcmd = ", secure-boot-otp-provisioning"

SB_SIGN = "0"
SB_SIGN:secureboot = "1"

TEMPLATE_FILES += "rules.tmpl"
TEMPLATE_VARS += "FIRMWARE_SECURE_VER"
TEMPLATE_VARS += "FIRMWARE_SECURE_VER SB_SIGN"

U_BOOT_CONFIG_PACKAGE = "1"

Expand Down