Skip to contentSkip to conversation

Add support for AM62x-SK HS-FS devices

PATCH Superseded Dario Binacchi 7 participants 84 messages Feb 17, 2024 – Feb 25, 2024

v4 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

v4 cover Add support for AM62x-SK HS-FS devices

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Dario Binacchi (20):
configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
boot/ti-k3-r5-loader: bump to version 2024.01 boot/ti-k3-core-secdev: new package boot/ti-k3-image-gen: manage HS hardware package/python-jsonschema: add host variant package/python-attrs: add host variant package/python-referencing: add host variant package/python-rpds-py: add host variant package/python-jsonschema-specifications: add host variant boot/ti-k3-r5-loader: set binman environment boot/uboot: set BINMAN_INDIRS for TI K3 DM configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1
boot: move ti-k3-* packages to 'ti-k3' directory boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

 DEVELOPERS                                    |  1 +
 board/ti/am62x-sk/genimage.cfg                |  7 +-
 board/ti/am62x-sk/post-build.sh               | 49 ++++++++++++
 board/ti/am62x-sk/post-image.sh               |  5 ++
 boot/Config.in                                |  4 +-
 boot/ti-k3-image-gen/Config.in                | 77 -------------------
 boot/ti-k3/Config.in                          | 59 ++++++++++++++
 boot/ti-k3/common.mk                          |  1 +
 .../{ => ti-k3}/ti-k3-boot-firmware/Config.in |  0
 .../ti-k3-boot-firmware.hash                  |  0
 .../ti-k3-boot-firmware.mk                    |  0
 boot/ti-k3/ti-k3-core-secdev/Config.in        |  9 +++
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash  |  3 +
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk    | 22 ++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 25 ++++++
 .../ti-k3-image-gen/ti-k3-image-gen.hash      |  0
 .../ti-k3-image-gen/ti-k3-image-gen.mk        | 20 ++++-
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in    |  4 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash      |  2 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.mk        | 16 +++-
 boot/uboot/Config.in                          |  7 +-
 boot/uboot/uboot.mk                           |  3 +-
 configs/ti_am62x_sk_defconfig                 | 23 +++---
 configs/ti_am64x_sk_defconfig                 |  8 +-
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       |  5 ++
 .../python-jsonschema/python-jsonschema.mk    |  6 ++
 .../python-referencing/python-referencing.mk  |  5 ++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 29 files changed, 263 insertions(+), 105 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
 create mode 100644 boot/ti-k3/ti-k3-image-gen/Config.in
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (67%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (97%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (54%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (85%)
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v4 1/20 configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting

Checking the output of the command git grep PLATFORM | grep k3, we can found the proper settings for the optee-os package:

.github/workflows/ci.yml: _make PLATFORM=k3-am62x
.github/workflows/ci.yml: _make PLATFORM=k3-am62x CFG_ARM64_core=y
...
core/arch/arm/plat-k3/conf.mk:ifneq (,$(filter ${PLATFORM_FLAVOR},am65x j721e j784s4 am64x am62x))

---

Added in v4

---
 configs/ti_am62x_sk_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configs/ti_am62x_sk_defconfig +2 -1
index f88252a89c68..fde6f8f5636a 100644
@@ -21,7 +21,8 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
-BR2_TARGET_OPTEE_OS_PLATFORM="k3"
+BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
+BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v4 1/20
#2 lore raw

Re: [Buildroot] [PATCH v4 01/20] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting

Hi Dario,

Quoted 31 lines · Dario Binacchi

Checking the output of the command git grep PLATFORM | grep k3, we can found the proper settings for the optee-os package:

.github/workflows/ci.yml:          _make PLATFORM=k3-am62x .github/workflows/ci.yml:          _make PLATFORM=k3-am62x CFG_ARM64_core=y
...
core/arch/arm/plat-k3/conf.mk:ifneq (,$(filter ${PLATFORM_FLAVOR},am65x j721e j784s4 am64x am62x))

---

Added in v4

---
 configs/ti_am62x_sk_defconfig | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
configs/ti_am62x_sk_defconfig +0 -0
index f88252a89c68..fde6f8f5636a 100644
@@ -21,7 +21,8 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"

 BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y

configs/ti_am62x_sk_defconfig +2 -1
-BR2_TARGET_OPTEE_OS_PLATFORM="k3"
+BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
+BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
Quoted 3 lines

 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y

this looks even more complete than https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH v4 01/20] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting

In reply to Dario Binacchi

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 7 lines

Checking the output of the command git grep PLATFORM | grep k3, we can found the proper settings for the optee-os package:

.github/workflows/ci.yml: _make PLATFORM=k3-am62x
.github/workflows/ci.yml: _make PLATFORM=k3-am62x CFG_ARM64_core=y
...
core/arch/arm/plat-k3/conf.mk:ifneq (,$(filter ${PLATFORM_FLAVOR},am65x j721e j784s4 am64x am62x))

Setting BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR doesn't seems necessary since optee-os Makefile can extract it from BR2_TARGET_OPTEE_OS_PLATFORM [1].

[1]
https://git.yoctoproject.org/meta-ti/commit/?id=912983dd562ba5f009a4db34e8abe3810c8ed7ac

Best regards,
Romain

Quoted 18 lines

---

Added in v4

---
 configs/ti_am62x_sk_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configs/ti_am62x_sk_defconfig +0 -0
index f88252a89c68..fde6f8f5636a 100644

configs/ti_am62x_sk_defconfig BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3" · line 28

Quoted 9 lines
configs/ti_am62x_sk_defconfig +2 -1
@@ -21,7 +21,8 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
-BR2_TARGET_OPTEE_OS_PLATFORM="k3"
+BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
+BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

PATCH v4 2/20 configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting

In reply to Dario Binacchi

Checking the output of the command git grep PLATFORM | grep k3, we can found the proper settings for the optee-os package:

.github/workflows/ci.yml: _make PLATFORM=k3-am64x
.github/workflows/ci.yml: _make PLATFORM=k3-am64x CFG_ARM64_core=y
...
core/arch/arm/plat-k3/conf.mk:ifneq (,$(filter ${PLATFORM_FLAVOR},am65x j721e j784s4 am64x am62x))

---

Added in v4

---
 configs/ti_am64x_sk_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configs/ti_am64x_sk_defconfig +2 -1
index 4bfd31f0c8d3..98476c88626b 100644
@@ -21,7 +21,8 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
-BR2_TARGET_OPTEE_OS_PLATFORM="k3"
+BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
+BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v4 2/20
#5 lore raw

Re: [Buildroot] [PATCH v4 02/20] configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting

Hi Dario,

Quoted 31 lines · Dario Binacchi

Checking the output of the command git grep PLATFORM | grep k3, we can found the proper settings for the optee-os package:

.github/workflows/ci.yml:          _make PLATFORM=k3-am64x .github/workflows/ci.yml:          _make PLATFORM=k3-am64x CFG_ARM64_core=y
...
core/arch/arm/plat-k3/conf.mk:ifneq (,$(filter ${PLATFORM_FLAVOR},am65x j721e j784s4 am64x am62x))

---

Added in v4

---
 configs/ti_am64x_sk_defconfig | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
configs/ti_am64x_sk_defconfig +0 -0
index 4bfd31f0c8d3..98476c88626b 100644
@@ -21,7 +21,8 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"

 BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y

configs/ti_am64x_sk_defconfig +2 -1
-BR2_TARGET_OPTEE_OS_PLATFORM="k3"
+BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
+BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
Quoted 3 lines

 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y

again, more complete than https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH v4 3/20 configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader version

In reply to Dario Binacchi

Commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig") forgot to specify the ti-k3-r5-loader, so do that now.

When the defconfig was added, the default version was 2022.10, so use it.

---

Added in v4

---
 configs/ti_am62x_sk_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/ti_am62x_sk_defconfig +2 -0
index fde6f8f5636a..a4cffe09ce72 100644
@@ -26,6 +26,8 @@ BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
 BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

PATCH v4 4/20 configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader version

In reply to Dario Binacchi

Commit 6b2329bb80 ("configs/ti_am64x_sk: new defconfig") forgot to specify the ti-k3-r5-loader, so do that now.

When the defconfig was added, the default version was 2022.10, so use it.

---

Added in v4

---
 configs/ti_am64x_sk_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/ti_am64x_sk_defconfig +2 -0
index 98476c88626b..5fd9653b5b8f 100644
@@ -26,6 +26,8 @@ BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
 BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

PATCH v4 5/20 boot/ti-k3-r5-loader: bump to version 2024.01

In reply to Dario Binacchi

All in-tree configs with the ti-k3-r5 bootloader use a custom version, so this patch is mostly for the menuconfig default version

---

Added in v4

---
 boot/ti-k3-r5-loader/Config.in            | 4 ++--
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
boot/ti-k3-r5-loader/Config.in +2 -2
index 8c8368a1a5a8..5f86c045c99f 100644
@@ -16,7 +16,7 @@ choice
 	  here as it is used to build the main U-Boot package.
 
 config BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION
-	bool "2022.10"
+	bool "2024.01"
 
 config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
 	bool "Custom version"
@@ -60,7 +60,7 @@ endif
 
 config BR2_TARGET_TI_K3_R5_LOADER_VERSION
 	string
-	default "2022.10"	if BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION
+	default "2024.01"	if BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION
 	default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE \
 		if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
 	default "custom"	if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
boot/ti-k3-r5-loader/ti-k3-r5-loader.hash +1 -1
index c5d1cb8e09f0..fbe5d215409d 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8  u-boot-2022.10.tar.bz2
+sha256  b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3  u-boot-2024.01.tar.bz2
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Licenses/gpl-2.0.txt
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

PATCH v4 6/20 boot/ti-k3-core-secdev: new package

In reply to Dario Binacchi

This is a security development package containing tools for High-Security(HS) TI K3 platform devices.

---

Changes in v4:
- Remove the trailing '/' at the end of the url in the help of Config.in
- Fixed license issues
- Use $(BINARIES_DIR)/ti-k3-core-secdev as the directory where to install files.

---
 DEVELOPERS                                    |  1 +
 boot/Config.in                                |  1 +
 boot/ti-k3-core-secdev/Config.in              |  9 ++++++++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash |  3 +++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk   | 22 +++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 boot/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk
DEVELOPERS +1 -0
index 0d12c3abcb11..33d99ab2440f 100644
@@ -753,6 +753,7 @@ F:	package/xinetd/
 N:	Dario Binacchi <[email protected]>
 F:	board/bsh/
 F:	board/stmicroelectronics/stm32f769-disco/
+F:	boot/ti-k3-core-secdev/
 F:	configs/imx8mn_bsh_smm_s2_defconfig
 F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
 F:	configs/stm32f769_disco_sd_defconfig
boot/Config.in +1 -0
index e5fdf7ad439e..18a7d268f95a 100644
@@ -20,6 +20,7 @@ source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
 source "boot/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
boot/ti-k3-core-secdev/Config.in new file +9 -0
new file mode 100644
index 000000000000..f7b4e2962042
@@ -0,0 +1,9 @@
+config BR2_TARGET_TI_K3_CORE_SECDEV
+	bool "ti-k3-core-secdev"
+	depends on BR2_aarch64
+	help
+	  This package downloads and installs development tools for
+	  High-Security(HS) TI K3 platforms (which include AM62x,
+	  AM64x, AM65x and more).
+
+	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
boot/ti-k3-core-secdev/ti-k3-core-secdev.hash new file +3 -0
new file mode 100644
index 000000000000..e3074a398d62
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  b6d3bca0d561d055c6869c5564b06f2fb1b9f67e4ef180c2baf8a14a6a6afa06  core-secdev-k3-08.06.00.007.tar.xz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +22 -0
new file mode 100644
index 000000000000..f7655a0fefc8
@@ -0,0 +1,22 @@
+################################################################################
+#
+# ti-k3-core-secdev
+#
+################################################################################
+
+TI_K3_CORE_SECDEV_VERSION = 08.06.00.007
+TI_K3_CORE_SECDEV_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_K3_CORE_SECDEV_SOURCE = core-secdev-k3-$(TI_K3_CORE_SECDEV_VERSION).tar.xz
+TI_K3_CORE_SECDEV_INSTALL_IMAGES = YES
+TI_K3_CORE_SECDEV_LICENSE = BSD-3-Clause
+TI_K3_CORE_SECDEV_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+
+TI_K3_CORE_SECDEV_INSTALL_DIR = $(BINARIES_DIR)/ti-k3-core-secdev
+
+define TI_K3_CORE_SECDEV_INSTALL_IMAGES_CMDS
+	mkdir -p $(TI_K3_CORE_SECDEV_INSTALL_DIR)
+	cp -dpfr $(@D)/keys $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+	cp -dpfr $(@D)/scripts $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw

Re: [Buildroot] [PATCH v4 06/20] boot/ti-k3-core-secdev: new package

Hello Dario,

Quoted 4 lines · Dario Binacchi

This is a security development package containing tools for High-Security(HS) TI K3 platform devices.

as I understand secdev package is not required for binman-based U-Boot deployments starting from v2023.10.

So what is the point of introducing the package now if you update U-Boot to v2024.01?

I belive it's as legacy as ti-k3-image-gen (which you are fixing) but Romain's patchset removed the package and, quite successfully, from the perspective of building for HS variants.

Quoted 97 lines

---

Changes in v4:
- Remove the trailing '/' at the end of the url in the help of Config.in
- Fixed license issues
- Use $(BINARIES_DIR)/ti-k3-core-secdev as the directory where to install files.

---
 DEVELOPERS                                    |  1 + boot/Config.in                                |  1 + boot/ti-k3-core-secdev/Config.in              |  9 ++++++++ boot/ti-k3-core-secdev/ti-k3-core-secdev.hash |  3 +++ boot/ti-k3-core-secdev/ti-k3-core-secdev.mk   | 22 +++++++++++++++++++

 5 files changed, 36 insertions(+)

 create mode 100644 boot/ti-k3-core-secdev/Config.in create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk

DEVELOPERS +0 -0
index 0d12c3abcb11..33d99ab2440f 100644
@@ -753,6 +753,7 @@ F:	package/xinetd/

 N: Dario Binacchi <[email protected]>
 F: board/bsh/
 F: board/stmicroelectronics/stm32f769-disco/
+F: boot/ti-k3-core-secdev/
 F: configs/imx8mn_bsh_smm_s2_defconfig
 F: configs/imx8mn_bsh_smm_s2_pro_defconfig
 F: configs/stm32f769_disco_sd_defconfig

boot/Config.in +0 -0
index e5fdf7ad439e..18a7d268f95a 100644
@@ -20,6 +20,7 @@ source "boot/s500-bootloader/Config.in"

 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
 source "boot/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"

boot/ti-k3-core-secdev/Config.in new file +9 -0
new file mode 100644
index 000000000000..f7b4e2962042
@@ -0,0 +1,9 @@
+config BR2_TARGET_TI_K3_CORE_SECDEV
+	bool "ti-k3-core-secdev"
+	depends on BR2_aarch64
+	help
+	  This package downloads and installs development tools for
+	  High-Security(HS) TI K3 platforms (which include AM62x,
+	  AM64x, AM65x and more).
+
+	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
boot/ti-k3-core-secdev/ti-k3-core-secdev.hash new file +3 -0
new file mode 100644
index 000000000000..e3074a398d62
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  b6d3bca0d561d055c6869c5564b06f2fb1b9f67e4ef180c2baf8a14a6a6afa06  core-secdev-k3-08.06.00.007.tar.xz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +22 -0
new file mode 100644
index 000000000000..f7655a0fefc8
@@ -0,0 +1,22 @@
+################################################################################
+#
+# ti-k3-core-secdev
+#
+################################################################################
+
+TI_K3_CORE_SECDEV_VERSION = 08.06.00.007
+TI_K3_CORE_SECDEV_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_K3_CORE_SECDEV_SOURCE = core-secdev-k3-$(TI_K3_CORE_SECDEV_VERSION).tar.xz
+TI_K3_CORE_SECDEV_INSTALL_IMAGES = YES
+TI_K3_CORE_SECDEV_LICENSE = BSD-3-Clause
+TI_K3_CORE_SECDEV_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+
+TI_K3_CORE_SECDEV_INSTALL_DIR = $(BINARIES_DIR)/ti-k3-core-secdev
+
+define TI_K3_CORE_SECDEV_INSTALL_IMAGES_CMDS
+	mkdir -p $(TI_K3_CORE_SECDEV_INSTALL_DIR)
+	cp -dpfr $(@D)/keys $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+	cp -dpfr $(@D)/scripts $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw

Re: [Buildroot] [PATCH v4 06/20] boot/ti-k3-core-secdev: new package

Hello Alexander,

Quoted 12 lines · Alexander Sverdlin

Hello Dario,

Quoted 4 lines · Dario Binacchi

This is a security development package containing tools for High-Security(HS) TI K3 platform devices.

as I understand secdev package is not required for binman-based U-Boot deployments starting from v2023.10.

Quoted 6 lines

So what is the point of introducing the package now if you update U-Boot to v2024.01?

I belive it's as legacy as ti-k3-image-gen (which you are fixing) but Romain's patchset removed the package and, quite successfully, from the perspective of building for HS variants.

The series is a continuation of what I submitted for the first time at the end of November when I still
didn't know that Binman made it possible to do without external tools. I haven't removed it just to give
a complete overview of the patches available from then until now. In the next version, I will remove them,
or perhaps, in the event that a single version with Romain's patches is chosen, they will not be selected.

Thanks and regards,
Dario

Quoted 102 lines
Quoted 88 lines

---

Changes in v4:
- Remove the trailing '/' at the end of the url in the help of Config.in
- Fixed license issues
- Use $(BINARIES_DIR)/ti-k3-core-secdev as the directory where to install files.

---
 DEVELOPERS                                    |  1 +
 boot/Config.in                                |  1 +
 boot/ti-k3-core-secdev/Config.in              |  9 ++++++++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash |  3 +++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk   | 22 +++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 boot/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk
DEVELOPERS +1 -0
index 0d12c3abcb11..33d99ab2440f 100644
@@ -753,6 +753,7 @@ F:        package/xinetd/
 N:   Dario Binacchi <[email protected]>
 F:   board/bsh/
 F:   board/stmicroelectronics/stm32f769-disco/
+F:   boot/ti-k3-core-secdev/
 F:   configs/imx8mn_bsh_smm_s2_defconfig
 F:   configs/imx8mn_bsh_smm_s2_pro_defconfig
 F:   configs/stm32f769_disco_sd_defconfig
boot/Config.in +1 -0
index e5fdf7ad439e..18a7d268f95a 100644
@@ -20,6 +20,7 @@ source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
 source "boot/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
boot/ti-k3-core-secdev/Config.in new file +9 -0
new file mode 100644
index 000000000000..f7b4e2962042
@@ -0,0 +1,9 @@
+config BR2_TARGET_TI_K3_CORE_SECDEV
+     bool "ti-k3-core-secdev"
+     depends on BR2_aarch64
+     help
+       This package downloads and installs development tools for
+       High-Security(HS) TI K3 platforms (which include AM62x,
+       AM64x, AM65x and more).
+
+       https://git.ti.com/cgit/security-development-tools/core-secdev-k3
boot/ti-k3-core-secdev/ti-k3-core-secdev.hash new file +3 -0
new file mode 100644
index 000000000000..e3074a398d62
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  b6d3bca0d561d055c6869c5564b06f2fb1b9f67e4ef180c2baf8a14a6a6afa06  core-secdev-k3-08.06.00.007.tar.xz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +12 -0
new file mode 100644
index 000000000000..f7655a0fefc8
@@ -0,0 +1,22 @@
+################################################################################
+#
+# ti-k3-core-secdev
+#
+################################################################################
+
+TI_K3_CORE_SECDEV_VERSION = 08.06.00.007
+TI_K3_CORE_SECDEV_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_K3_CORE_SECDEV_SOURCE = core-secdev-k3-$(TI_K3_CORE_SECDEV_VERSION).tar.xz
+TI_K3_CORE_SECDEV_INSTALL_IMAGES = YES
+TI_K3_CORE_SECDEV_LICENSE = BSD-3-Clause
+TI_K3_CORE_SECDEV_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html

boot/ti-k3-core-secdev/ti-k3-core-secdev.mk line 22

Quoted 10 lines
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +10 -0
+
+TI_K3_CORE_SECDEV_INSTALL_DIR = $(BINARIES_DIR)/ti-k3-core-secdev
+
+define TI_K3_CORE_SECDEV_INSTALL_IMAGES_CMDS
+     mkdir -p $(TI_K3_CORE_SECDEV_INSTALL_DIR)
+     cp -dpfr $(@D)/keys $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+     cp -dpfr $(@D)/scripts $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+endef
+
+$(eval $(generic-package))

--
Alexander Sverdlin.

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#12 lore raw

Re: [Buildroot] [PATCH v4 06/20] boot/ti-k3-core-secdev: new package

In reply to Dario Binacchi

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 2 lines

This is a security development package containing tools for High-Security(HS) TI K3 platform devices.

Note: this tool can also handle TI "legacy" platform such AM57xx or AM43xx (not sure we really want do that).

Can you try without this package when using binman? This tool doesn't seems "future proof".

http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 90 lines

---

Changes in v4:
- Remove the trailing '/' at the end of the url in the help of Config.in
- Fixed license issues
- Use $(BINARIES_DIR)/ti-k3-core-secdev as the directory where to install files.

---
 DEVELOPERS                                    |  1 +
 boot/Config.in                                |  1 +
 boot/ti-k3-core-secdev/Config.in              |  9 ++++++++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash |  3 +++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk   | 22 +++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 boot/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk
DEVELOPERS +1 -0
index 0d12c3abcb11..33d99ab2440f 100644
@@ -753,6 +753,7 @@ F:	package/xinetd/
 N:	Dario Binacchi <[email protected]>
 F:	board/bsh/
 F:	board/stmicroelectronics/stm32f769-disco/
+F:	boot/ti-k3-core-secdev/
 F:	configs/imx8mn_bsh_smm_s2_defconfig
 F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
 F:	configs/stm32f769_disco_sd_defconfig
boot/Config.in +1 -0
index e5fdf7ad439e..18a7d268f95a 100644
@@ -20,6 +20,7 @@ source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
 source "boot/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
boot/ti-k3-core-secdev/Config.in new file +9 -0
new file mode 100644
index 000000000000..f7b4e2962042
@@ -0,0 +1,9 @@
+config BR2_TARGET_TI_K3_CORE_SECDEV
+	bool "ti-k3-core-secdev"
+	depends on BR2_aarch64
+	help
+	  This package downloads and installs development tools for
+	  High-Security(HS) TI K3 platforms (which include AM62x,
+	  AM64x, AM65x and more).
+
+	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
boot/ti-k3-core-secdev/ti-k3-core-secdev.hash new file +3 -0
new file mode 100644
index 000000000000..e3074a398d62
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  b6d3bca0d561d055c6869c5564b06f2fb1b9f67e4ef180c2baf8a14a6a6afa06  core-secdev-k3-08.06.00.007.tar.xz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +12 -0
new file mode 100644
index 000000000000..f7655a0fefc8
@@ -0,0 +1,22 @@
+################################################################################
+#
+# ti-k3-core-secdev
+#
+################################################################################
+
+TI_K3_CORE_SECDEV_VERSION = 08.06.00.007
+TI_K3_CORE_SECDEV_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_K3_CORE_SECDEV_SOURCE = core-secdev-k3-$(TI_K3_CORE_SECDEV_VERSION).tar.xz
+TI_K3_CORE_SECDEV_INSTALL_IMAGES = YES
+TI_K3_CORE_SECDEV_LICENSE = BSD-3-Clause
+TI_K3_CORE_SECDEV_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html

boot/ti-k3-core-secdev/ti-k3-core-secdev.mk line 22

Quoted 10 lines
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +10 -0
+
+TI_K3_CORE_SECDEV_INSTALL_DIR = $(BINARIES_DIR)/ti-k3-core-secdev
+
+define TI_K3_CORE_SECDEV_INSTALL_IMAGES_CMDS
+	mkdir -p $(TI_K3_CORE_SECDEV_INSTALL_DIR)
+	cp -dpfr $(@D)/keys $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+	cp -dpfr $(@D)/scripts $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+endef
+
+$(eval $(generic-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#13 lore raw

Re: [Buildroot] [PATCH v4 06/20] boot/ti-k3-core-secdev: new package

Hi Romain, All,

Quoted 8 lines · Romain Naour

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 2 lines

This is a security development package containing tools for High-Security(HS) TI K3 platform devices.

Note: this tool can also handle TI "legacy" platform such AM57xx or AM43xx (not sure we really want do that).

While there are secure variants of those older platforms, it is very much controlled/restricted and not something readily available. So not something somebody easily can obtain to test, etc. Either way the secure dev source package associated with 'ti-k3-core-secdev' here is also only for K3 generation of devices and won't compatible with AM57xx or AM43xx anyways.

Quoted 5 lines

Can you try without this package when using binman? This tool doesn't seems "future proof".

http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Yes we should drop the package.

Thanks, Andreas

Quoted 95 lines

Best regards,
Romain

Quoted 92 lines

---

Changes in v4:
- Remove the trailing '/' at the end of the url in the help of Config.in
- Fixed license issues
- Use $(BINARIES_DIR)/ti-k3-core-secdev as the directory where to install files.

---
 DEVELOPERS                                    |  1 +
 boot/Config.in                                |  1 +
 boot/ti-k3-core-secdev/Config.in              |  9 ++++++++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash |  3 +++
 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk   | 22 +++++++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 boot/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3-core-secdev/ti-k3-core-secdev.mk
DEVELOPERS +1 -0
index 0d12c3abcb11..33d99ab2440f 100644
@@ -753,6 +753,7 @@ F:	package/xinetd/
 N:	Dario Binacchi <[email protected]>
 F:	board/bsh/
 F:	board/stmicroelectronics/stm32f769-disco/
+F:	boot/ti-k3-core-secdev/
 F:	configs/imx8mn_bsh_smm_s2_defconfig
 F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
 F:	configs/stm32f769_disco_sd_defconfig
boot/Config.in +1 -0
index e5fdf7ad439e..18a7d268f95a 100644
@@ -20,6 +20,7 @@ source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
 source "boot/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
boot/ti-k3-core-secdev/Config.in new file +9 -0
new file mode 100644
index 000000000000..f7b4e2962042
@@ -0,0 +1,9 @@
+config BR2_TARGET_TI_K3_CORE_SECDEV
+	bool "ti-k3-core-secdev"
+	depends on BR2_aarch64
+	help
+	  This package downloads and installs development tools for
+	  High-Security(HS) TI K3 platforms (which include AM62x,
+	  AM64x, AM65x and more).
+
+	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
boot/ti-k3-core-secdev/ti-k3-core-secdev.hash new file +3 -0
new file mode 100644
index 000000000000..e3074a398d62
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  b6d3bca0d561d055c6869c5564b06f2fb1b9f67e4ef180c2baf8a14a6a6afa06  core-secdev-k3-08.06.00.007.tar.xz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +14 -0
new file mode 100644
index 000000000000..f7655a0fefc8
@@ -0,0 +1,22 @@
+################################################################################
+#
+# ti-k3-core-secdev
+#
+################################################################################
+
+TI_K3_CORE_SECDEV_VERSION = 08.06.00.007
+TI_K3_CORE_SECDEV_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_K3_CORE_SECDEV_SOURCE = core-secdev-k3-$(TI_K3_CORE_SECDEV_VERSION).tar.xz
+TI_K3_CORE_SECDEV_INSTALL_IMAGES = YES
+TI_K3_CORE_SECDEV_LICENSE = BSD-3-Clause
+TI_K3_CORE_SECDEV_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+
+TI_K3_CORE_SECDEV_INSTALL_DIR = $(BINARIES_DIR)/ti-k3-core-secdev
Quoted 9 lines

boot/ti-k3-core-secdev/ti-k3-core-secdev.mk line 22

Quoted 8 lines
boot/ti-k3-core-secdev/ti-k3-core-secdev.mk new file +8 -0
+
+define TI_K3_CORE_SECDEV_INSTALL_IMAGES_CMDS
+	mkdir -p $(TI_K3_CORE_SECDEV_INSTALL_DIR)
+	cp -dpfr $(@D)/keys $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+	cp -dpfr $(@D)/scripts $(TI_K3_CORE_SECDEV_INSTALL_DIR)/
+endef
+
+$(eval $(generic-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#14 lore raw

PATCH v4 7/20 boot/ti-k3-image-gen: manage HS hardware

In reply to Dario Binacchi

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

---

no changes since v3:

---
 boot/ti-k3-image-gen/Config.in          |  1 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
boot/ti-k3-image-gen/Config.in +1 -0
index d76cef82e911..38d1598d9fc0 100644
@@ -2,6 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	bool "ti-k3-image-gen"
 	depends on BR2_TARGET_TI_K3_R5_LOADER
 	select BR2_TARGET_TI_K3_BOOT_FIRMWARE
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
 	# We need FIT support in uboot-tools, which is why we select a
 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3-image-gen/ti-k3-image-gen.mk +14 -2
index 64be9a18f2c4..74b4fcb4bf89 100644
@@ -29,10 +29,21 @@ TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
 TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
 TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
 
-TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+else
+TI_K3_IMAGE_GEN_DEPENDENCIES += ti-k3-core-secdev
+
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-enc.bin \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-cert.bin
+endif
 
 define TI_K3_IMAGE_GEN_CONFIGURE_CMDS
-	cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
+	$(foreach t,$(TI_K3_IMAGE_GEN_SYSFW),\
+		cp $(BINARIES_DIR)/ti-sysfw/$(t) $(@D)/
+	)
 endef
 
 define TI_K3_IMAGE_GEN_BUILD_CMDS
@@ -40,6 +51,7 @@ define TI_K3_IMAGE_GEN_BUILD_CMDS
 	$(BR2_MAKE) -C $(@D) \
 		SOC=$(TI_K3_IMAGE_GEN_SOC) \
 		SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
+		TI_SECURE_DEV_PKG=$(BINARIES_DIR)/ti-k3-core-secdev \
 		CONFIG=evm \
 		CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
 		SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#15 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

Hi Dario,

Quoted 5 lines · Dario Binacchi

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

so for test I've reverted the previous "boot/ti-k3-core-secdev: new package" commit, then...

Quoted 18 lines

---

no changes since v3:

---
 boot/ti-k3-image-gen/Config.in          |  1 + boot/ti-k3-image-gen/ti-k3-image-gen.mk | 16 ++++++++++++++--

 2 files changed, 15 insertions(+), 2 deletions(-)
boot/ti-k3-image-gen/Config.in +0 -0
index d76cef82e911..38d1598d9fc0 100644
@@ -2,6 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN

  bool "ti-k3-image-gen"
  depends on BR2_TARGET_TI_K3_R5_LOADER
  select BR2_TARGET_TI_K3_BOOT_FIRMWARE

boot/ti-k3-image-gen/Config.in config BR2_TARGET_TI_K3_IMAGE_GEN · line 5

Quoted 1 line
boot/ti-k3-image-gen/Config.in +1 -0
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS

... removed this, ...

Quoted 11 lines

  # We need FIT support in uboot-tools, which is why we select a

 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
index 64be9a18f2c4..74b4fcb4bf89 100644
@@ -29,10 +29,21 @@ TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
  TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
  TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))

boot/ti-k3-image-gen/ti-k3-image-gen.mk TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE)) · line 36

Quoted 6 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +5 -1
-TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+else
+TI_K3_IMAGE_GEN_DEPENDENCIES += ti-k3-core-secdev

... the above line, ...

Quoted 15 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +5 -0
+
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-enc.bin \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-cert.bin
+endif


 define TI_K3_IMAGE_GEN_CONFIGURE_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk +3 -1
-	cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
+	$(foreach t,$(TI_K3_IMAGE_GEN_SYSFW),\
+		cp $(BINARIES_DIR)/ti-sysfw/$(t) $(@D)/
+	)

 endef

 define TI_K3_IMAGE_GEN_BUILD_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 54

Quoted 4 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +1 -0
@@ -40,6 +51,7 @@ define TI_K3_IMAGE_GEN_BUILD_CMDS
  	$(BR2_MAKE) -C $(@D) \
  		SOC=$(TI_K3_IMAGE_GEN_SOC) \
  		SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
+		TI_SECURE_DEV_PKG=$(BINARIES_DIR)/ti-k3-core-secdev \

... and this line...

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 57

Quoted 3 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
  		CONFIG=evm \
  		CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
  		SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \

... and everything still builds and boots fine on SK-AM62B (HS-FS):

U-Boot SPL 2024.01 (Feb 18 2024 - 00:02:43 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 13400 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.7(release):v2.7
NOTICE:  BL31: Built : 23:57:43, Feb 17 2024

I/TC:
I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1199-g470b2069e4)) #1 Sat Feb 17 22:57:38 UTC 2024 aarch64 I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
I/TC: HUK Initialized
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2024.01 (Feb 18 2024 - 00:03:30 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 1872 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed

U-Boot 2024.01 (Feb 18 2024 - 00:03:30 +0100)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
DRAM:  2 GiB
Core:  56 devices, 23 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0 

switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'uEnv.txt'
Scanning for bootflows in all bootdevs

Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------

Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev '[email protected]':
0 extlinux ready mmc 1 [email protected]_ /extlinux/extlinux.conf
** Booting bootflow '[email protected]_1' with extlinux
1: am62x-sk-buildroot
Retrieving file: /Image
append: console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000 Retrieving file: /k3-am62x.dtb
## Flattened Device Tree blob at ffb14700
Booting using the fdt blob at 0xffb14700
Working FDT set to ffb14700
Loading Device Tree to 000000008ffed000, end 000000008ffff687 ... OK
Working FDT set to 8ffed000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.1 (...) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2023.11-1199-g470b2069e4) 12.3.0, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT Sun Feb 18 

00:37:47 CET 2024

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#16 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

Hi Alexander,

Quoted 77 lines · Alexander Sverdlin

Hi Dario,

Quoted 5 lines · Dario Binacchi

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

so for test I've reverted the previous "boot/ti-k3-core-secdev: new package" commit, then...

Quoted 15 lines

---

no changes since v3:

---
 boot/ti-k3-image-gen/Config.in          |  1 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
boot/ti-k3-image-gen/Config.in +0 -0
index d76cef82e911..38d1598d9fc0 100644

boot/ti-k3-image-gen/Config.in config BR2_TARGET_TI_K3_IMAGE_GEN · line 5

Quoted 4 lines
boot/ti-k3-image-gen/Config.in +1 -0
@@ -2,6 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
      bool "ti-k3-image-gen"
      depends on BR2_TARGET_TI_K3_R5_LOADER
      select BR2_TARGET_TI_K3_BOOT_FIRMWARE
+     select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS

... removed this, ...

Quoted 8 lines
boot/ti-k3-image-gen/Config.in +0 -0
      # We need FIT support in uboot-tools, which is why we select a
      # host package
      select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
index 64be9a18f2c4..74b4fcb4bf89 100644

boot/ti-k3-image-gen/ti-k3-image-gen.mk TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE)) · line 36

Quoted 9 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +5 -1
@@ -29,10 +29,21 @@ TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
 TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
 TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
 
-TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+TI_K3_IMAGE_GEN_SYSFW = \
+     $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+else
+TI_K3_IMAGE_GEN_DEPENDENCIES += ti-k3-core-secdev

... the above line, ...

Quoted 15 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +8 -1
+
+TI_K3_IMAGE_GEN_SYSFW = \
+     $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-enc.bin \
+     $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-cert.bin
+endif
 
 define TI_K3_IMAGE_GEN_CONFIGURE_CMDS
-     cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
+     $(foreach t,$(TI_K3_IMAGE_GEN_SYSFW),\
+             cp $(BINARIES_DIR)/ti-sysfw/$(t) $(@D)/
+     )
 endef
 
 define TI_K3_IMAGE_GEN_BUILD_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 54

Quoted 4 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +1 -0
@@ -40,6 +51,7 @@ define TI_K3_IMAGE_GEN_BUILD_CMDS
      $(BR2_MAKE) -C $(@D) \
              SOC=$(TI_K3_IMAGE_GEN_SOC) \
              SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
+             TI_SECURE_DEV_PKG=$(BINARIES_DIR)/ti-k3-core-secdev \

... and this line...

Quoted 5 lines

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 57

Quoted 3 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
              CONFIG=evm \
              CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
              SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \

... and everything still builds and boots fine on SK-AM62B (HS-FS):

Thanks for your info,
I will consider them for version 5.

Thanks and regards,
Dario

Quoted 83 lines

U-Boot SPL 2024.01 (Feb 18 2024 - 00:02:43 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 13400 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.7(release):v2.7
NOTICE:  BL31: Built : 23:57:43, Feb 17 2024

I/TC:
I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1199-g470b2069e4)) #1 Sat Feb 17 22:57:38 UTC 2024 aarch64 I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
I/TC: HUK Initialized
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2024.01 (Feb 18 2024 - 00:03:30 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 1872 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed

U-Boot 2024.01 (Feb 18 2024 - 00:03:30 +0100)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
DRAM:  2 GiB
Core:  56 devices, 23 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0

switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'uEnv.txt'
Scanning for bootflows in all bootdevs

Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------

Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev '[email protected]':
0 extlinux ready mmc 1 [email protected]_ /extlinux/extlinux.conf
** Booting bootflow '[email protected]_1' with extlinux
1: am62x-sk-buildroot
Retrieving file: /Image
append: console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000 Retrieving file: /k3-am62x.dtb
## Flattened Device Tree blob at ffb14700
Booting using the fdt blob at 0xffb14700
Working FDT set to ffb14700
Loading Device Tree to 000000008ffed000, end 000000008ffff687 ... OK
Working FDT set to 8ffed000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.1 (...) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2023.11-1199-g470b2069e4) 12.3.0, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT Sun Feb 18

00:37:47 CET 2024

--
Alexander Sverdlin.

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#17 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

In reply to Alexander Sverdlin

Hello Alexander,

Le 18/02/2024 à 00:45, Alexander Sverdlin a écrit :

Quoted 11 lines

Hi Dario,

Quoted 5 lines · Dario Binacchi

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

so for test I've reverted the previous "boot/ti-k3-core-secdev: new package" commit, then...

Thanks for testing!
To be sure, I would recommend to do a build from scratch before testing.

Best regards,
Romain

Quoted 142 lines
Quoted 19 lines

---

no changes since v3:

---
 boot/ti-k3-image-gen/Config.in          |  1 + boot/ti-k3-image-gen/ti-k3-image-gen.mk | 16 ++++++++++++++--

 2 files changed, 15 insertions(+), 2 deletions(-)
boot/ti-k3-image-gen/Config.in +0 -0
index d76cef82e911..38d1598d9fc0 100644
@@ -2,6 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN

  bool "ti-k3-image-gen"
  depends on BR2_TARGET_TI_K3_R5_LOADER
  select BR2_TARGET_TI_K3_BOOT_FIRMWARE

boot/ti-k3-image-gen/Config.in config BR2_TARGET_TI_K3_IMAGE_GEN · line 5

Quoted 1 line
boot/ti-k3-image-gen/Config.in +1 -0
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS

... removed this, ...

Quoted 11 lines

  # We need FIT support in uboot-tools, which is why we select a

 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
index 64be9a18f2c4..74b4fcb4bf89 100644
@@ -29,10 +29,21 @@ TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
  TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
  TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))

boot/ti-k3-image-gen/ti-k3-image-gen.mk TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE)) · line 36

Quoted 6 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +5 -1
-TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+else
+TI_K3_IMAGE_GEN_DEPENDENCIES += ti-k3-core-secdev

... the above line, ...

Quoted 15 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +5 -0
+
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-enc.bin \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-cert.bin
+endif


 define TI_K3_IMAGE_GEN_CONFIGURE_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk +3 -1
-	cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
+	$(foreach t,$(TI_K3_IMAGE_GEN_SYSFW),\
+		cp $(BINARIES_DIR)/ti-sysfw/$(t) $(@D)/
+	)

 endef

 define TI_K3_IMAGE_GEN_BUILD_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 54

Quoted 4 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +1 -0
@@ -40,6 +51,7 @@ define TI_K3_IMAGE_GEN_BUILD_CMDS
  	$(BR2_MAKE) -C $(@D) \
  		SOC=$(TI_K3_IMAGE_GEN_SOC) \
  		SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
+		TI_SECURE_DEV_PKG=$(BINARIES_DIR)/ti-k3-core-secdev \

... and this line...

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 57

Quoted 3 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
  		CONFIG=evm \
  		CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
  		SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \

... and everything still builds and boots fine on SK-AM62B (HS-FS):

U-Boot SPL 2024.01 (Feb 18 2024 - 00:02:43 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 13400 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.7(release):v2.7
NOTICE:  BL31: Built : 23:57:43, Feb 17 2024

I/TC:
I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1199-g470b2069e4)) #1 Sat Feb 17 22:57:38 UTC 2024 aarch64 I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
I/TC: HUK Initialized
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2024.01 (Feb 18 2024 - 00:03:30 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 1872 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed

U-Boot 2024.01 (Feb 18 2024 - 00:03:30 +0100)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
DRAM:  2 GiB
Core:  56 devices, 23 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0 

switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'uEnv.txt'
Scanning for bootflows in all bootdevs

Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------

Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev '[email protected]':
0 extlinux ready mmc 1 [email protected]_ /extlinux/extlinux.conf
** Booting bootflow '[email protected]_1' with extlinux
1: am62x-sk-buildroot
Retrieving file: /Image
append: console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000 Retrieving file: /k3-am62x.dtb
## Flattened Device Tree blob at ffb14700
Booting using the fdt blob at 0xffb14700
Working FDT set to ffb14700
Loading Device Tree to 000000008ffed000, end 000000008ffff687 ... OK
Working FDT set to 8ffed000

Quoted 8 lines

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.1 (...) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2023.11-1199-g470b2069e4) 12.3.0, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT Sun Feb 18 

00:37:47 CET 2024

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#18 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

Hi Romain,

Quoted 11 lines · Romain Naour
Quoted 8 lines
Quoted 5 lines

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

so for test I've reverted the previous "boot/ti-k3-core-secdev: new package" commit, then...

Thanks for testing!
To be sure, I would recommend to do a build from scratch before testing.

indeed it was a clean build.

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#19 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

In reply to Alexander Sverdlin

Hi Alexander,

Quoted 153 lines · Alexander Sverdlin

Hi Dario,

Quoted 5 lines · Dario Binacchi

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

so for test I've reverted the previous "boot/ti-k3-core-secdev: new package" commit, then...

Quoted 18 lines

---

no changes since v3:

---
 boot/ti-k3-image-gen/Config.in          |  1 + boot/ti-k3-image-gen/ti-k3-image-gen.mk | 16 ++++++++++++++--

 2 files changed, 15 insertions(+), 2 deletions(-)
boot/ti-k3-image-gen/Config.in +0 -0
index d76cef82e911..38d1598d9fc0 100644
@@ -2,6 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN

  bool "ti-k3-image-gen"
  depends on BR2_TARGET_TI_K3_R5_LOADER
  select BR2_TARGET_TI_K3_BOOT_FIRMWARE

boot/ti-k3-image-gen/Config.in config BR2_TARGET_TI_K3_IMAGE_GEN · line 5

Quoted 1 line
boot/ti-k3-image-gen/Config.in +1 -0
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS

... removed this, ...

Quoted 11 lines

  # We need FIT support in uboot-tools, which is why we select a

 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
index 64be9a18f2c4..74b4fcb4bf89 100644
@@ -29,10 +29,21 @@ TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
  TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
  TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))

boot/ti-k3-image-gen/ti-k3-image-gen.mk TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE)) · line 36

Quoted 6 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +5 -1
-TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+else
+TI_K3_IMAGE_GEN_DEPENDENCIES += ti-k3-core-secdev

... the above line, ...

Quoted 15 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +5 -0
+
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-enc.bin \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-cert.bin
+endif


 define TI_K3_IMAGE_GEN_CONFIGURE_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk +3 -1
-	cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
+	$(foreach t,$(TI_K3_IMAGE_GEN_SYSFW),\
+		cp $(BINARIES_DIR)/ti-sysfw/$(t) $(@D)/
+	)

 endef

 define TI_K3_IMAGE_GEN_BUILD_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 54

Quoted 4 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +1 -0
@@ -40,6 +51,7 @@ define TI_K3_IMAGE_GEN_BUILD_CMDS
  	$(BR2_MAKE) -C $(@D) \
  		SOC=$(TI_K3_IMAGE_GEN_SOC) \
  		SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
+		TI_SECURE_DEV_PKG=$(BINARIES_DIR)/ti-k3-core-secdev \

... and this line...

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 57

Quoted 3 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
  		CONFIG=evm \
  		CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
  		SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \

... and everything still builds and boots fine on SK-AM62B (HS-FS):

U-Boot SPL 2024.01 (Feb 18 2024 - 00:02:43 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 13400 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.7(release):v2.7
NOTICE:  BL31: Built : 23:57:43, Feb 17 2024

I/TC:
I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1199-g470b2069e4)) #1 Sat Feb 17 22:57:38 UTC 2024 aarch64 I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
I/TC: HUK Initialized
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2024.01 (Feb 18 2024 - 00:03:30 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar') SPL initial stack usage: 1872 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed

U-Boot 2024.01 (Feb 18 2024 - 00:03:30 +0100)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
DRAM:  2 GiB
Core:  56 devices, 23 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0 

switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'uEnv.txt'
Scanning for bootflows in all bootdevs

Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------

Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev '[email protected]':
0 extlinux ready mmc 1 [email protected]_ /extlinux/extlinux.conf
** Booting bootflow '[email protected]_1' with extlinux
1: am62x-sk-buildroot
Retrieving file: /Image
append: console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000 Retrieving file: /k3-am62x.dtb
## Flattened Device Tree blob at ffb14700
Booting using the fdt blob at 0xffb14700
Working FDT set to ffb14700
Loading Device Tree to 000000008ffed000, end 000000008ffff687 ... OK
Working FDT set to 8ffed000

Quoted 3 lines

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]

Just wanting to double-check one quick detail. Did you have to make any additional modifications to boot-mode related U-Boot settings or ENV variables? Or did the "new normal" of CONFIG_BOOTSTD just work for you?

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 8 lines
[    0.000000] Linux version 6.6.1 (...) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2023.11-1199-g470b2069e4) 12.3.0, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT Sun Feb 18 

00:37:47 CET 2024

Signature · 1 line
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#20 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

Hi Andreas!

Quoted 12 lines · Andreas Dannenberg
Quoted 12 lines

   0  extlinux     ready   mmc          1  [email protected]_ /extlinux/extlinux.conf
** Booting bootflow '[email protected]_1' with extlinux
1:      am62x-sk-buildroot
Retrieving file: /Image
append: console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000 Retrieving file: /k3-am62x.dtb
## Flattened Device Tree blob at ffb14700
    Booting using the fdt blob at 0xffb14700
Working FDT set to ffb14700
    Loading Device Tree to 000000008ffed000, end 000000008ffff687 ... OK
Working FDT set to 8ffed000

Quoted 7 lines
Quoted 3 lines

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]

Just wanting to double-check one quick detail. Did you have to make any additional modifications to boot-mode related U-Boot settings or ENV variables? Or did the "new normal" of CONFIG_BOOTSTD just work for you?

No changes in U-Boot whatsoever, patchset from Dario works as-is, seems that the extlinux.conf visible in the log above did the trick.

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#21 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

In reply to Dario Binacchi

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 3 lines

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

Such keys has been added to u-boot v2023.10:

https://git.ti.com/cgit/security-development-tools/core-secdev-k3/tree/keys

https://source.denx.de/u-boot/u-boot/-/commit/d5b1ef30d7ffabb9f57d5c62b9f0608837af0f4f

Do we need something else from ti-k3-core-secdev package that is not already provided by u-boot?

Best regards,
Romain

Quoted 54 lines

---

no changes since v3:

---
 boot/ti-k3-image-gen/Config.in          |  1 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
boot/ti-k3-image-gen/Config.in +1 -0
index d76cef82e911..38d1598d9fc0 100644
@@ -2,6 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	bool "ti-k3-image-gen"
 	depends on BR2_TARGET_TI_K3_R5_LOADER
 	select BR2_TARGET_TI_K3_BOOT_FIRMWARE
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
 	# We need FIT support in uboot-tools, which is why we select a
 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3-image-gen/ti-k3-image-gen.mk +13 -2
index 64be9a18f2c4..74b4fcb4bf89 100644
@@ -29,10 +29,21 @@ TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
 TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
 TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
 
-TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+else
+TI_K3_IMAGE_GEN_DEPENDENCIES += ti-k3-core-secdev
+
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-enc.bin \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-cert.bin
+endif
 
 define TI_K3_IMAGE_GEN_CONFIGURE_CMDS
-	cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
+	$(foreach t,$(TI_K3_IMAGE_GEN_SYSFW),\
+		cp $(BINARIES_DIR)/ti-sysfw/$(t) $(@D)/
+	)
 endef
 
 define TI_K3_IMAGE_GEN_BUILD_CMDS

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 57

Quoted 7 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +1 -0
@@ -40,6 +51,7 @@ define TI_K3_IMAGE_GEN_BUILD_CMDS
 	$(BR2_MAKE) -C $(@D) \
 		SOC=$(TI_K3_IMAGE_GEN_SOC) \
 		SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
+		TI_SECURE_DEV_PKG=$(BINARIES_DIR)/ti-k3-core-secdev \
 		CONFIG=evm \
 		CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
 		SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#22 lore raw

Re: [Buildroot] [PATCH v4 07/20] boot/ti-k3-image-gen: manage HS hardware

Quoted 7 lines · Romain Naour

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 3 lines

The patch sets the configurations required by TI HS systems. Some of these configurations (i. e. HS SYSFW image signing key, HS Software Revision) are provided by the ti-k3-core-secdev package in the binaries directory.

Quoted 8 lines

Such keys has been added to u-boot v2023.10:

https://git.ti.com/cgit/security-development-tools/core-secdev-k3/tree/keys

https://source.denx.de/u-boot/u-boot/-/commit/d5b1ef30d7ffabb9f57d5c62b9f0608837af0f4f

Do we need something else from ti-k3-core-secdev package that is not already provided by u-boot?

No, we don't need anything from that. If you look at TI's current SDKs/Yocto builds this package is not used at all. The TI goal is to do things in a standard upstream way (in upstream) as much as possible, hence we are trying to move away from all these "vendor quirks" however possible.

Regards, Andreas

Quoted 56 lines

Best regards,
Romain

Quoted 52 lines

---

no changes since v3:

---
 boot/ti-k3-image-gen/Config.in          |  1 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
boot/ti-k3-image-gen/Config.in +1 -0
index d76cef82e911..38d1598d9fc0 100644
@@ -2,6 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	bool "ti-k3-image-gen"
 	depends on BR2_TARGET_TI_K3_R5_LOADER
 	select BR2_TARGET_TI_K3_BOOT_FIRMWARE
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
 	# We need FIT support in uboot-tools, which is why we select a
 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3-image-gen/ti-k3-image-gen.mk +13 -2
index 64be9a18f2c4..74b4fcb4bf89 100644
@@ -29,10 +29,21 @@ TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
 TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
 TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
 
-TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
+else
+TI_K3_IMAGE_GEN_DEPENDENCIES += ti-k3-core-secdev
+
+TI_K3_IMAGE_GEN_SYSFW = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-enc.bin \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE)-cert.bin
+endif
 
 define TI_K3_IMAGE_GEN_CONFIGURE_CMDS
-	cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
+	$(foreach t,$(TI_K3_IMAGE_GEN_SYSFW),\
+		cp $(BINARIES_DIR)/ti-sysfw/$(t) $(@D)/
+	)
 endef
 
Quoted 10 lines

boot/ti-k3-image-gen/ti-k3-image-gen.mk define TI_K3_IMAGE_GEN_BUILD_CMDS · line 57

Quoted 9 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk +1 -0
 define TI_K3_IMAGE_GEN_BUILD_CMDS
@@ -40,6 +51,7 @@ define TI_K3_IMAGE_GEN_BUILD_CMDS
 	$(BR2_MAKE) -C $(@D) \
 		SOC=$(TI_K3_IMAGE_GEN_SOC) \
 		SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
+		TI_SECURE_DEV_PKG=$(BINARIES_DIR)/ti-k3-core-secdev \
 		CONFIG=evm \
 		CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
 		SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#23 lore raw

PATCH v4 8/20 package/python-jsonschema: add host variant

In reply to Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.

---

no changes since v3

Changes in v3:
- Drop Config.in.host

---
 package/python-jsonschema/python-jsonschema.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/python-jsonschema/python-jsonschema.mk +6 -0
index 512c92aa7752..85fef7ad22ac 100644
@@ -15,4 +15,10 @@ PYTHON_JSONSCHEMA_DEPENDENCIES = \
 	host-python-hatch-fancy-pypi-readme \
 	host-python-hatch-vcs
 
+HOST_PYTHON_JSONSCHEMA_DEPENDENCIES = \
+	host-python-hatchling \
+	host-python-hatch-fancy-pypi-readme \
+	host-python-hatch-vcs
+
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#24 lore raw

Re: [Buildroot] [PATCH v4 08/20] package/python-jsonschema: add host variant

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 3 lines

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.

I did some improvement about host-python package you need for binam. Indeed, host-python-jsonschema has some runtime dependencies, but we don't have the concept of runtime dependencies for host packages.

Due to thoses runtime dependencies you can't add python-jsonschema host variant before adding host-python-attrs, host-python-jsonschema-specifications, host-python-referencing and host-python-rpds-py.

Best regards,
Romain

Quoted 22 lines

---

no changes since v3

Changes in v3:
- Drop Config.in.host

---
 package/python-jsonschema/python-jsonschema.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/python-jsonschema/python-jsonschema.mk +0 -0
index 512c92aa7752..85fef7ad22ac 100644

package/python-jsonschema/python-jsonschema.mk PYTHON_JSONSCHEMA_DEPENDENCIES = \ · line 24

Quoted 10 lines
package/python-jsonschema/python-jsonschema.mk +6 -0
@@ -15,4 +15,10 @@ PYTHON_JSONSCHEMA_DEPENDENCIES = \
 	host-python-hatch-fancy-pypi-readme \
 	host-python-hatch-vcs
 
+HOST_PYTHON_JSONSCHEMA_DEPENDENCIES = \
+	host-python-hatchling \
+	host-python-hatch-fancy-pypi-readme \
+	host-python-hatch-vcs
+
 $(eval $(python-package))
+$(eval $(host-python-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#25 lore raw

PATCH v4 9/20 package/python-attrs: add host variant

In reply to Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.

---

no changes since v3

Changes in v3:
- Drop Config.in.host

---
 package/python-attrs/python-attrs.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/python-attrs/python-attrs.mk +6 -0
index 8a1236cc4402..fb1729e62fa2 100644
@@ -15,4 +15,10 @@ PYTHON_ATTRS_DEPENDENCIES = \
 	host-python-hatch-fancy-pypi-readme \
 	host-python-hatch-vcs
 
+HOST_PYTHON_ATTRS_DEPENDENCIES = \
+	host-python-hatchling \
+	host-python-hatch-fancy-pypi-readme \
+	host-python-hatch-vcs
+
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#26 lore raw

PATCH v4 10/20 package/python-referencing: add host variant

In reply to Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.

---

Changes in v4:
- Drop host-python-attrs from PYTHON_REFERENCING_DEPENDENCIES

Changes in v3:
- Drop Config.in.host

---
 package/python-referencing/python-referencing.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/python-referencing/python-referencing.mk +5 -0
index 27d1452e913a..f00a0efe73e8 100644
@@ -14,4 +14,9 @@ PYTHON_REFERENCING_DEPENDENCIES = \
 	host-python-hatchling \
 	host-python-hatch-vcs
 
+HOST_PYTHON_REFERENCING_DEPENDENCIES = \
+	host-python-hatchling \
+	host-python-hatch-vcs
+
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#27 lore raw

PATCH v4 11/20 package/python-rpds-py: add host variant

In reply to Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman

---

no changes since v3

Changes in v3:
- Drop Config.in.host

---
 package/python-rpds-py/python-rpds-py.mk | 1 +
 1 file changed, 1 insertion(+)
package/python-rpds-py/python-rpds-py.mk +1 -0
index 80670f2e4fde..cee2ff290a4e 100644
@@ -12,3 +12,4 @@ PYTHON_RPDS_PY_LICENSE = MIT
 PYTHON_RPDS_PY_LICENSE_FILES = LICENSE
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#28 lore raw

PATCH v4 12/20 package/python-jsonschema-specifications: add host variant

In reply to Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.

---

no changes since v3

Changes in v3:
- Drop Config.in.host

---
 .../python-jsonschema-specifications.mk                      | 5 +++++
 1 file changed, 5 insertions(+)
package/python-jsonschema-specifications/python-jsonschema-specifications.mk +5 -0
index 40879898c9d4..b6e309ab2bc9 100644
@@ -14,4 +14,9 @@ PYTHON_JSONSCHEMA_SPECIFICATIONS_DEPENDENCIES = \
 	host-python-hatchling \
 	host-python-hatch-vcs
 
+HOST_PYTHON_JSONSCHEMA_SPECIFICATIONS_DEPENDENCIES = \
+	host-python-hatchling \
+	host-python-hatch-vcs
+
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#29 lore raw

PATCH v4 13/20 boot/ti-k3-r5-loader: set binman environment

In reply to Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.

The patch set the BINMAN_INDIRS environment variable to provide the directory to search for binary blobs and select the packages required by binman.

---

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

Changes in v2:
- Change commit message
- Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
- Select packages required by binman if BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled

---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +12 -1
index 0ffcb8235f2e..2a10024aedaa 100644
@@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
 	host-pkgconf \
 	$(BR2_MAKE_HOST_DEPENDENCY) \
 	host-arm-gnu-toolchain \
-	host-openssl
+	host-openssl \
+	host-python-attrs \
+	host-python-jsonschema \
+	host-python-jsonschema-specifications \
+	host-python-pyyaml \
+	host-python-referencing \
+	host-python-rpds-py
 
 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
@@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
 	$(BR2_BISON_HOST_DEPENDENCY) \
 	$(BR2_FLEX_HOST_DEPENDENCY)
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)
+TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
+endif
+
 ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
 TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
 else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
@@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
 	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
 	ARCH=arm \
 	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+	BINMAN_INDIRS=$(BINARIES_DIR) \
 	HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
 define TI_K3_R5_LOADER_BUILD_CMDS
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v4 13/20
#30 lore raw

Re: [Buildroot] [PATCH v4 13/20] boot/ti-k3-r5-loader: set binman environment

Hi Dario,

Quoted 11 lines · Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.

The patch set the BINMAN_INDIRS environment variable to provide the directory to search for binary blobs and select the packages required by binman.

I personally do not see why binman usage should be configurable as in
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
your patch looks simpler,

Quoted 54 lines

---

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

Changes in v2:
- Change commit message
- Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
- Select packages required by binman if BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled

---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-

 1 file changed, 12 insertions(+), 1 deletion(-)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +7 -1
index 0ffcb8235f2e..2a10024aedaa 100644
@@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
  	host-pkgconf \
  	$(BR2_MAKE_HOST_DEPENDENCY) \
  	host-arm-gnu-toolchain \
-	host-openssl
+	host-openssl \
+	host-python-attrs \
+	host-python-jsonschema \
+	host-python-jsonschema-specifications \
+	host-python-pyyaml \
+	host-python-referencing \
+	host-python-rpds-py


 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
@@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
  	$(BR2_BISON_HOST_DEPENDENCY) \
  	$(BR2_FLEX_HOST_DEPENDENCY)

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)
+TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
+endif
+

 ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
 TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
@@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
  	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
  	ARCH=arm \
  	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+	BINMAN_INDIRS=$(BINARIES_DIR) \

  HOSTLDFLAGS="$(HOST_LDFLAGS)"

 define TI_K3_R5_LOADER_BUILD_CMDS

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#31 lore raw

Re: [Buildroot] [PATCH v4 13/20] boot/ti-k3-r5-loader: set binman environment

Hello Alexander,

Le 17/02/2024 à 21:38, Alexander Sverdlin a écrit :

Quoted 11 lines

Hi Dario,

Quoted 8 lines · Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.

The patch set the BINMAN_INDIRS environment variable to provide the directory to search for binary blobs and select the packages required by binman.

Quoted 7 lines
Quoted 3 lines

I personally do not see why binman usage should be configurable as in
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
your patch looks simpler,

Agree, the binman must be mandatory for ti-k3-r5-loader package.

The intend was to take care of the existing am64x am62x defconfig that was working without binman. As soon as all TI K3 defconfig switched to binman, this option can be removed.

Best regards,
Romain

Quoted 49 lines
Quoted 46 lines

---

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

Changes in v2:
- Change commit message
- Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
- Select packages required by binman if BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled

---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-

 1 file changed, 12 insertions(+), 1 deletion(-)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +7 -1
index 0ffcb8235f2e..2a10024aedaa 100644
@@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
  	host-pkgconf \
  	$(BR2_MAKE_HOST_DEPENDENCY) \
  	host-arm-gnu-toolchain \
-	host-openssl
+	host-openssl \
+	host-python-attrs \
+	host-python-jsonschema \
+	host-python-jsonschema-specifications \
+	host-python-pyyaml \
+	host-python-referencing \
+	host-python-rpds-py


 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
@@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
  	$(BR2_BISON_HOST_DEPENDENCY) \
  	$(BR2_FLEX_HOST_DEPENDENCY)

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)
+TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
+endif
+

 ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
 TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)

Quoted 9 lines
Quoted 8 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
@@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
  	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
  	ARCH=arm \
  	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+	BINMAN_INDIRS=$(BINARIES_DIR) \

  HOSTLDFLAGS="$(HOST_LDFLAGS)"

 define TI_K3_R5_LOADER_BUILD_CMDS

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#32 lore raw

Re: [Buildroot] [PATCH v4 13/20] boot/ti-k3-r5-loader: set binman environment

In reply to Dario Binacchi

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 34 lines

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.

The patch set the BINMAN_INDIRS environment variable to provide the directory to search for binary blobs and select the packages required by binman.

---

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

Changes in v2:
- Change commit message
- Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
- Select packages required by binman if BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled

---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index 0ffcb8235f2e..2a10024aedaa 100644
@@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
 	host-pkgconf \

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_DEPENDENCIES = \ · line 48

Quoted 10 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +7 -1
 	$(BR2_MAKE_HOST_DEPENDENCY) \
 	host-arm-gnu-toolchain \
-	host-openssl
+	host-openssl \
+	host-python-attrs \
+	host-python-jsonschema \
+	host-python-jsonschema-specifications \
+	host-python-pyyaml \
+	host-python-referencing \
+	host-python-rpds-py

Most of theses new dependencies are not ti-k3-r5-loader dependencies but host-python-jsonschema runtime dependencies.

Note: host-python-jsonschema depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS due to its runtime dependency on host-python-rpds-py.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \ · line 58

Quoted 8 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
@@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
 	$(BR2_BISON_HOST_DEPENDENCY) \
 	$(BR2_FLEX_HOST_DEPENDENCY)
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)

It's a u-boot package config option. just add host-python-pylibfdt the dependency.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_MAKE_OPTS = \ · line 71

Quoted 11 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
+TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
+endif
+
 ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
 TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
 else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
@@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
 	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
 	ARCH=arm \
 	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+	BINMAN_INDIRS=$(BINARIES_DIR) \

I suggested to add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN but indeed we should use binman unconditionally for ti-k3-r5-loader package.

http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Best regards,
Romain

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_MAKE_OPTS = \ · line 74

Quoted 3 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
 	HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
 define TI_K3_R5_LOADER_BUILD_CMDS

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#33 lore raw

Re: [Buildroot] [PATCH v4 13/20] boot/ti-k3-r5-loader: set binman environment

Hi Romain,

Quoted 43 lines · Romain Naour

Hello Dario,

Quoted 39 lines · Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.

The patch set the BINMAN_INDIRS environment variable to provide the directory to search for binary blobs and select the packages required by binman.

---

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

Changes in v2:
- Change commit message
- Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
- Select packages required by binman if BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled

---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +2 -1
index 0ffcb8235f2e..2a10024aedaa 100644
@@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
      host-pkgconf \
      $(BR2_MAKE_HOST_DEPENDENCY) \
      host-arm-gnu-toolchain \
-     host-openssl
+     host-openssl \
+     host-python-attrs \
Quoted 8 lines

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_DEPENDENCIES = \ · line 48

Quoted 5 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5 -0
+     host-python-jsonschema \
+     host-python-jsonschema-specifications \
+     host-python-pyyaml \
+     host-python-referencing \
+     host-python-rpds-py

Most of theses new dependencies are not ti-k3-r5-loader dependencies but host-python-jsonschema runtime dependencies.

I removed the runtime dependencies and tried to modify the patch based on your indications and your patch
(http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/),
but I'm encountering compilation errors specifically on the Python modules that you indicated as runtime
dependencies. I tried to compile ti_am62x_sk_defconfig on your series (i. e. "Add ti_j721e_sk_defconfig"),
but it seems like the HSFS option has disappeared.
So I need to add the runtime dependencies as well to compile correctly.

Thanks and regards,
Dario

Quoted 41 lines

Note: host-python-jsonschema depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS due to its runtime dependency on host-python-rpds-py.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \ · line 58

Quoted 8 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
@@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
      $(BR2_BISON_HOST_DEPENDENCY) \
      $(BR2_FLEX_HOST_DEPENDENCY)
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)

It's a u-boot package config option. just add host-python-pylibfdt the dependency.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_MAKE_OPTS = \ · line 71

Quoted 11 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
+TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
+endif
+
 ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
 TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
 else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
@@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
      CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
      ARCH=arm \
      HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+     BINMAN_INDIRS=$(BINARIES_DIR) \

I suggested to add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN but indeed we should use binman unconditionally for ti-k3-r5-loader package.

http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Best regards,
Romain

Quoted 3 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
      HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
 define TI_K3_R5_LOADER_BUILD_CMDS
Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#34 lore raw

Re: [Buildroot] [PATCH v4 13/20] boot/ti-k3-r5-loader: set binman environment

Hello Dario,

Le 21/02/2024 à 11:19, Dario Binacchi a écrit :

Quoted 55 lines

Hi Romain,

Quoted 43 lines · Romain Naour

Hello Dario,

Quoted 39 lines · Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.

The patch set the BINMAN_INDIRS environment variable to provide the directory to search for binary blobs and select the packages required by binman.

---

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

Changes in v2:
- Change commit message
- Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
- Select packages required by binman if BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled

---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +2 -1
index 0ffcb8235f2e..2a10024aedaa 100644
@@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
      host-pkgconf \
      $(BR2_MAKE_HOST_DEPENDENCY) \
      host-arm-gnu-toolchain \
-     host-openssl
+     host-openssl \
+     host-python-attrs \
Quoted 8 lines

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_DEPENDENCIES = \ · line 48

Quoted 5 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5 -0
+     host-python-jsonschema \
+     host-python-jsonschema-specifications \
+     host-python-pyyaml \
+     host-python-referencing \
+     host-python-rpds-py

Most of theses new dependencies are not ti-k3-r5-loader dependencies but host-python-jsonschema runtime dependencies.

Quoted 6 lines

I removed the runtime dependencies and tried to modify the patch based on your indications and your patch
(http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/),
but I'm encountering compilation errors specifically on the Python modules that you indicated as runtime
dependencies.

What's the issue?

Make sure to take host-python changes from my series, some of them was updated with their own runtime dependencies:

For example:
http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

I tried to compile ti_am62x_sk_defconfig on your series

Quoted 2 lines

(i. e. "Add ti_j721e_sk_defconfig"),
but it seems like the HSFS option has disappeared.

Indeed, this is something we need to improve.

Quoted 1 line

So I need to add the runtime dependencies as well to compile correctly.

Can you try with only patch 4/21 (package/python-attrs: add host variant) to patch 10/21 (boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option).

Maybe update the last patch 10/21 since it was suggested to remove BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option to make binman use mandatory for ti-k3-r5-loader package.

Best regards,
Romain

Quoted 47 lines

Thanks and regards,
Dario

Quoted 41 lines

Note: host-python-jsonschema depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS due to its runtime dependency on host-python-rpds-py.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \ · line 58

Quoted 8 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
@@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
      $(BR2_BISON_HOST_DEPENDENCY) \
      $(BR2_FLEX_HOST_DEPENDENCY)
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)

It's a u-boot package config option. just add host-python-pylibfdt the dependency.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_MAKE_OPTS = \ · line 71

Quoted 11 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
+TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
+endif
+
 ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
 TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
 else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
@@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
      CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
      ARCH=arm \
      HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+     BINMAN_INDIRS=$(BINARIES_DIR) \

I suggested to add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN but indeed we should use binman unconditionally for ti-k3-r5-loader package.

http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Best regards,
Romain

Quoted 3 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
      HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
 define TI_K3_R5_LOADER_BUILD_CMDS

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#35 lore raw

Re: [Buildroot] [PATCH v4 13/20] boot/ti-k3-r5-loader: set binman environment

Hello Romain,

Quoted 66 lines · Romain Naour

Hello Dario,

Quoted 55 lines · Dario Binacchi

Hi Romain,

Quoted 43 lines · Romain Naour

Hello Dario,

Quoted 39 lines · Dario Binacchi

Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.

The patch set the BINMAN_INDIRS environment variable to provide the directory to search for binary blobs and select the packages required by binman.

---

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

Changes in v2:
- Change commit message
- Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
- Select packages required by binman if BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled

---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +2 -1
index 0ffcb8235f2e..2a10024aedaa 100644
@@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
      host-pkgconf \
      $(BR2_MAKE_HOST_DEPENDENCY) \
      host-arm-gnu-toolchain \
-     host-openssl
+     host-openssl \
+     host-python-attrs \
Quoted 8 lines

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_DEPENDENCIES = \ · line 48

Quoted 5 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +5 -0
+     host-python-jsonschema \
+     host-python-jsonschema-specifications \
+     host-python-pyyaml \
+     host-python-referencing \
+     host-python-rpds-py

Most of theses new dependencies are not ti-k3-r5-loader dependencies but host-python-jsonschema runtime dependencies.

Quoted 6 lines

I removed the runtime dependencies and tried to modify the patch based on your indications and your patch
(http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/),
but I'm encountering compilation errors specifically on the Python modules that you indicated as runtime
dependencies.

Quoted 4 lines

What's the issue?

Make sure to take host-python changes from my series, some of them was updated with their own runtime dependencies:

The problem was this. I hadn't noticed the changes you had applied to my patches.
I'm doing the final tests, I'll submit v5 as soon as possible.

Many thanks!
Regards,
Dario

Quoted 71 lines

For example:
http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

I tried to compile ti_am62x_sk_defconfig on your series

Quoted 2 lines

(i. e. "Add ti_j721e_sk_defconfig"),
but it seems like the HSFS option has disappeared.

Indeed, this is something we need to improve.

Quoted 1 line

So I need to add the runtime dependencies as well to compile correctly.

Can you try with only patch 4/21 (package/python-attrs: add host variant) to patch 10/21 (boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option).

Maybe update the last patch 10/21 since it was suggested to remove BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option to make binman use mandatory for ti-k3-r5-loader package.

Best regards,
Romain

Quoted 47 lines

Thanks and regards,
Dario

Quoted 41 lines

Note: host-python-jsonschema depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS due to its runtime dependency on host-python-rpds-py.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \ · line 58

Quoted 8 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
@@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
      $(BR2_BISON_HOST_DEPENDENCY) \
      $(BR2_FLEX_HOST_DEPENDENCY)
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)

It's a u-boot package config option. just add host-python-pylibfdt the dependency.

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk TI_K3_R5_LOADER_MAKE_OPTS = \ · line 71

Quoted 11 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
+TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
+endif
+
 ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
 TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
 else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
@@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
      CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
      ARCH=arm \
      HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+     BINMAN_INDIRS=$(BINARIES_DIR) \

I suggested to add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN but indeed we should use binman unconditionally for ti-k3-r5-loader package.

http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Best regards,
Romain

Quoted 3 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
      HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
 define TI_K3_R5_LOADER_BUILD_CMDS
Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#36 lore raw

PATCH v4 14/20 boot/uboot: set BINMAN_INDIRS for TI K3 DM

In reply to Dario Binacchi

As explained in [1], adding support for AM62x LP SK in U-Boot, requires binman for building bootloader images. The BINMAN_INDIRS environment variable is used to provide a space-separated list of directories to search for binary blobs.

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

no changes since v1:

---
 boot/uboot/uboot.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +2 -1
index dda606a88059..cf70f86a4132 100644
@@ -189,7 +189,8 @@ endif
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))
 UBOOT_DEPENDENCIES += ti-k3-boot-firmware
-UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
+UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f \
+	BINMAN_INDIRS=$(BINARIES_DIR)
 endif
 
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#37 lore raw

Re: [Buildroot] [PATCH v4 14/20] boot/uboot: set BINMAN_INDIRS for TI K3 DM

Hi Dario,

Quoted 25 lines · Dario Binacchi

As explained in [1], adding support for AM62x LP SK in U-Boot, requires binman for building bootloader images. The BINMAN_INDIRS environment variable is used to provide a space-separated list of directories to search for binary blobs.

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

no changes since v1:

---
 boot/uboot/uboot.mk | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +0 -0
index dda606a88059..cf70f86a4132 100644
@@ -189,7 +189,8 @@ endif
  ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
  UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))

 UBOOT_DEPENDENCIES += ti-k3-boot-firmware

boot/uboot/uboot.mk endif · line 192

Quoted 2 lines
boot/uboot/uboot.mk +1 -1
-UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
+UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f \

Is the above actually still required with binman?
The names are hardcoded in U-Boot in arch/arm/dts/k3-am625-sk-binman.dtsi

boot/uboot/uboot.mk endif · line 193

Quoted 1 line
boot/uboot/uboot.mk +1 -0
+	BINMAN_INDIRS=$(BINARIES_DIR)

This seems to be the only required part.

Quoted 3 lines

 endif

 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#38 lore raw

Re: [Buildroot] [PATCH v4 14/20] boot/uboot: set BINMAN_INDIRS for TI K3 DM

Hi Alexander,

Quoted 21 lines · Alexander Sverdlin

Hi Dario,

Quoted 17 lines · Dario Binacchi

As explained in [1], adding support for AM62x LP SK in U-Boot, requires binman for building bootloader images. The BINMAN_INDIRS environment variable is used to provide a space-separated list of directories to search for binary blobs.

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

no changes since v1:

---
 boot/uboot/uboot.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 13 lines

boot/uboot/uboot.mk endif · line 192

Quoted 10 lines
boot/uboot/uboot.mk +1 -1
index dda606a88059..cf70f86a4132 100644
@@ -189,7 +189,8 @@ endif
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))
 UBOOT_DEPENDENCIES += ti-k3-boot-firmware
-UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
+UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f \

Is the above actually still required with binman?
The names are hardcoded in U-Boot in arch/arm/dts/k3-am625-sk-binman.dtsi

I will verify with some tests,

Thanks and regards
Dario

Quoted 12 lines

boot/uboot/uboot.mk endif · line 193

Quoted 2 lines
boot/uboot/uboot.mk +1 -0
+     BINMAN_INDIRS=$(BINARIES_DIR)

This seems to be the only required part.

boot/uboot/uboot.mk endif · line 196

Quoted 3 lines
boot/uboot/uboot.mk +0 -0
 endif
 
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)

--
Alexander Sverdlin.

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Andreas Dannenberg
#39 lore raw

Re: [Buildroot] [PATCH v4 14/20] boot/uboot: set BINMAN_INDIRS for TI K3 DM

In reply to Alexander Sverdlin
Quoted 34 lines · Alexander Sverdlin

Hi Dario,

Quoted 25 lines · Dario Binacchi

As explained in [1], adding support for AM62x LP SK in U-Boot, requires binman for building bootloader images. The BINMAN_INDIRS environment variable is used to provide a space-separated list of directories to search for binary blobs.

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

no changes since v1:

---
 boot/uboot/uboot.mk | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +0 -0
index dda606a88059..cf70f86a4132 100644
@@ -189,7 +189,8 @@ endif
  ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
  UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))

 UBOOT_DEPENDENCIES += ti-k3-boot-firmware

boot/uboot/uboot.mk endif · line 192

Quoted 2 lines
boot/uboot/uboot.mk +1 -1
-UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
+UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f \

Is the above actually still required with binman?
The names are hardcoded in U-Boot in arch/arm/dts/k3-am625-sk-binman.dtsi

Quoted 3 lines

boot/uboot/uboot.mk endif · line 193

Quoted 1 line
boot/uboot/uboot.mk +1 -0
+	BINMAN_INDIRS=$(BINARIES_DIR)

This seems to be the only required part.

Correct. 'DM=' is no longer used, also see the official U-Boot build instructions for TI platforms in the SDK documentation [1] (technically speaking this documentation is for the U-Boot vendor tree, but the same principle applies to upstream U-Boot builds).

[1] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html

Quoted 8 lines
Quoted 4 lines

 endif

 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)

Signature · 1 line
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#40 lore raw

Re: [Buildroot] [PATCH v4 14/20] boot/uboot: set BINMAN_INDIRS for TI K3 DM

Hello Andreas,

Le 19/02/2024 à 21:51, Andreas Dannenberg a écrit :

Quoted 39 lines · Alexander Sverdlin
Quoted 34 lines

Hi Dario,

Quoted 25 lines · Dario Binacchi

As explained in [1], adding support for AM62x LP SK in U-Boot, requires binman for building bootloader images. The BINMAN_INDIRS environment variable is used to provide a space-separated list of directories to search for binary blobs.

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

no changes since v1:

---
 boot/uboot/uboot.mk | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +0 -0
index dda606a88059..cf70f86a4132 100644
@@ -189,7 +189,8 @@ endif
  ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
  UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))

 UBOOT_DEPENDENCIES += ti-k3-boot-firmware

boot/uboot/uboot.mk endif · line 192

Quoted 2 lines
boot/uboot/uboot.mk +1 -1
-UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
+UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f \

Is the above actually still required with binman?
The names are hardcoded in U-Boot in arch/arm/dts/k3-am625-sk-binman.dtsi

Quoted 3 lines

boot/uboot/uboot.mk endif · line 193

Quoted 1 line
boot/uboot/uboot.mk +1 -0
+	BINMAN_INDIRS=$(BINARIES_DIR)

This seems to be the only required part.

Quoted 8 lines

Correct. 'DM=' is no longer used, also see the official U-Boot build instructions for TI platforms in the SDK documentation [1] (technically speaking this documentation is for the U-Boot vendor tree, but the same principle applies to upstream U-Boot builds).

[1] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html

It means that we can remove BR2_TARGET_UBOOT_NEEDS_TI_K3_DM and UBOOT_TI_K3_DM_SOCNAME too.

meta-ti still use DM= but probably to support u-boot-ti-staging_2023.04 that is still available [1].

The u-boot documentation also contains a similar note [2].

In the end we only need an option to select which SoC type we want to use (GP,HS,HS-FS).

[1]
https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc?h=cicd.master.202402130100#n52

[2]
https://gitlab.com/u-boot/u-boot/-/blob/master/doc/board/ti/k3.rst?ref_type=heads&plain=1#L372

Best regards,
Romain

Quoted 11 lines
Quoted 11 lines
Quoted 7 lines

 endif

 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)

Signature · 1 line
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#41 lore raw

Re: [Buildroot] [PATCH v4 14/20] boot/uboot: set BINMAN_INDIRS for TI K3 DM

Quoted 51 lines · Romain Naour

Hello Andreas,

Le 19/02/2024 à 21:51, Andreas Dannenberg a écrit :

Quoted 39 lines · Alexander Sverdlin
Quoted 34 lines

Hi Dario,

Quoted 25 lines · Dario Binacchi

As explained in [1], adding support for AM62x LP SK in U-Boot, requires binman for building bootloader images. The BINMAN_INDIRS environment variable is used to provide a space-separated list of directories to search for binary blobs.

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

no changes since v1:

---
 boot/uboot/uboot.mk | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +0 -0
index dda606a88059..cf70f86a4132 100644
@@ -189,7 +189,8 @@ endif
  ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
  UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))

 UBOOT_DEPENDENCIES += ti-k3-boot-firmware

boot/uboot/uboot.mk endif · line 192

Quoted 2 lines
boot/uboot/uboot.mk +1 -1
-UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
+UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f \

Is the above actually still required with binman?
The names are hardcoded in U-Boot in arch/arm/dts/k3-am625-sk-binman.dtsi

Quoted 3 lines

boot/uboot/uboot.mk endif · line 193

Quoted 1 line
boot/uboot/uboot.mk +1 -0
+	BINMAN_INDIRS=$(BINARIES_DIR)

This seems to be the only required part.

Quoted 8 lines

Correct. 'DM=' is no longer used, also see the official U-Boot build instructions for TI platforms in the SDK documentation [1] (technically speaking this documentation is for the U-Boot vendor tree, but the same principle applies to upstream U-Boot builds).

[1] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html

Quoted 7 lines

It means that we can remove BR2_TARGET_UBOOT_NEEDS_TI_K3_DM and UBOOT_TI_K3_DM_SOCNAME too.

meta-ti still use DM= but probably to support u-boot-ti-staging_2023.04 that is still available [1].

The u-boot documentation also contains a similar note [2].

Yes you are right, this option is still available as an override. But best will be to standardize on the new way of doing things, which is BINMAN_INDIRS.

Quoted 2 lines

In the end we only need an option to select which SoC type we want to use (GP,HS,HS-FS).

Yes. There's one small twist to that, technically for HS devices (a.k.a. "HS-SE" devices), which is what an HS-FS device turns into _after_ the fuses are burned with a custom key, the end user will need to provide their own key for signing the boot image, which will then be used instead of './board/ti/keys/custMpk.pem' in the U-Boot tree. Let me think about some more if there isn't a good way that can be done through Builroot, based on how actual end customers manage their private keys (which can be very elaborate, even involving HSMs in some cases). It might be helpful to expose such an override using a config option that can be used to point to an external key. Anyways just food for thought, this shouldn't gate anything on Dario's series here.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 22 lines

[1]
https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc?h=cicd.master.202402130100#n52

[2]
https://gitlab.com/u-boot/u-boot/-/blob/master/doc/board/ti/k3.rst?ref_type=heads&plain=1#L372

Best regards,
Romain

Quoted 11 lines
Quoted 11 lines
Quoted 7 lines

 endif

 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)

Signature · 1 line
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#42 lore raw

Re: [Buildroot] [PATCH v4 14/20] boot/uboot: set BINMAN_INDIRS for TI K3 DM

In reply to Dario Binacchi

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 4 lines

As explained in [1], adding support for AM62x LP SK in U-Boot, requires binman for building bootloader images. The BINMAN_INDIRS environment variable is used to provide a space-separated list of directories to search for binary blobs.

Binman is not a tool specific to TI K3 SoC and may be used by any other SoC vendor. I believe we should add a new u-boot option for it (BR2_TARGET_UBOOT_USE_BINMAN) and not depend on BR2_TARGET_UBOOT_NEEDS_TI_K3_DM being enabled.

http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Quoted 18 lines

[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

no changes since v1:

---
 boot/uboot/uboot.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +0 -0
index dda606a88059..cf70f86a4132 100644

boot/uboot/uboot.mk endif · line 194

Quoted 7 lines
boot/uboot/uboot.mk +2 -1
@@ -189,7 +189,8 @@ endif
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))
 UBOOT_DEPENDENCIES += ti-k3-boot-firmware
-UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
+UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f \
+	BINMAN_INDIRS=$(BINARIES_DIR)
 endif

Binman dependencies are missing.

Best regards,
Romain

boot/uboot/uboot.mk endif · line 196

Quoted 2 lines
boot/uboot/uboot.mk +0 -0
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#43 lore raw

PATCH v4 15/20 configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01

In reply to Dario Binacchi

The 2024.01 version of U-Boot for the am62x-sk board has introduced two major changes:
- The device tree k3-am625-sk.dtb is no longer searched in /boot, but in /boot/dtb/ti. Hence, the disabling of BR2_LINUX_KERNEL_INSTALL_TARGET and the use of extlinux.conf for the proper loading of the device tree. Furthermore, the parameter BR2_ROOTFS_POST_SCRIPT_ARGS was used to auto-generate the extlinux.conf file so that developers can change the kernel loading options by modifying the .config.
- The use of binman for building images.

Tested on SK-AM62B-P1.

---

Changes in v4:
- bump to 204.01 instead of 2023.10
- Update the commit message
- Replace 'PARTUUID=00000000-02' with '/dev/mmcblk1p2' where to get rootfs in the BR2_ROOTFS_POST_SCRIPT_ARGS insided the ti_am62x_sk_defconfig.

Changes in v2:
- Update the commit message
- Drop Python options required by binman.
- Enable BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN. This option automatically selects the Python modules required by binman.

---
 board/ti/am62x-sk/genimage.cfg  |  7 ++++-
 board/ti/am62x-sk/post-build.sh | 49 +++++++++++++++++++++++++++++++++
 board/ti/am62x-sk/post-image.sh |  5 ++++
 configs/ti_am62x_sk_defconfig   | 11 ++++----
 4 files changed, 66 insertions(+), 6 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh
board/ti/am62x-sk/genimage.cfg +6 -1
index 26304fe98f99..398209f4d831 100644
@@ -4,10 +4,15 @@ image boot.vfat {
 			"tiboot3.bin",
 			"tispl.bin",
 			"u-boot.img",
+			"k3-am625-sk.dtb",
+			"Image"
+		}
+		file extlinux/extlinux.conf {
+			image = extlinux.conf
 		}
 	}
 
-	size = 16M
+	size = 64M
 }
 
 image sdcard.img {
board/ti/am62x-sk/post-build.sh new file +49 -0

49 lines not on this page · raw message

board/ti/am62x-sk/post-image.sh new file +5 -0
new file mode 100755
index 000000000000..34f732c091ad
@@ -0,0 +1,5 @@
+#!/bin/sh -x
+
+BOARD_DIR="$(dirname "$0")"
+
+support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
configs/ti_am62x_sk_defconfig +6 -5
index a4cffe09ce72..193301c8b941 100644
@@ -1,14 +1,14 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
-BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
-BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
 BR2_TARGET_ROOTFS_EXT2=y
@@ -27,14 +27,15 @@ BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
-BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
 BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_evm_a53"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
 BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
 BR2_TARGET_UBOOT_NEEDS_TI_K3_DM=y
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#44 lore raw

Re: [Buildroot] [PATCH v4 15/20] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01

Quoted 10 lines · Dario Binacchi

The 2024.01 version of U-Boot for the am62x-sk board has introduced two major changes:
- The device tree k3-am625-sk.dtb is no longer searched in /boot, but in /boot/dtb/ti. Hence, the disabling of BR2_LINUX_KERNEL_INSTALL_TARGET and the use of extlinux.conf for the proper loading of the device tree. Furthermore, the parameter BR2_ROOTFS_POST_SCRIPT_ARGS was used to auto-generate the extlinux.conf file so that developers can change the kernel loading options by modifying the .config.
- The use of binman for building images.

Quoted 3 lines

Tested on SK-AM62B-P1.

[]

configs/ti_am62x_sk_defconfig BR2_TARGET_TI_K3_IMAGE_GEN=y · line 30

Quoted 6 lines
(quoted diff) +0 -0
@@ -27,14 +27,15 @@ BR2_TARGET_TI_K3_IMAGE_GEN=y

 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y

configs/ti_am62x_sk_defconfig +1 -1
-BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"

Is patch 3/20 really required in this case?
Is custom version required if you set the same version as default in patch 5/20?

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#45 lore raw

Re: [Buildroot] [PATCH v4 15/20] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01

Hi Alexander,

Quoted 29 lines · Alexander Sverdlin
Quoted 10 lines · Dario Binacchi

The 2024.01 version of U-Boot for the am62x-sk board has introduced two major changes:
- The device tree k3-am625-sk.dtb is no longer searched in /boot, but in /boot/dtb/ti. Hence, the disabling of BR2_LINUX_KERNEL_INSTALL_TARGET and the use of extlinux.conf for the proper loading of the device tree. Furthermore, the parameter BR2_ROOTFS_POST_SCRIPT_ARGS was used to auto-generate the extlinux.conf file so that developers can change the kernel loading options by modifying the .config.
- The use of binman for building images.

Quoted 3 lines

Tested on SK-AM62B-P1.

[]

configs/ti_am62x_sk_defconfig BR2_TARGET_TI_K3_IMAGE_GEN=y · line 30

Quoted 6 lines
configs/ti_am62x_sk_defconfig +1 -1
@@ -27,14 +27,15 @@ BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
-BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"

Is patch 3/20 really required in this case?
Is custom version required if you set the same version as default in patch 5/20?

Quoted 3 lines

--
Alexander Sverdlin.

Romain asked me to update the default version for ti-k3-r5-loader to 2024.01. Therefore,
I wanted this change not to improperly advance the version for the ti_am6{2,4}x_sk_defconfig configuration.
Additionally, I wanted to put these patches before the ones I had already submitted in version 3, to have a
more readable separation between before and after.

Thanks and regards,
Dario

--

Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________

Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#46 lore raw

PATCH v4 16/20 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1

In reply to Dario Binacchi

Tested on SK-AM62B-P1.

---

Changes in v4
- Add BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6 to ti_am62x_sk_defconfig.

no changes since v1

---
 configs/ti_am62x_sk_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/ti_am62x_sk_defconfig +2 -2
index 193301c8b941..4de39fb897fd 100644
@@ -1,11 +1,11 @@
 BR2_aarch64=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.1"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#47 lore raw

Re: [Buildroot] [PATCH v4 16/20] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1

Hi Dario,

Quoted 29 lines · Dario Binacchi

Tested on SK-AM62B-P1.

---

Changes in v4
- Add BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6 to ti_am62x_sk_defconfig.

no changes since v1

---
 configs/ti_am62x_sk_defconfig | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
configs/ti_am62x_sk_defconfig +0 -0
index 193301c8b941..4de39fb897fd 100644
@@ -1,11 +1,11 @@

 BR2_aarch64=y

configs/ti_am62x_sk_defconfig +1 -1
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y

 BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y

configs/ti_am62x_sk_defconfig line 8

Quoted 2 lines
configs/ti_am62x_sk_defconfig +1 -1
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.1"

Could be updated to v6.6.17 if you re-spin?

Quoted 3 lines

 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#48 lore raw

Re: [Buildroot] [PATCH v4 16/20] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1

Hi Alexander,

Quoted 29 lines · Alexander Sverdlin

Hi Dario,

Quoted 25 lines · Dario Binacchi

Tested on SK-AM62B-P1.

---

Changes in v4
- Add BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6 to ti_am62x_sk_defconfig.

no changes since v1

---
 configs/ti_am62x_sk_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/ti_am62x_sk_defconfig +1 -1
index 193301c8b941..4de39fb897fd 100644
@@ -1,11 +1,11 @@
 BR2_aarch64=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
Quoted 8 lines

configs/ti_am62x_sk_defconfig line 8

Quoted 6 lines
configs/ti_am62x_sk_defconfig +1 -1
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.1"

Could be updated to v6.6.17 if you re-spin?

Of course.

Thanks and regards,
Dario

Quoted 8 lines

configs/ti_am62x_sk_defconfig line 11

Quoted 4 lines
configs/ti_am62x_sk_defconfig +0 -0
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"

--
Alexander Sverdlin.

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#49 lore raw

PATCH v4 17/20 boot: move ti-k3-* packages to 'ti-k3' directory

In reply to Dario Binacchi

Move all TI K3 packages to the directory ti-k3. This patch is preparatory for future developments.

---

Added in v4

---
 boot/Config.in                                      |  5 +----
 boot/ti-k3/Config.in                                | 13 +++++++++++++
 boot/ti-k3/common.mk                                |  1 +
 boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in      |  0
 .../ti-k3-boot-firmware/ti-k3-boot-firmware.hash    |  0
 .../ti-k3-boot-firmware/ti-k3-boot-firmware.mk      |  0
 boot/{ => ti-k3}/ti-k3-core-secdev/Config.in        |  0
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash        |  0
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk          |  0
 boot/{ => ti-k3}/ti-k3-image-gen/Config.in          |  0
 .../ti-k3-image-gen/ti-k3-image-gen.hash            |  0
 boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk |  0
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in          |  0
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash            |  0
 boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk |  0
 configs/ti_am62x_sk_defconfig                       |  1 +
 configs/ti_am64x_sk_defconfig                       |  1 +
 17 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/ti-k3-core-secdev.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/ti-k3-core-secdev.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (100%)
boot/Config.in +1 -4
index 18a7d268f95a..74a64a096afc 100644
@@ -19,10 +19,7 @@ source "boot/opensbi/Config.in"
 source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
-source "boot/ti-k3-boot-firmware/Config.in"
-source "boot/ti-k3-core-secdev/Config.in"
-source "boot/ti-k3-image-gen/Config.in"
-source "boot/ti-k3-r5-loader/Config.in"
+source "boot/ti-k3/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 
boot/ti-k3/Config.in new file +13 -0
new file mode 100644
index 000000000000..06dda2f156a9
@@ -0,0 +1,13 @@
+config BR2_TARGET_TI_K3
+	bool "TI K3"
+	help
+	  The TI K3 bootloaders and tools.
+
+if BR2_TARGET_TI_K3
+
+source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3/ti-k3-core-secdev/Config.in"
+source "boot/ti-k3/ti-k3-image-gen/Config.in"
+source "boot/ti-k3/ti-k3-r5-loader/Config.in"
+
+endif
boot/ti-k3/common.mk new file +1 -0
new file mode 100644
index 000000000000..18a1329baa4c
@@ -0,0 +1 @@
+include $(sort $(wildcard boot/ti-k3/*/*.mk))
boot/ti-k3/ti-k3-boot-firmware/Config.in renamed from boot/ti-k3-boot-firmware/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/Config.in
rename to boot/ti-k3/ti-k3-boot-firmware/Config.in
boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.hash renamed from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
rename to boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.mk renamed from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
rename to boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
boot/ti-k3/ti-k3-core-secdev/Config.in renamed from boot/ti-k3-core-secdev/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/Config.in
rename to boot/ti-k3/ti-k3-core-secdev/Config.in
boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash renamed from boot/ti-k3-core-secdev/ti-k3-core-secdev.hash +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/ti-k3-core-secdev.hash
rename to boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk renamed from boot/ti-k3-core-secdev/ti-k3-core-secdev.mk +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/ti-k3-core-secdev.mk
rename to boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
boot/ti-k3/ti-k3-image-gen/Config.in renamed from boot/ti-k3-image-gen/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/Config.in
rename to boot/ti-k3/ti-k3-image-gen/Config.in
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.hash renamed from boot/ti-k3-image-gen/ti-k3-image-gen.hash +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/ti-k3-image-gen.hash
rename to boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.hash
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk renamed from boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/ti-k3-image-gen.mk
rename to boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk
boot/ti-k3/ti-k3-r5-loader/Config.in renamed from boot/ti-k3-r5-loader/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/Config.in
rename to boot/ti-k3/ti-k3-r5-loader/Config.in
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.hash renamed from boot/ti-k3-r5-loader/ti-k3-r5-loader.hash +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
rename to boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.hash
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk renamed from boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
rename to boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk
configs/ti_am62x_sk_defconfig +1 -0
index 4de39fb897fd..cd26235342e4 100644
@@ -23,6 +23,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
+BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
configs/ti_am64x_sk_defconfig +1 -0
index 5fd9653b5b8f..1befeb4ab96c 100644
@@ -23,6 +23,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
+BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#50 lore raw

Re: [Buildroot] [PATCH v4 17/20] boot: move ti-k3-* packages to 'ti-k3' directory

Quoted 2 lines · Dario Binacchi

Move all TI K3 packages to the directory ti-k3.

The Buildroot documentation states that "New subdirectories are discouraged".
See https://buildroot.org/downloads/manual/manual.html#_package_directory

François

Quoted 171 lines

This patch is preparatory for future developments.

---

Added in v4

---
 boot/Config.in                                      |  5 +----
 boot/ti-k3/Config.in                                | 13 +++++++++++++
 boot/ti-k3/common.mk                                |  1 +
 boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in      |  0
 .../ti-k3-boot-firmware/ti-k3-boot-firmware.hash    |  0
 .../ti-k3-boot-firmware/ti-k3-boot-firmware.mk      |  0
 boot/{ => ti-k3}/ti-k3-core-secdev/Config.in        |  0
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash        |  0
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk          |  0
 boot/{ => ti-k3}/ti-k3-image-gen/Config.in          |  0
 .../ti-k3-image-gen/ti-k3-image-gen.hash            |  0
 boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk |  0
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in          |  0
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash            |  0
 boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk |  0
 configs/ti_am62x_sk_defconfig                       |  1 +
 configs/ti_am64x_sk_defconfig                       |  1 +
 17 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
(100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/ti-k3-core-secdev.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/ti-k3-core-secdev.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (100%)
boot/Config.in +1 -4
index 18a7d268f95a..74a64a096afc 100644
@@ -19,10 +19,7 @@ source "boot/opensbi/Config.in"
 source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
-source "boot/ti-k3-boot-firmware/Config.in"
-source "boot/ti-k3-core-secdev/Config.in"
-source "boot/ti-k3-image-gen/Config.in"
-source "boot/ti-k3-r5-loader/Config.in"
+source "boot/ti-k3/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 
boot/ti-k3/Config.in new file +13 -0
new file mode 100644
index 000000000000..06dda2f156a9
@@ -0,0 +1,13 @@
+config BR2_TARGET_TI_K3
+       bool "TI K3"
+       help
+         The TI K3 bootloaders and tools.
+
+if BR2_TARGET_TI_K3
+
+source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3/ti-k3-core-secdev/Config.in"
+source "boot/ti-k3/ti-k3-image-gen/Config.in"
+source "boot/ti-k3/ti-k3-r5-loader/Config.in"
+
+endif
boot/ti-k3/common.mk new file +1 -0
new file mode 100644
index 000000000000..18a1329baa4c
@@ -0,0 +1 @@
+include $(sort $(wildcard boot/ti-k3/*/*.mk))
boot/ti-k3/ti-k3-boot-firmware/Config.in renamed from boot/ti-k3-boot-firmware/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/Config.in
rename to boot/ti-k3/ti-k3-boot-firmware/Config.in
boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.hash renamed from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
rename to boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.mk renamed from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
rename to boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
boot/ti-k3/ti-k3-core-secdev/Config.in renamed from boot/ti-k3-core-secdev/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/Config.in
rename to boot/ti-k3/ti-k3-core-secdev/Config.in
boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash renamed from boot/ti-k3-core-secdev/ti-k3-core-secdev.hash +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/ti-k3-core-secdev.hash
rename to boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk renamed from boot/ti-k3-core-secdev/ti-k3-core-secdev.mk +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/ti-k3-core-secdev.mk
rename to boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
boot/ti-k3/ti-k3-image-gen/Config.in renamed from boot/ti-k3-image-gen/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/Config.in
rename to boot/ti-k3/ti-k3-image-gen/Config.in
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.hash renamed from boot/ti-k3-image-gen/ti-k3-image-gen.hash +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/ti-k3-image-gen.hash
rename to boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.hash
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk renamed from boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/ti-k3-image-gen.mk
rename to boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk
boot/ti-k3/ti-k3-r5-loader/Config.in renamed from boot/ti-k3-r5-loader/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/Config.in
rename to boot/ti-k3/ti-k3-r5-loader/Config.in
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.hash renamed from boot/ti-k3-r5-loader/ti-k3-r5-loader.hash +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
rename to boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.hash
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk renamed from boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
rename to boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk
configs/ti_am62x_sk_defconfig +1 -0
index 4de39fb897fd..cd26235342e4 100644
@@ -23,6 +23,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
+BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
configs/ti_am64x_sk_defconfig +1 -1
index 5fd9653b5b8f..1befeb4ab96c 100644
@@ -23,6 +23,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
+BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
--
Quoted 3 lines

2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#51 lore raw

Re: [Buildroot] [PATCH v4 17/20] boot: move ti-k3-* packages to 'ti-k3' directory

Hi François,

Quoted 10 lines · François Perrad
Quoted 2 lines · Dario Binacchi

Move all TI K3 packages to the directory ti-k3.

The Buildroot documentation states that "New subdirectories are discouraged". See https://buildroot.org/downloads/manual/manual.html#_package_directory

This patch is preliminary to the next one. That is, I wanted to decouple the SECTYPE and SOC configurations
from a specific package since they are general parameters for the ti-k3 platform. This seemed to me the best
solution. Any alternative suggestions are welcome.

Thanks and regards,
Dario

Quoted 164 lines

François

Quoted 161 lines

This patch is preparatory for future developments.

---

Added in v4

---
 boot/Config.in                                      |  5 +----
 boot/ti-k3/Config.in                                | 13 +++++++++++++
 boot/ti-k3/common.mk                                |  1 +
 boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in      |  0
 .../ti-k3-boot-firmware/ti-k3-boot-firmware.hash    |  0
 .../ti-k3-boot-firmware/ti-k3-boot-firmware.mk      |  0
 boot/{ => ti-k3}/ti-k3-core-secdev/Config.in        |  0
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash        |  0
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk          |  0
 boot/{ => ti-k3}/ti-k3-image-gen/Config.in          |  0
 .../ti-k3-image-gen/ti-k3-image-gen.hash            |  0
 boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk |  0
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in          |  0
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash            |  0
 boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk |  0
 configs/ti_am62x_sk_defconfig                       |  1 +
 configs/ti_am64x_sk_defconfig                       |  1 +
 17 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/ti-k3-core-secdev.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-core-secdev/ti-k3-core-secdev.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (100%)
boot/Config.in +1 -4
index 18a7d268f95a..74a64a096afc 100644
@@ -19,10 +19,7 @@ source "boot/opensbi/Config.in"
 source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
-source "boot/ti-k3-boot-firmware/Config.in"
-source "boot/ti-k3-core-secdev/Config.in"
-source "boot/ti-k3-image-gen/Config.in"
-source "boot/ti-k3-r5-loader/Config.in"
+source "boot/ti-k3/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 
boot/ti-k3/Config.in new file +13 -0
new file mode 100644
index 000000000000..06dda2f156a9
@@ -0,0 +1,13 @@
+config BR2_TARGET_TI_K3
+       bool "TI K3"
+       help
+         The TI K3 bootloaders and tools.
+
+if BR2_TARGET_TI_K3
+
+source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
+source "boot/ti-k3/ti-k3-core-secdev/Config.in"
+source "boot/ti-k3/ti-k3-image-gen/Config.in"
+source "boot/ti-k3/ti-k3-r5-loader/Config.in"
+
+endif
boot/ti-k3/common.mk new file +1 -0
new file mode 100644
index 000000000000..18a1329baa4c
@@ -0,0 +1 @@
+include $(sort $(wildcard boot/ti-k3/*/*.mk))
boot/ti-k3/ti-k3-boot-firmware/Config.in renamed from boot/ti-k3-boot-firmware/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/Config.in
rename to boot/ti-k3/ti-k3-boot-firmware/Config.in
boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.hash renamed from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
rename to boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.mk renamed from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk +0 -0
similarity index 100%
rename from boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
rename to boot/ti-k3/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
boot/ti-k3/ti-k3-core-secdev/Config.in renamed from boot/ti-k3-core-secdev/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/Config.in
rename to boot/ti-k3/ti-k3-core-secdev/Config.in
boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash renamed from boot/ti-k3-core-secdev/ti-k3-core-secdev.hash +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/ti-k3-core-secdev.hash
rename to boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk renamed from boot/ti-k3-core-secdev/ti-k3-core-secdev.mk +0 -0
similarity index 100%
rename from boot/ti-k3-core-secdev/ti-k3-core-secdev.mk
rename to boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
boot/ti-k3/ti-k3-image-gen/Config.in renamed from boot/ti-k3-image-gen/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/Config.in
rename to boot/ti-k3/ti-k3-image-gen/Config.in
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.hash renamed from boot/ti-k3-image-gen/ti-k3-image-gen.hash +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/ti-k3-image-gen.hash
rename to boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.hash
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk renamed from boot/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
similarity index 100%
rename from boot/ti-k3-image-gen/ti-k3-image-gen.mk
rename to boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk
boot/ti-k3/ti-k3-r5-loader/Config.in renamed from boot/ti-k3-r5-loader/Config.in +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/Config.in
rename to boot/ti-k3/ti-k3-r5-loader/Config.in
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.hash renamed from boot/ti-k3-r5-loader/ti-k3-r5-loader.hash +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
rename to boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.hash
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk renamed from boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
similarity index 100%
rename from boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
rename to boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk
configs/ti_am62x_sk_defconfig +1 -0
index 4de39fb897fd..cd26235342e4 100644
@@ -23,6 +23,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
+BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
configs/ti_am64x_sk_defconfig +1 -1
index 5fd9653b5b8f..1befeb4ab96c 100644
@@ -23,6 +23,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
+BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
--

2.43.0

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#52 lore raw

PATCH v4 18/20 boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

In reply to Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+	prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+	bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+	bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+	bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+	bool "am65x"
+
+endchoice
+
+choice
+	prompt "Security type"
+	help
+	  The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+	bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+	bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+	string
+	default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+	default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+	default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+	string
+	default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+	default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58

77 lines not on this page · raw message

boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
 	$(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
 	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 	bool "U-Boot needs TI K3 Device Manager (DM)"
 	# We use the SoC selection defined for the ti-k3-image-gen
 	# package
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
 	help
 	  Some TI K3 devices need the Device Manager (DM) firmware to
 	  be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
 	string
-	default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +1 -1
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v4 18/20
#53 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Hi Dario,

Quoted 5 lines · Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

Missing SoB?

The patch looks more complete to me than https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
because of SECTYPE variables.

Quoted 225 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++ boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++----------------- boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +- boot/uboot/Config.in                          |  7 +-- configs/ti_am62x_sk_defconfig                 |  2 +- configs/ti_am64x_sk_defconfig                 |  2 +-

 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +0 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3


 if BR2_TARGET_TI_K3

boot/ti-k3/Config.in +46 -0
+choice
+	prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+	bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+	bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+	bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+	bool "am65x"
+
+endchoice
+
+choice
+	prompt "Security type"
+	help
+	  The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+	bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+	bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+	string
+	default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+	default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+	default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+	string
+	default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+	default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+

 source "boot/ti-k3/ti-k3-boot-firmware/Config.in" source "boot/ti-k3/ti-k3-core-secdev/Config.in" source "boot/ti-k3/ti-k3-image-gen/Config.in"

boot/ti-k3/ti-k3-image-gen/Config.in +0 -0
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN

  bool "ti-k3-image-gen"
  depends on BR2_TARGET_TI_K3_R5_LOADER
  select BR2_TARGET_TI_K3_BOOT_FIRMWARE

boot/ti-k3/ti-k3-image-gen/Config.in +1 -1
-	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS

  # We need FIT support in uboot-tools, which is why we select a

 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
boot/ti-k3/ti-k3-image-gen/Config.in +0 -0
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN

    https://git.ti.com/cgit/k3-image-gen/k3-image-gen/

 if BR2_TARGET_TI_K3_IMAGE_GEN

boot/ti-k3/ti-k3-image-gen/Config.in +0 -47
-choice
-	prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-	bool "am65x"
-
-endchoice
-
-choice
-	prompt "Security type"
-	help
-	  The target SoC security type option for image gen.  Valid
-	  options are "gp" for General Purpose devices, "hs-fs" for
-	  High Security - Field Securable devices, or "hs" for High
-	  Security - Security Enforcing devices.  Note for all High
-	  Security device variants the TI_SECURE_DEV_PKG environmental
-	  variable must be defined at build time pointing to a valid
-	  core-secdev-k3 folder location, otherwise the build will
-	  fail, see
-	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-	bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-	string
-	default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X


 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
  string

boot/ti-k3/ti-k3-image-gen/Config.in +4 -10
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-	string
-	default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+	default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+	default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+	default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X


 endif

boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +0 -0
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
  	$(BR2_MAKE_HOST_DEPENDENCY)


 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))

boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +2 -2
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))

boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +1 -1
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)

 TI_K3_IMAGE_GEN_SYSFW = \
  $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin else

boot/uboot/Config.in +0 -0
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM

  bool "U-Boot needs TI K3 Device Manager (DM)"
  # We use the SoC selection defined for the ti-k3-image-gen

 	# package
boot/uboot/Config.in +1 -2
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X

  help
    Some TI K3 devices need the Device Manager (DM) firmware to be available for the U-Boot build.

boot/uboot/Config.in +0 -0
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM


 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
  string

boot/uboot/Config.in +2 -2
-	default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X


 endif

configs/ti_am62x_sk_defconfig +0 -0
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y

 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x" BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y BR2_TARGET_TI_K3_IMAGE_GEN=y -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y BR2_TARGET_TI_K3_R5_LOADER=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"

configs/ti_am64x_sk_defconfig +0 -0
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y

 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x" BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x" BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y BR2_TARGET_TI_K3_IMAGE_GEN=y -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y BR2_TARGET_TI_K3_R5_LOADER=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#54 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Hi Alexander,

Quoted 11 lines · Alexander Sverdlin

Hi Dario,

Quoted 5 lines · Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

Missing SoB?

Good catch,

Thanks and regards,
Dario

Quoted 235 lines

The patch looks more complete to me than https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
because of SECTYPE variables.

Quoted 216 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+     prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+     bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+     bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+     bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+     bool "am65x"
+
+endchoice
+
+choice
+     prompt "Security type"
+     help
+       The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+     bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+     bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+     bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+     string
+     default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+     default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+     default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+     default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+     string
+     default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+     default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+     default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
      bool "ti-k3-image-gen"
      depends on BR2_TARGET_TI_K3_R5_LOADER
      select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-     select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+     select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
      # We need FIT support in uboot-tools, which is why we select a
      # host package
      select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
        https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-     prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-     bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-     bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-     bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-     bool "am65x"
-
-endchoice
-
-choice
-     prompt "Security type"
-     help
-       The target SoC security type option for image gen.  Valid
-       options are "gp" for General Purpose devices, "hs-fs" for
-       High Security - Field Securable devices, or "hs" for High
-       Security - Security Enforcing devices.  Note for all High
-       Security device variants the TI_SECURE_DEV_PKG environmental
-       variable must be defined at build time pointing to a valid
-       core-secdev-k3 folder location, otherwise the build will
-       fail, see
-       https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-     bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-     bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-     bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-     string
-     default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-     default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-     default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-     default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
      string
-     default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-     default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-     default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-     default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-     string
-     default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-     default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-     default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+     default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+     default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+     default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+     default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
      $(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
      $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
      bool "U-Boot needs TI K3 Device Manager (DM)"
      # We use the SoC selection defined for the ti-k3-image-gen
      # package
-     depends on BR2_TARGET_TI_K3_IMAGE_GEN
-     depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+     depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
      help
        Some TI K3 devices need the Device Manager (DM) firmware to
        be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
      string
-     default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-     default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+     default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+     default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +0 -0
index 1befeb4ab96c..daf78dbffff8 100644

configs/ti_am64x_sk_defconfig BR2_TARGET_OPTEE_OS=y · line 31

Quoted 9 lines
configs/ti_am64x_sk_defconfig +1 -1
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

--
Alexander Sverdlin.

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#55 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

In reply to Dario Binacchi

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 5 lines

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

I'm agree that Buildroot doesn't provide any "Platform selection" as the Linux kernel and I'm not sure where those TI_K3_{SECTYPE,SOC} should belong.

Best regards,
Romain

Quoted 217 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+	prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+	bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+	bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+	bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+	bool "am65x"
+
+endchoice
+
+choice
+	prompt "Security type"
+	help
+	  The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+	bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+	bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+	string
+	default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+	default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+	default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+	string
+	default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+	default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	bool "ti-k3-image-gen"
 	depends on BR2_TARGET_TI_K3_R5_LOADER
 	select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
 	# We need FIT support in uboot-tools, which is why we select a
 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-	prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-	bool "am65x"
-
-endchoice
-
-choice
-	prompt "Security type"
-	help
-	  The target SoC security type option for image gen.  Valid
-	  options are "gp" for General Purpose devices, "hs-fs" for
-	  High Security - Field Securable devices, or "hs" for High
-	  Security - Security Enforcing devices.  Note for all High
-	  Security device variants the TI_SECURE_DEV_PKG environmental
-	  variable must be defined at build time pointing to a valid
-	  core-secdev-k3 folder location, otherwise the build will
-	  fail, see
-	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-	bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-	string
-	default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
 	string
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-	string
-	default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+	default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+	default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+	default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
 	$(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
 	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 	bool "U-Boot needs TI K3 Device Manager (DM)"
 	# We use the SoC selection defined for the ti-k3-image-gen
 	# package
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
 	help
 	  Some TI K3 devices need the Device Manager (DM) firmware to
 	  be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
 	string
-	default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +0 -0
index 1befeb4ab96c..daf78dbffff8 100644

configs/ti_am64x_sk_defconfig BR2_TARGET_OPTEE_OS=y · line 31

Quoted 9 lines
configs/ti_am64x_sk_defconfig +1 -1
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#56 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Romain, Dario,

Quoted 11 lines · Romain Naour

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 5 lines

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

I'm agree that Buildroot doesn't provide any "Platform selection" as the Linux kernel and I'm not sure where those TI_K3_{SECTYPE,SOC} should belong.

There were discussions/suggestions around this before by Yann E Morin
[1] and Thomas Petazzoni [2]. I think the gist of it was to move the selection to a new package like BR2_PACKAGE_TI_K3_PLATFORM containing all the K3 SoC specific selections. And then other packages and Kconfig menues can depend on it more cleanly. Like it's currently done with package/freescale-imx/Config.in. This would also bring some consistency in how those NXP and TI device families are managed, which will make for a better end-user experience I think.

--
Andreas Dannenberg
Texas Instruments Inc

[1] http://lists.busybox.net/pipermail/buildroot/2023-June/669342.html
[2] http://lists.busybox.net/pipermail/buildroot/2023-August/673292.html

Quoted 223 lines

Best regards,
Romain

Quoted 218 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+	prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+	bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+	bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+	bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+	bool "am65x"
+
+endchoice
+
+choice
+	prompt "Security type"
+	help
+	  The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+	bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+	bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+	string
+	default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+	default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+	default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+	string
+	default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+	default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+	default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	bool "ti-k3-image-gen"
 	depends on BR2_TARGET_TI_K3_R5_LOADER
 	select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+	select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
 	# We need FIT support in uboot-tools, which is why we select a
 	# host package
 	select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-	prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-	bool "am65x"
-
-endchoice
-
-choice
-	prompt "Security type"
-	help
-	  The target SoC security type option for image gen.  Valid
-	  options are "gp" for General Purpose devices, "hs-fs" for
-	  High Security - Field Securable devices, or "hs" for High
-	  Security - Security Enforcing devices.  Note for all High
-	  Security device variants the TI_SECURE_DEV_PKG environmental
-	  variable must be defined at build time pointing to a valid
-	  core-secdev-k3 folder location, otherwise the build will
-	  fail, see
-	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-	bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-	string
-	default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
 	string
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-	string
-	default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+	default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+	default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+	default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
 	$(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
 	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 	bool "U-Boot needs TI K3 Device Manager (DM)"
 	# We use the SoC selection defined for the ti-k3-image-gen
 	# package
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
 	help
 	  Some TI K3 devices need the Device Manager (DM) firmware to
 	  be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
 	string
-	default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+	default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +0 -0
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
Quoted 9 lines

configs/ti_am64x_sk_defconfig BR2_TARGET_OPTEE_OS=y · line 31

Quoted 8 lines
configs/ti_am64x_sk_defconfig +1 -1
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#57 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Hi Andreas, Romain, All

Quoted 16 lines · Andreas Dannenberg

Romain, Dario,

Quoted 11 lines · Romain Naour

Hello Dario,

Quoted 5 lines · Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

I'm agree that Buildroot doesn't provide any "Platform selection" as the Linux kernel and I'm not sure where those TI_K3_{SECTYPE,SOC} should belong.

Quoted 8 lines

There were discussions/suggestions around this before by Yann E Morin
[1] and Thomas Petazzoni [2]. I think the gist of it was to move the selection to a new package like BR2_PACKAGE_TI_K3_PLATFORM containing all the K3 SoC specific selections. And then other packages and Kconfig menues can depend on it more cleanly. Like it's currently done with package/freescale-imx/Config.in. This would also bring some consistency in how those NXP and TI device families are managed, which will make for a better end-user experience I think.

If I'm not mistaken, I think the patches:
[18/20] boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope [17/20] boot: move ti-k3-* packages to 'ti-k3' directory
Are heading in the direction of what we find in package/freescale-imx/, with the only difference being
that in our case, we're under boot.
So, can I consider these two patches correct?

Thanks and regards,
Dario

Quoted 243 lines

--
Andreas Dannenberg
Texas Instruments Inc

[1] http://lists.busybox.net/pipermail/buildroot/2023-June/669342.html
[2] http://lists.busybox.net/pipermail/buildroot/2023-August/673292.html

Quoted 232 lines

Best regards,
Romain

Quoted 226 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+   prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+   bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+   bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+   bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+   bool "am65x"
+
+endchoice
+
+choice
+   prompt "Security type"
+   help
+     The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+   bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+   bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+   string
+   default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+   default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+   string
+   default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+   default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
    bool "ti-k3-image-gen"
    depends on BR2_TARGET_TI_K3_R5_LOADER
    select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
    # We need FIT support in uboot-tools, which is why we select a
    # host package
    select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
      https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-   prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-   bool "am65x"
-
-endchoice
-
-choice
-   prompt "Security type"
-   help
-     The target SoC security type option for image gen.  Valid
-     options are "gp" for General Purpose devices, "hs-fs" for
-     High Security - Field Securable devices, or "hs" for High
-     Security - Security Enforcing devices.  Note for all High
-     Security device variants the TI_SECURE_DEV_PKG environmental
-     variable must be defined at build time pointing to a valid
-     core-secdev-k3 folder location, otherwise the build will
-     fail, see
-     https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-   bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-   string
-   default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
    string
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-   string
-   default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
    $(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
    $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
    bool "U-Boot needs TI K3 Device Manager (DM)"
    # We use the SoC selection defined for the ti-k3-image-gen
    # package
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
    help
      Some TI K3 devices need the Device Manager (DM) firmware to
      be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
    string
-   default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +1 -1
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#58 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Hi Dario,

Le 20/02/2024 à 10:05, Dario Binacchi a écrit :

Quoted 28 lines

Hi Andreas, Romain, All

Quoted 16 lines · Andreas Dannenberg

Romain, Dario,

Quoted 11 lines · Romain Naour

Hello Dario,

Quoted 5 lines · Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

I'm agree that Buildroot doesn't provide any "Platform selection" as the Linux kernel and I'm not sure where those TI_K3_{SECTYPE,SOC} should belong.

Quoted 8 lines

There were discussions/suggestions around this before by Yann E Morin
[1] and Thomas Petazzoni [2]. I think the gist of it was to move the selection to a new package like BR2_PACKAGE_TI_K3_PLATFORM containing all the K3 SoC specific selections. And then other packages and Kconfig menues can depend on it more cleanly. Like it's currently done with package/freescale-imx/Config.in. This would also bring some consistency in how those NXP and TI device families are managed, which will make for a better end-user experience I think.

Quoted 7 lines

If I'm not mistaken, I think the patches:
[18/20] boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope [17/20] boot: move ti-k3-* packages to 'ti-k3' directory
Are heading in the direction of what we find in package/freescale-imx/, with the only difference being
that in our case, we're under boot.
So, can I consider these two patches correct?

Yes, can you try to move ti-k3 to package directory in V5 ? It would also be used later by the GPU rogue firmwares.

Please add a comment in the commit log that we make an exception to the rule "no subdirectory in package directory".

Thanks!

Best regards,
Romain

Quoted 250 lines

Thanks and regards,
Dario

Quoted 243 lines

--
Andreas Dannenberg
Texas Instruments Inc

[1] http://lists.busybox.net/pipermail/buildroot/2023-June/669342.html
[2] http://lists.busybox.net/pipermail/buildroot/2023-August/673292.html

Quoted 232 lines

Best regards,
Romain

Quoted 226 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+   prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+   bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+   bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+   bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+   bool "am65x"
+
+endchoice
+
+choice
+   prompt "Security type"
+   help
+     The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+   bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+   bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+   string
+   default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+   default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+   string
+   default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+   default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
    bool "ti-k3-image-gen"
    depends on BR2_TARGET_TI_K3_R5_LOADER
    select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
    # We need FIT support in uboot-tools, which is why we select a
    # host package
    select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
      https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-   prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-   bool "am65x"
-
-endchoice
-
-choice
-   prompt "Security type"
-   help
-     The target SoC security type option for image gen.  Valid
-     options are "gp" for General Purpose devices, "hs-fs" for
-     High Security - Field Securable devices, or "hs" for High
-     Security - Security Enforcing devices.  Note for all High
-     Security device variants the TI_SECURE_DEV_PKG environmental
-     variable must be defined at build time pointing to a valid
-     core-secdev-k3 folder location, otherwise the build will
-     fail, see
-     https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-   bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-   string
-   default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
    string
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-   string
-   default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
    $(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
    $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
    bool "U-Boot needs TI K3 Device Manager (DM)"
    # We use the SoC selection defined for the ti-k3-image-gen
    # package
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
    help
      Some TI K3 devices need the Device Manager (DM) firmware to
      be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
    string
-   default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +1 -1
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#59 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Dear Romain, Dario, Thomas:

Quoted 38 lines · Romain Naour

Hi Dario,

Le 20/02/2024 à 10:05, Dario Binacchi a écrit :

Quoted 35 lines

Hi Andreas, Romain, All

Quoted 16 lines · Andreas Dannenberg

Romain, Dario,

Quoted 11 lines · Romain Naour

Hello Dario,

Quoted 5 lines · Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

I'm agree that Buildroot doesn't provide any "Platform selection" as the Linux kernel and I'm not sure where those TI_K3_{SECTYPE,SOC} should belong.

Quoted 8 lines

There were discussions/suggestions around this before by Yann E Morin
[1] and Thomas Petazzoni [2]. I think the gist of it was to move the selection to a new package like BR2_PACKAGE_TI_K3_PLATFORM containing all the K3 SoC specific selections. And then other packages and Kconfig menues can depend on it more cleanly. Like it's currently done with package/freescale-imx/Config.in. This would also bring some consistency in how those NXP and TI device families are managed, which will make for a better end-user experience I think.

If I'm not mistaken, I think the patches:
[18/20] boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope [17/20] boot: move ti-k3-* packages to 'ti-k3' directory
Are heading in the direction of what we find in package/freescale-imx/, with the only difference being
that in our case, we're under boot.
So, can I consider these two patches correct?

Yes the general direction those are headed is a good...

Quoted 2 lines

Yes, can you try to move ti-k3 to package directory in V5 ? It would also be used later by the GPU rogue firmwares.

...and yes, for alignment sake with IMX it would be even better to have it in package/, while also keeping some alignment with the naming of the CONFIG options (hence my comment with 'BR2_PACKAGE_TI_K3_PLATFORM').

Hi Thomas,
assuming we create a new package called 'package/ti-k3' I was trying to figure out what would be the best way to name the associated CONFIG options that control device security settings and can be used to determine which device is being used (for later uses in context of GPU drivers and other device capabilities)?

I see different naming conventions being used, like this:

1) BR2_PACKAGE_*
2) BR2_TARGET_*
3) BR2_BOOT_*

Seems like BR2_TARGET_* what we have now would be most appropriate, but then the IMX stuff uses BR2_PACKAGE_*, which *seems* to be reserved for "userspace" (non-boot) packages as far as I can tell from my poor-man's research. While I'd like to align things, the use of the BR2_PACKAGE_* prefix may or may not be appropriate for our new additions here?

Just was hoping to get some guidance here so we don't need to re-work this too many times.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 261 lines

Please add a comment in the commit log that we make an exception to the rule "no subdirectory in package directory".

Thanks!

Best regards,
Romain

Quoted 250 lines

Thanks and regards,
Dario

Quoted 243 lines

--
Andreas Dannenberg
Texas Instruments Inc

[1] http://lists.busybox.net/pipermail/buildroot/2023-June/669342.html
[2] http://lists.busybox.net/pipermail/buildroot/2023-August/673292.html

Quoted 232 lines

Best regards,
Romain

Quoted 226 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+   prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+   bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+   bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+   bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+   bool "am65x"
+
+endchoice
+
+choice
+   prompt "Security type"
+   help
+     The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+   bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+   bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+   string
+   default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+   default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+   string
+   default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+   default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
    bool "ti-k3-image-gen"
    depends on BR2_TARGET_TI_K3_R5_LOADER
    select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
    # We need FIT support in uboot-tools, which is why we select a
    # host package
    select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
      https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-   prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-   bool "am65x"
-
-endchoice
-
-choice
-   prompt "Security type"
-   help
-     The target SoC security type option for image gen.  Valid
-     options are "gp" for General Purpose devices, "hs-fs" for
-     High Security - Field Securable devices, or "hs" for High
-     Security - Security Enforcing devices.  Note for all High
-     Security device variants the TI_SECURE_DEV_PKG environmental
-     variable must be defined at build time pointing to a valid
-     core-secdev-k3 folder location, otherwise the build will
-     fail, see
-     https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-   bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-   string
-   default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
    string
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-   string
-   default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
    $(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
    $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
    bool "U-Boot needs TI K3 Device Manager (DM)"
    # We use the SoC selection defined for the ti-k3-image-gen
    # package
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
    help
      Some TI K3 devices need the Device Manager (DM) firmware to
      be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
    string
-   default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +1 -1
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#60 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Hi Andreas,

Le 20/02/2024 à 21:32, Andreas Dannenberg a écrit :

Quoted 59 lines

Dear Romain, Dario, Thomas:

Quoted 38 lines · Romain Naour

Hi Dario,

Le 20/02/2024 à 10:05, Dario Binacchi a écrit :

Quoted 35 lines

Hi Andreas, Romain, All

Quoted 16 lines · Andreas Dannenberg

Romain, Dario,

Quoted 11 lines · Romain Naour

Hello Dario,

Quoted 5 lines · Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

I'm agree that Buildroot doesn't provide any "Platform selection" as the Linux kernel and I'm not sure where those TI_K3_{SECTYPE,SOC} should belong.

Quoted 8 lines

There were discussions/suggestions around this before by Yann E Morin
[1] and Thomas Petazzoni [2]. I think the gist of it was to move the selection to a new package like BR2_PACKAGE_TI_K3_PLATFORM containing all the K3 SoC specific selections. And then other packages and Kconfig menues can depend on it more cleanly. Like it's currently done with package/freescale-imx/Config.in. This would also bring some consistency in how those NXP and TI device families are managed, which will make for a better end-user experience I think.

If I'm not mistaken, I think the patches:
[18/20] boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope [17/20] boot: move ti-k3-* packages to 'ti-k3' directory
Are heading in the direction of what we find in package/freescale-imx/, with the only difference being
that in our case, we're under boot.
So, can I consider these two patches correct?

Yes the general direction those are headed is a good...

Quoted 2 lines

Yes, can you try to move ti-k3 to package directory in V5 ? It would also be used later by the GPU rogue firmwares.

...and yes, for alignment sake with IMX it would be even better to have it in package/, while also keeping some alignment with the naming of the CONFIG options (hence my comment with 'BR2_PACKAGE_TI_K3_PLATFORM').

Hi Thomas,
assuming we create a new package called 'package/ti-k3' I was trying to figure out what would be the best way to name the associated CONFIG options that control device security settings and can be used to determine which device is being used (for later uses in context of GPU drivers and other device capabilities)?

Quoted 4 lines

I see different naming conventions being used, like this:

1) BR2_PACKAGE_*
2) BR2_TARGET_*

Well, it seems we use BR2_TARGET_* for package in boot/ directory instead of BR2_BOOT_* for "legacy" reason :)

At some point in the history of Buildroot the target/ directory existed and was used to package bootloaders:

https://gitlab.com/buildroot.org/buildroot/-/commit/d7d57699ef83cce36d87bef73c9e1fbdc765a64c

But BR2_TARGET_* symbol was keep for packages (like grub) when booloaders was moved to boot/.

Quoted 1 line

3) BR2_BOOT_*

So, there is no such BR2_BOOT_* option.

Quoted 6 lines

Seems like BR2_TARGET_* what we have now would be most appropriate, but then the IMX stuff uses BR2_PACKAGE_*, which *seems* to be reserved for "userspace" (non-boot) packages as far as I can tell from my poor-man's research. While I'd like to align things, the use of the BR2_PACKAGE_* prefix may or may not be appropriate for our new additions here?

BR2_PACKAGE_* is appropriate here.

We still have BR2_TARGET_* in Buildroot since some Kconfig symbol are really old and it is not easy to replace them without breaking existing defconfig (especially the out of tree one).

Quoted 3 lines

Just was hoping to get some guidance here so we don't need to re-work this too many times.

It seems ok for me, lets see the upcoming V5 from Dario.

Best regards,
Romain

Quoted 269 lines

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 261 lines

Please add a comment in the commit log that we make an exception to the rule "no subdirectory in package directory".

Thanks!

Best regards,
Romain

Quoted 250 lines

Thanks and regards,
Dario

Quoted 243 lines

--
Andreas Dannenberg
Texas Instruments Inc

[1] http://lists.busybox.net/pipermail/buildroot/2023-June/669342.html
[2] http://lists.busybox.net/pipermail/buildroot/2023-August/673292.html

Quoted 232 lines

Best regards,
Romain

Quoted 226 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+   prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+   bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+   bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+   bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+   bool "am65x"
+
+endchoice
+
+choice
+   prompt "Security type"
+   help
+     The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+   bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+   bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+   string
+   default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+   default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+   string
+   default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+   default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
    bool "ti-k3-image-gen"
    depends on BR2_TARGET_TI_K3_R5_LOADER
    select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
    # We need FIT support in uboot-tools, which is why we select a
    # host package
    select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
      https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-   prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-   bool "am65x"
-
-endchoice
-
-choice
-   prompt "Security type"
-   help
-     The target SoC security type option for image gen.  Valid
-     options are "gp" for General Purpose devices, "hs-fs" for
-     High Security - Field Securable devices, or "hs" for High
-     Security - Security Enforcing devices.  Note for all High
-     Security device variants the TI_SECURE_DEV_PKG environmental
-     variable must be defined at build time pointing to a valid
-     core-secdev-k3 folder location, otherwise the build will
-     fail, see
-     https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-   bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-   string
-   default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
    string
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-   string
-   default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
    $(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
    $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
    bool "U-Boot needs TI K3 Device Manager (DM)"
    # We use the SoC selection defined for the ti-k3-image-gen
    # package
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
    help
      Some TI K3 devices need the Device Manager (DM) firmware to
      be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
    string
-   default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +1 -1
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#61 lore raw

Re: [Buildroot] [PATCH v4 18/20] boot/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope

Quoted 73 lines · Romain Naour

Hi Andreas,

Le 20/02/2024 à 21:32, Andreas Dannenberg a écrit :

Quoted 59 lines

Dear Romain, Dario, Thomas:

Quoted 38 lines · Romain Naour

Hi Dario,

Le 20/02/2024 à 10:05, Dario Binacchi a écrit :

Quoted 35 lines

Hi Andreas, Romain, All

Quoted 16 lines · Andreas Dannenberg

Romain, Dario,

Quoted 11 lines · Romain Naour

Hello Dario,

Quoted 5 lines · Dario Binacchi

Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.

I'm agree that Buildroot doesn't provide any "Platform selection" as the Linux kernel and I'm not sure where those TI_K3_{SECTYPE,SOC} should belong.

Quoted 8 lines

There were discussions/suggestions around this before by Yann E Morin
[1] and Thomas Petazzoni [2]. I think the gist of it was to move the selection to a new package like BR2_PACKAGE_TI_K3_PLATFORM containing all the K3 SoC specific selections. And then other packages and Kconfig menues can depend on it more cleanly. Like it's currently done with package/freescale-imx/Config.in. This would also bring some consistency in how those NXP and TI device families are managed, which will make for a better end-user experience I think.

If I'm not mistaken, I think the patches:
[18/20] boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope [17/20] boot: move ti-k3-* packages to 'ti-k3' directory
Are heading in the direction of what we find in package/freescale-imx/, with the only difference being
that in our case, we're under boot.
So, can I consider these two patches correct?

Yes the general direction those are headed is a good...

Quoted 2 lines

Yes, can you try to move ti-k3 to package directory in V5 ? It would also be used later by the GPU rogue firmwares.

...and yes, for alignment sake with IMX it would be even better to have it in package/, while also keeping some alignment with the naming of the CONFIG options (hence my comment with 'BR2_PACKAGE_TI_K3_PLATFORM').

Hi Thomas,
assuming we create a new package called 'package/ti-k3' I was trying to figure out what would be the best way to name the associated CONFIG options that control device security settings and can be used to determine which device is being used (for later uses in context of GPU drivers and other device capabilities)?

Quoted 4 lines

I see different naming conventions being used, like this:

1) BR2_PACKAGE_*
2) BR2_TARGET_*

Well, it seems we use BR2_TARGET_* for package in boot/ directory instead of BR2_BOOT_* for "legacy" reason :)

At some point in the history of Buildroot the target/ directory existed and was used to package bootloaders:

Quoted 9 lines

https://gitlab.com/buildroot.org/buildroot/-/commit/d7d57699ef83cce36d87bef73c9e1fbdc765a64c

But BR2_TARGET_* symbol was keep for packages (like grub) when booloaders was moved to boot/.

Quoted 1 line

3) BR2_BOOT_*

So, there is no such BR2_BOOT_* option.

Ok, thanks for the additional historic context.

Quoted 7 lines
Quoted 6 lines

Seems like BR2_TARGET_* what we have now would be most appropriate, but then the IMX stuff uses BR2_PACKAGE_*, which *seems* to be reserved for "userspace" (non-boot) packages as far as I can tell from my poor-man's research. While I'd like to align things, the use of the BR2_PACKAGE_* prefix may or may not be appropriate for our new additions here?

Quoted 5 lines

BR2_PACKAGE_* is appropriate here.

We still have BR2_TARGET_* in Buildroot since some Kconfig symbol are really old and it is not easy to replace them without breaking existing defconfig (especially the out of tree one).

Understood & glad we are discussing this.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 281 lines
Quoted 4 lines

Just was hoping to get some guidance here so we don't need to re-work this too many times.

It seems ok for me, lets see the upcoming V5 from Dario.

Best regards,
Romain

Quoted 269 lines

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 261 lines

Please add a comment in the commit log that we make an exception to the rule "no subdirectory in package directory".

Thanks!

Best regards,
Romain

Quoted 250 lines

Thanks and regards,
Dario

Quoted 243 lines

--
Andreas Dannenberg
Texas Instruments Inc

[1] http://lists.busybox.net/pipermail/buildroot/2023-June/669342.html
[2] http://lists.busybox.net/pipermail/buildroot/2023-August/673292.html

Quoted 232 lines

Best regards,
Romain

Quoted 226 lines

---

Added in v4

---
 boot/ti-k3/Config.in                          | 46 ++++++++++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 63 ++-----------------
 boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk |  6 +-
 boot/uboot/Config.in                          |  7 +--
 configs/ti_am62x_sk_defconfig                 |  2 +-
 configs/ti_am64x_sk_defconfig                 |  2 +-
 6 files changed, 59 insertions(+), 67 deletions(-)
boot/ti-k3/Config.in +46 -0
index 06dda2f156a9..9e508326c9c8 100644
@@ -5,6 +5,52 @@ config BR2_TARGET_TI_K3
 
 if BR2_TARGET_TI_K3
 
+choice
+   prompt "SoC family"
+
+config BR2_TARGET_TI_K3_SOC_AM62AX
+   bool "am62ax"
+
+config BR2_TARGET_TI_K3_SOC_AM62X
+   bool "am62x"
+
+config BR2_TARGET_TI_K3_SOC_AM64X
+   bool "am64x"
+
+config BR2_TARGET_TI_K3_SOC_AM65X
+   bool "am65x"
+
+endchoice
+
+choice
+   prompt "Security type"
+   help
+     The target SoC security type option.
+
+config BR2_TARGET_TI_K3_SECTYPE_GP
+   bool "gp"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   bool "hs-fs"
+
+config BR2_TARGET_TI_K3_SECTYPE_HS
+   bool "hs"
+
+endchoice
+
+config BR2_TARGET_TI_K3_SOC
+   string
+   default "am62ax" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62x"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "am64x"  if BR2_TARGET_TI_K3_SOC_AM64X
+   default "am65x"  if BR2_TARGET_TI_K3_SOC_AM65X
+
+config BR2_TARGET_TI_K3_SECTYPE
+   string
+   default "gp"    if BR2_TARGET_TI_K3_SECTYPE_GP
+   default "hs-fs" if BR2_TARGET_TI_K3_SECTYPE_HS_FS
+   default "hs"    if BR2_TARGET_TI_K3_SECTYPE_HS
+
 source "boot/ti-k3/ti-k3-boot-firmware/Config.in"
 source "boot/ti-k3/ti-k3-core-secdev/Config.in"
 source "boot/ti-k3/ti-k3-image-gen/Config.in"
boot/ti-k3/ti-k3-image-gen/Config.in +5 -58
index 38d1598d9fc0..2d53d62dd4ee 100644
@@ -2,7 +2,7 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
    bool "ti-k3-image-gen"
    depends on BR2_TARGET_TI_K3_R5_LOADER
    select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS || BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   select BR2_TARGET_TI_K3_CORE_SECDEV if BR2_TARGET_TI_K3_SECTYPE_HS_FS || BR2_TARGET_TI_K3_SECTYPE_HS
    # We need FIT support in uboot-tools, which is why we select a
    # host package
    select BR2_PACKAGE_HOST_UBOOT_TOOLS
@@ -14,65 +14,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
      https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-   prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-   bool "am65x"
-
-endchoice
-
-choice
-   prompt "Security type"
-   help
-     The target SoC security type option for image gen.  Valid
-     options are "gp" for General Purpose devices, "hs-fs" for
-     High Security - Field Securable devices, or "hs" for High
-     Security - Security Enforcing devices.  Note for all High
-     Security device variants the TI_SECURE_DEV_PKG environmental
-     variable must be defined at build time pointing to a valid
-     core-secdev-k3 folder location, otherwise the build will
-     fail, see
-     https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-   bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-   string
-   default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
    string
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-   default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-   string
-   default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-   default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-   default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "ti-fs"  if BR2_TARGET_TI_K3_SOC_AM62X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM64X
+   default "ti-sci" if BR2_TARGET_TI_K3_SOC_AM65X
 
 endif
boot/ti-k3/ti-k3-image-gen/ti-k3-image-gen.mk +3 -3
index 74b4fcb4bf89..834d8f7d5cd5 100644
@@ -26,10 +26,10 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
    $(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
 
-ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP),y)
+ifeq ($(BR2_TARGET_TI_K3_SECTYPE_GP),y)
 TI_K3_IMAGE_GEN_SYSFW = \
    $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 else
boot/uboot/Config.in +3 -4
index beafb38930db..1a9d21e7c6d1 100644
@@ -244,8 +244,7 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
    bool "U-Boot needs TI K3 Device Manager (DM)"
    # We use the SoC selection defined for the ti-k3-image-gen
    # package
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN
-   depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   depends on BR2_TARGET_TI_K3_SOC_AM62AX || BR2_TARGET_TI_K3_SOC_AM62X
    help
      Some TI K3 devices need the Device Manager (DM) firmware to
      be available for the U-Boot build.
@@ -254,8 +253,8 @@ if BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 
 config BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
    string
-   default "am62axx" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-   default "am62xx"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+   default "am62axx" if BR2_TARGET_TI_K3_SOC_AM62AX
+   default "am62xx"  if BR2_TARGET_TI_K3_SOC_AM62X
 
 endif
 
configs/ti_am62x_sk_defconfig +1 -1
index cd26235342e4..cfefce0a77a4 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM62X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
configs/ti_am64x_sk_defconfig +1 -1
index 1befeb4ab96c..daf78dbffff8 100644
@@ -24,8 +24,8 @@ BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am64x"
 BR2_TARGET_TI_K3=y
+BR2_TARGET_TI_K3_SOC_AM64X=y
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#62 lore raw

PATCH v4 19/20 boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin

In reply to Dario Binacchi

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.

---

Added in v4

---
 boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk | 3 +++
 1 file changed, 3 insertions(+)
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
index 2a10024aedaa..643298a1e70a 100644
@@ -75,8 +75,11 @@ define TI_K3_R5_LOADER_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
 
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
+
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
 	cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+	find $(@D) -name "tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef
 
 $(eval $(kconfig-package))
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#63 lore raw

Re: [Buildroot] [PATCH v4 19/20] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin

Hi Dario,

Quoted 4 lines · Dario Binacchi

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.

https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

looks more complete with sysfw.itb?

Quoted 25 lines

---

Added in v4

---
 boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk | 3 +++

 1 file changed, 3 insertions(+)
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index 2a10024aedaa..643298a1e70a 100644
@@ -75,8 +75,11 @@ define TI_K3_R5_LOADER_BUILD_CMDS
  	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)

 endef

boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +2 -0
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
+

 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
  cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin

boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
+	find $(@D) -name "tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;

 endef

 $(eval $(kconfig-package))

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#64 lore raw

Re: [Buildroot] [PATCH v4 19/20] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin

Hi Alexander,

Quoted 4 lines · Alexander Sverdlin

Hi Dario,

On Sat, 2024-02-17 at 17:02 +0100, Dario Binacchi wrote:

Quoted 8 lines
Quoted 4 lines

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.

https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

looks more complete with sysfw.itb?

In my use case, there was no need as it was necessary to enable ti-k3-boot-firmware:

define TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES_CMDS
cp -dpfr $(@D)/ti-sysfw $(BINARIES_DIR)/
cp -dpfr $(@D)/ti-dm $(BINARIES_DIR)/
endef

Quoted 25 lines
Quoted 25 lines

---

Added in v4

---
 boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk | 3 +++
 1 file changed, 3 insertions(+)
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
index 2a10024aedaa..643298a1e70a 100644
@@ -75,8 +75,11 @@ define TI_K3_R5_LOADER_BUILD_CMDS
      $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
 
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
+
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
      cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+     find $(@D) -name "tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef
 
Quoted 5 lines

boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk define TI_K3_R5_LOADER_BUILD_CMDS · line 85

Quoted 1 line
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
 $(eval $(kconfig-package))

--
Alexander Sverdlin.

--

Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________

Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#65 lore raw

Re: [Buildroot] [PATCH v4 19/20] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin

In reply to Alexander Sverdlin

Hi Alexander,

Quoted 4 lines · Alexander Sverdlin

Hi Dario,

On Sat, 2024-02-17 at 17:02 +0100, Dario Binacchi wrote:

Quoted 8 lines
Quoted 4 lines

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.

https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

looks more complete with sysfw.itb?

In my use case, there was no need as it was necessary to enable ti-k3-boot-firmware:

define TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES_CMDS
cp -dpfr $(@D)/ti-sysfw $(BINARIES_DIR)/
cp -dpfr $(@D)/ti-dm $(BINARIES_DIR)/
endef

I also wonder whether it is necessary to remove the cp -dpfr $(@D)/ti-sysfw $(BINARIES_DIR)/
to avoid conflicts.

Alternatively, as happened with ti-k3-hen-image, one day we may no longer need ti-k3-boot-firmware,
and therefore we could add a copy of sysfw.itb from ti-k3-r5-loader. I am awaiting suggestions.
However, my patch does not require modifying the genimage.cfg file. In any case, I would try to ensure
this also for sysfw.itb.

Thanks and regards,
Dario

Quoted 30 lines
Quoted 16 lines

---

Added in v4

---
 boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk | 3 +++
 1 file changed, 3 insertions(+)
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index 2a10024aedaa..643298a1e70a 100644
@@ -75,8 +75,11 @@ define TI_K3_R5_LOADER_BUILD_CMDS
      $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)

boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk define TI_K3_R5_LOADER_BUILD_CMDS · line 85

Quoted 10 lines
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
 endef
 
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
+
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
      cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+     find $(@D) -name "tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef
 
 $(eval $(kconfig-package))

--
Alexander Sverdlin.

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#66 lore raw

Re: [Buildroot] [PATCH v4 19/20] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin

Hello Dario,

Le 18/02/2024 à 14:38, Dario Binacchi a écrit :

Quoted 29 lines

Hi Alexander,

Quoted 4 lines · Alexander Sverdlin

Hi Dario,

On Sat, 2024-02-17 at 17:02 +0100, Dario Binacchi wrote:

Quoted 8 lines
Quoted 4 lines

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.

https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

looks more complete with sysfw.itb?

In my use case, there was no need as it was necessary to enable ti-k3-boot-firmware:

define TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES_CMDS
cp -dpfr $(@D)/ti-sysfw $(BINARIES_DIR)/
cp -dpfr $(@D)/ti-dm $(BINARIES_DIR)/
endef

I also wonder whether it is necessary to remove the cp -dpfr $(@D)/ti-sysfw $(BINARIES_DIR)/
to avoid conflicts.

Quoted 7 lines

Alternatively, as happened with ti-k3-hen-image, one day we may no longer need ti-k3-boot-firmware,
and therefore we could add a copy of sysfw.itb from ti-k3-r5-loader. I am awaiting suggestions.
However, my patch does not require modifying the genimage.cfg file. In any case, I would try to ensure
this also for sysfw.itb.

sysfw.itb is build by ti-k3-r5-loader and it's not provided by ti-k3-boot-firmware. This file depends on the TI K3 "Split binary" boot flow [1]:

- Split binary with a combined firmware: (eg: AM65)
- Combined binary with a combined firmware: (eg: AM64)
- Split binary with a split firmware: (eg: J721E)
- Combined binary with a split firmware: (eg: AM62)

[1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/doc/board/ti/k3.rst

Best regards,
Romain

Quoted 36 lines

Thanks and regards,
Dario

Quoted 30 lines
Quoted 16 lines

---

Added in v4

---
 boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk | 3 +++
 1 file changed, 3 insertions(+)
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index 2a10024aedaa..643298a1e70a 100644
@@ -75,8 +75,11 @@ define TI_K3_R5_LOADER_BUILD_CMDS
      $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)

boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk define TI_K3_R5_LOADER_BUILD_CMDS · line 85

Quoted 10 lines
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
 endef
 
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
+
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
      cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+     find $(@D) -name "tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef
 
 $(eval $(kconfig-package))

--
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#67 lore raw

Re: [Buildroot] [PATCH v4 19/20] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin

In reply to Dario Binacchi

Hi Dario,

Quoted 19 lines · Dario Binacchi

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.

---

Added in v4

---
 boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk | 3 +++
 1 file changed, 3 insertions(+)
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index 2a10024aedaa..643298a1e70a 100644

boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk define TI_K3_R5_LOADER_BUILD_CMDS · line 83

Quoted 9 lines
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
@@ -75,8 +75,11 @@ define TI_K3_R5_LOADER_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
 
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
+
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
 	cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+	find $(@D) -name "tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef

I like how this picks/renames the tiboot3.bin corresponding to the device security type, this way allowing to generate a tailored and readily bootable image depending on GP, HS-FS, HS device type.

However the find/copy approach may not always work as intended. Consider the build output of R5 U-Boot SPL for AM64x for example:

$ ll tiboot3-*.bin
-rw-rw-r-- 1 a0797059 a0797059 304431 Feb 20 15:34 tiboot3-am64x-gp-evm.bin
-rw-rw-r-- 1 a0797059 a0797059 532270 Feb 20 15:34 tiboot3-am64x_sr2-hs-evm.bin
-rw-rw-r-- 1 a0797059 a0797059 532270 Feb 20 15:34 tiboot3-am64x_sr2-hs-fs-evm.bin

Note how there's a '_sr2' (Silicon Revision 2.0) in the filename of some of the boot binaries. I did look at the different K3 devices supported in U-Boot at the moment, and it looks like currently this will not be an issue that will manifest itself as the device security type happens to be unique enough to also pick the right silicon revision. But of course this doesn't mean it'll always stay like this....

So it might be better to leverage BR2_TARGET_TI_K3_SOC to be more specific in that find/copy operation and use this to replace the asterisk in "tiboot3-*". So then somebody can use "am64x" or "am64x_sr2" for example as BR2_TARGET_TI_K3_SOC, and you would guarantee the right file gets used to populate the final tiboot3.bin.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 5 lines
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
 $(eval $(kconfig-package))
Signature · 1 line
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#68 lore raw

Re: [Buildroot] [PATCH v4 19/20] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin

Hi Andreas,

Quoted 52 lines · Andreas Dannenberg

Hi Dario,

Quoted 19 lines · Dario Binacchi

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.

---

Added in v4

---
 boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk | 3 +++
 1 file changed, 3 insertions(+)
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index 2a10024aedaa..643298a1e70a 100644

boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk define TI_K3_R5_LOADER_BUILD_CMDS · line 83

Quoted 9 lines
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
@@ -75,8 +75,11 @@ define TI_K3_R5_LOADER_BUILD_CMDS
      $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
 
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_SECTYPE))
+
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
      cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+     find $(@D) -name "tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef

I like how this picks/renames the tiboot3.bin corresponding to the device security type, this way allowing to generate a tailored and readily bootable image depending on GP, HS-FS, HS device type.

However the find/copy approach may not always work as intended. Consider the build output of R5 U-Boot SPL for AM64x for example:

$ ll tiboot3-*.bin
(quoted diff) +0 -3
-rw-rw-r-- 1 a0797059 a0797059 304431 Feb 20 15:34 tiboot3-am64x-gp-evm.bin
-rw-rw-r-- 1 a0797059 a0797059 532270 Feb 20 15:34 tiboot3-am64x_sr2-hs-evm.bin
-rw-rw-r-- 1 a0797059 a0797059 532270 Feb 20 15:34 tiboot3-am64x_sr2-hs-fs-evm.bin

Note how there's a '_sr2' (Silicon Revision 2.0) in the filename of some of the boot binaries. I did look at the different K3 devices supported in U-Boot at the moment, and it looks like currently this will not be an issue that will manifest itself as the device security type happens to be unique enough to also pick the right silicon revision. But of course this doesn't mean it'll always stay like this....

Quoted 5 lines

So it might be better to leverage BR2_TARGET_TI_K3_SOC to be more specific in that find/copy operation and use this to replace the asterisk in "tiboot3-*". So then somebody can use "am64x" or "am64x_sr2" for example as BR2_TARGET_TI_K3_SOC, and you would guarantee the right file gets used to populate the final tiboot3.bin.

Thanks for the suggestion!
I will add it to v5.

Thanks and regards,
Dario

Quoted 16 lines

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 5 lines
boot/ti-k3/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -1
 $(eval $(kconfig-package))
--

2.43.0

Signature · 21 lines
Dario Binacchi

Senior Embedded Linux Developer

[email protected]

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
[email protected]

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#69 lore raw

PATCH v4 20/20 configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

In reply to Dario Binacchi

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. So it's no longer necessary to use custom tools like ti-k3-image-gen.

---

Added in v4

---
 configs/ti_am62x_sk_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/ti_am62x_sk_defconfig +1 -1
index cfefce0a77a4..6259dec5985d 100644
@@ -25,7 +25,7 @@ BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_SOC_AM62X=y
-BR2_TARGET_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#70 lore raw

Re: [Buildroot] [PATCH v4 20/20] configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 20 lines

Recent versions of U-Boot are capable of building tiboot3.bin using Binman. So it's no longer necessary to use custom tools like ti-k3-image-gen.

---

Added in v4

---
 configs/ti_am62x_sk_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/ti_am62x_sk_defconfig +0 -0
index cfefce0a77a4..6259dec5985d 100644

configs/ti_am62x_sk_defconfig BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" · line 31

Quoted 8 lines
configs/ti_am62x_sk_defconfig +1 -1
@@ -25,7 +25,7 @@ BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="am62x"
 BR2_TARGET_TI_K3=y
 BR2_TARGET_TI_K3_SOC_AM62X=y
-BR2_TARGET_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"

The am64x defconfig should do the same, then the ti-k3-boot-firmware can be removed.

Best regards,
Romain

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#71 lore raw
In reply to Dario Binacchi

Hi Dario!

Quoted 3 lines · Dario Binacchi

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen

I wasn't aware of the preceeding versions, but...

Quoted 7 lines

package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

... as the broken HS-FS went unnoticed, seems there is no rush to fix the build now? I'd vote for a combined series, because yours and Romains do overlap here and there, but I personally would pick different parts from different series. I'd not introduce secdev package unless absolutely necessary, and I actually build HS-FS images with yocto with custom keys and using upstream U-Boot binman alone, so maybe I miss something, but I don't see the package as required.

From my side I can offer testing on SK-AM62x variants, both GP and HS-FS. I will definitely test your v4 because in contrast to Romain's U-Boot v2024.01 bump yours may actually boot...

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#72 lore raw

Hello Alexander,

Le 17/02/2024 à 18:40, Alexander Sverdlin a écrit :

Quoted 25 lines

Hi Dario!

Quoted 3 lines · Dario Binacchi

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen

I wasn't aware of the preceeding versions, but...

Quoted 7 lines

package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

... as the broken HS-FS went unnoticed, seems there is no rush to fix the build now? I'd vote for a combined series, because yours and Romains do overlap here and there, but I personally would pick different parts from different series. I'd not introduce secdev package unless absolutely necessary, and I actually build HS-FS images with yocto with custom keys and using upstream U-Boot binman alone, so maybe I miss something, but I don't see the package as required.

Quoted 4 lines

From my side I can offer testing on SK-AM62x variants, both GP and HS-FS. I will definitely test your v4 because in contrast to Romain's U-Boot v2024.01 bump yours may actually boot...

Can you merge Dario changes (extlinux.conf and post-build.sh) and try again?

Best regards,
Romain

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#73 lore raw
In reply to Alexander Sverdlin
Quoted 18 lines · Alexander Sverdlin

Hi Dario!

Quoted 3 lines · Dario Binacchi

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen

I wasn't aware of the preceeding versions, but...

Quoted 7 lines

package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Quoted 2 lines

... as the broken HS-FS went unnoticed, seems there is no rush to fix the build now?

I noticed, and hacked in some am64x specific fixes here:
https://github.com/relectrify/buildroot/commits/2023.11.1_relectrify.

I was going to submit a cleaned up version of the patches, but I got distracted by fixing encrypted boot (see below) and never got back to cleaning them up. Sorry about that.

Apparently TI don't support encrypted boot in their Linux SDK (yet?), only in the MCU SDK. There's a python script in the MCU SDK (rom_image_gen.py) which kinda works once you teach it how to read ascii keys as generated by the keywriter package. Except, it changes the size of the plaintext because it aligns it to 16-bytes and appends 32 random bytes, which causes a boot failure somewhere early on in U-Boot. I hacked around that by sticking the original binary size into some of those random bytes (it's not part of the X509 cert..) and teaching U-Boot to detect the encrypted image
(https://github.com/relectrify/u-boot/commit/d16b4705ffebb0881633dfd5300bf4ac8490e75c)
and doing a fixup. Once you do that, and change all the right places to run rom_image_gen.py it works, but it's pretty painful to get there.

Hopefully this situation is a bit better in the binman version.

Patrick
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Tested-by on the v4 series
#74 lore raw
In reply to Dario Binacchi

Hi Dario,

Quoted 35 lines · Dario Binacchi

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Dario Binacchi (20):
  configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting
  configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting
  configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader version
  configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader version
  boot/ti-k3-r5-loader: bump to version 2024.01 boot/ti-k3-core-secdev: new package boot/ti-k3-image-gen: manage HS hardware package/python-jsonschema: add host variant package/python-attrs: add host variant package/python-referencing: add host variant package/python-rpds-py: add host variant package/python-jsonschema-specifications: add host variant

Quoted 8 lines

  boot/ti-k3-r5-loader: set binman environment boot/uboot: set BINMAN_INDIRS for TI K3 DM configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1
  boot: move ti-k3-* packages to 'ti-k3' directory boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

the series:
- builds and starts on SK-AM62B (HS-FS)
- builds for am62x GP

Signature · 6 lines
Alexander Sverdlin.

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#75 lore raw
In reply to Dario Binacchi

Hello Dario,

Le 17/02/2024 à 17:02, Dario Binacchi a écrit :

Quoted 7 lines

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

Quoted 10 lines

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Thanks for this new version. I beleive both series should be merged into one since we want to follow u-boot switch to binman, add more TI K3 SoC support and keeping exising am62x ans am64x working in GP or HS/HS-FS.

My main concern is to avoid adding a new package for a tool that is already deprecated ti-k3-image-gen (not sure if ti-k3-core-secdev is really deprecated) [1].

Also the topic is not only "AM62x-SK HS-FS devices" but "TI K3 HS-FS devices".

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 66 lines

Dario Binacchi (20):
configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
boot/ti-k3-r5-loader: bump to version 2024.01 boot/ti-k3-core-secdev: new package boot/ti-k3-image-gen: manage HS hardware package/python-jsonschema: add host variant package/python-attrs: add host variant package/python-referencing: add host variant package/python-rpds-py: add host variant package/python-jsonschema-specifications: add host variant boot/ti-k3-r5-loader: set binman environment boot/uboot: set BINMAN_INDIRS for TI K3 DM configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1
boot: move ti-k3-* packages to 'ti-k3' directory boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

 DEVELOPERS                                    |  1 +
 board/ti/am62x-sk/genimage.cfg                |  7 +-
 board/ti/am62x-sk/post-build.sh               | 49 ++++++++++++
 board/ti/am62x-sk/post-image.sh               |  5 ++
 boot/Config.in                                |  4 +-
 boot/ti-k3-image-gen/Config.in                | 77 -------------------
 boot/ti-k3/Config.in                          | 59 ++++++++++++++
 boot/ti-k3/common.mk                          |  1 +
 .../{ => ti-k3}/ti-k3-boot-firmware/Config.in |  0
 .../ti-k3-boot-firmware.hash                  |  0
 .../ti-k3-boot-firmware.mk                    |  0
 boot/ti-k3/ti-k3-core-secdev/Config.in        |  9 +++
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash  |  3 +
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk    | 22 ++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 25 ++++++
 .../ti-k3-image-gen/ti-k3-image-gen.hash      |  0
 .../ti-k3-image-gen/ti-k3-image-gen.mk        | 20 ++++-
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in    |  4 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash      |  2 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.mk        | 16 +++-
 boot/uboot/Config.in                          |  7 +-
 boot/uboot/uboot.mk                           |  3 +-
 configs/ti_am62x_sk_defconfig                 | 23 +++---
 configs/ti_am64x_sk_defconfig                 |  8 +-
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       |  5 ++
 .../python-jsonschema/python-jsonschema.mk    |  6 ++
 .../python-referencing/python-referencing.mk  |  5 ++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 29 files changed, 263 insertions(+), 105 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/Config.in
Quoted 9 lines
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
 create mode 100644 boot/ti-k3/ti-k3-image-gen/Config.in
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (67%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (97%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (54%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (85%)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#76 lore raw

Hi Romain

Quoted 22 lines · Romain Naour

Hello Dario,

Quoted 7 lines · Dario Binacchi

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

Quoted 10 lines

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Quoted 4 lines

Thanks for this new version. I beleive both series should be merged into one since we want to follow u-boot switch to binman, add more TI K3 SoC support and keeping exising am62x ans am64x working in GP or HS/HS-FS.

Because the Dario patchset was sent before (end of November), it's reasonable to review and adjust that one
and apply your changes for ti_j721e_sk on top of it. It think that is a standard way to make people happy about
their work and contribution.

Michael

Quoted 86 lines

My main concern is to avoid adding a new package for a tool that is already deprecated ti-k3-image-gen (not sure if ti-k3-core-secdev is really deprecated) [1].

Also the topic is not only "AM62x-SK HS-FS devices" but "TI K3 HS-FS devices".

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 75 lines

Dario Binacchi (20):
configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
boot/ti-k3-r5-loader: bump to version 2024.01 boot/ti-k3-core-secdev: new package boot/ti-k3-image-gen: manage HS hardware package/python-jsonschema: add host variant package/python-attrs: add host variant package/python-referencing: add host variant package/python-rpds-py: add host variant package/python-jsonschema-specifications: add host variant boot/ti-k3-r5-loader: set binman environment boot/uboot: set BINMAN_INDIRS for TI K3 DM configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1
boot: move ti-k3-* packages to 'ti-k3' directory boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

 DEVELOPERS                                    |  1 +
 board/ti/am62x-sk/genimage.cfg                |  7 +-
 board/ti/am62x-sk/post-build.sh               | 49 ++++++++++++
 board/ti/am62x-sk/post-image.sh               |  5 ++
 boot/Config.in                                |  4 +-
 boot/ti-k3-image-gen/Config.in                | 77 -------------------
 boot/ti-k3/Config.in                          | 59 ++++++++++++++
 boot/ti-k3/common.mk                          |  1 +
 .../{ => ti-k3}/ti-k3-boot-firmware/Config.in |  0
 .../ti-k3-boot-firmware.hash                  |  0
 .../ti-k3-boot-firmware.mk                    |  0
 boot/ti-k3/ti-k3-core-secdev/Config.in        |  9 +++
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash  |  3 +
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk    | 22 ++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 25 ++++++
 .../ti-k3-image-gen/ti-k3-image-gen.hash      |  0
 .../ti-k3-image-gen/ti-k3-image-gen.mk        | 20 ++++-
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in    |  4 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash      |  2 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.mk        | 16 +++-
 boot/uboot/Config.in                          |  7 +-
 boot/uboot/uboot.mk                           |  3 +-
 configs/ti_am62x_sk_defconfig                 | 23 +++---
 configs/ti_am64x_sk_defconfig                 |  8 +-
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       |  5 ++
 .../python-jsonschema/python-jsonschema.mk    |  6 ++
 .../python-referencing/python-referencing.mk  |  5 ++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 29 files changed, 263 insertions(+), 105 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
 create mode 100644 boot/ti-k3/ti-k3-image-gen/Config.in
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (67%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (97%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (54%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (85%)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#77 lore raw

Hello Michael,

Le 19/02/2024 à 12:02, Michael Nazzareno Trimarchi a écrit :

Quoted 30 lines

Hi Romain

Quoted 22 lines · Romain Naour

Hello Dario,

Quoted 7 lines · Dario Binacchi

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

Quoted 10 lines

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Quoted 4 lines

Thanks for this new version. I beleive both series should be merged into one since we want to follow u-boot switch to binman, add more TI K3 SoC support and keeping exising am62x ans am64x working in GP or HS/HS-FS.

Quoted 5 lines

Because the Dario patchset was sent before (end of November), it's reasonable to review and adjust that one
and apply your changes for ti_j721e_sk on top of it. It think that is a standard way to make people happy about
their work and contribution.

Actually, the two series are about the same topic: TI K3 SoC support (GP, HS, HS-FS) not only AM62x-SK HS-FS devices

But due to the complexity of the BSP, the boot flow (4 way to boot!) and the switch from custom tool to binman... this series is really difficult to review without having a good understanding of TI K3 architecture peculiarity and having one of each TI evaluation boards 🙂

The series (based on Dario's work) about ti_j721e_sk suggested to remove TI custom tools replaced by binman along with other improvements.

I'll way for v5 and rebase the ti_j721e_sk on top of it.

Best regards,
Romain

Quoted 89 lines

Michael

Quoted 86 lines

My main concern is to avoid adding a new package for a tool that is already deprecated ti-k3-image-gen (not sure if ti-k3-core-secdev is really deprecated) [1].

Also the topic is not only "AM62x-SK HS-FS devices" but "TI K3 HS-FS devices".

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 75 lines

Dario Binacchi (20):
configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
boot/ti-k3-r5-loader: bump to version 2024.01 boot/ti-k3-core-secdev: new package boot/ti-k3-image-gen: manage HS hardware package/python-jsonschema: add host variant package/python-attrs: add host variant package/python-referencing: add host variant package/python-rpds-py: add host variant package/python-jsonschema-specifications: add host variant boot/ti-k3-r5-loader: set binman environment boot/uboot: set BINMAN_INDIRS for TI K3 DM configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1
boot: move ti-k3-* packages to 'ti-k3' directory boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

 DEVELOPERS                                    |  1 +
 board/ti/am62x-sk/genimage.cfg                |  7 +-
 board/ti/am62x-sk/post-build.sh               | 49 ++++++++++++
 board/ti/am62x-sk/post-image.sh               |  5 ++
 boot/Config.in                                |  4 +-
 boot/ti-k3-image-gen/Config.in                | 77 -------------------
 boot/ti-k3/Config.in                          | 59 ++++++++++++++
 boot/ti-k3/common.mk                          |  1 +
 .../{ => ti-k3}/ti-k3-boot-firmware/Config.in |  0
 .../ti-k3-boot-firmware.hash                  |  0
 .../ti-k3-boot-firmware.mk                    |  0
 boot/ti-k3/ti-k3-core-secdev/Config.in        |  9 +++
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash  |  3 +
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk    | 22 ++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 25 ++++++
 .../ti-k3-image-gen/ti-k3-image-gen.hash      |  0
 .../ti-k3-image-gen/ti-k3-image-gen.mk        | 20 ++++-
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in    |  4 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash      |  2 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.mk        | 16 +++-
 boot/uboot/Config.in                          |  7 +-
 boot/uboot/uboot.mk                           |  3 +-
 configs/ti_am62x_sk_defconfig                 | 23 +++---
 configs/ti_am64x_sk_defconfig                 |  8 +-
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       |  5 ++
 .../python-jsonschema/python-jsonschema.mk    |  6 ++
 .../python-referencing/python-referencing.mk  |  5 ++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 29 files changed, 263 insertions(+), 105 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
 create mode 100644 boot/ti-k3/ti-k3-image-gen/Config.in
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (67%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (97%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (54%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (85%)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#78 lore raw
Quoted 39 lines · Romain Naour

Hello Michael,

Le 19/02/2024 à 12:02, Michael Nazzareno Trimarchi a écrit :

Quoted 30 lines

Hi Romain

Quoted 22 lines · Romain Naour

Hello Dario,

Quoted 7 lines · Dario Binacchi

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

Quoted 10 lines

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Quoted 4 lines

Thanks for this new version. I beleive both series should be merged into one since we want to follow u-boot switch to binman, add more TI K3 SoC support and keeping exising am62x ans am64x working in GP or HS/HS-FS.

Quoted 5 lines

Because the Dario patchset was sent before (end of November), it's reasonable to review and adjust that one
and apply your changes for ti_j721e_sk on top of it. It think that is a standard way to make people happy about
their work and contribution.

Quoted 7 lines

Actually, the two series are about the same topic: TI K3 SoC support (GP, HS, HS-FS) not only AM62x-SK HS-FS devices

But due to the complexity of the BSP, the boot flow (4 way to boot!) and the switch from custom tool to binman... this series is really difficult to review without having a good understanding of TI K3 architecture peculiarity and having one of each TI evaluation boards 🙂

Although I helped conceive some of this and the associated tooling early on, some of the what may look strange architectural decisions were driven by different use cases and requirements for the different devices (especially around automotive fast/early boot, but also security) in combination with limited on-chip SRAM... So this where we are at now. A future AM6x device variant will have yet another boot flow, but I can already say it will be very much simplified over what we have today :)

Quoted 4 lines

The series (based on Dario's work) about ti_j721e_sk suggested to remove TI custom tools replaced by binman along with other improvements.

I'll way for v5 and rebase the ti_j721e_sk on top of it.

Thank you Romain for your buy-in. Let's focus on getting Dario's series in good shape and then move onto yours. I'd also like to re-introduce graphics (I had that working before) but I need to wait for all the "baseline" stuff to settle first.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 95 lines

Best regards,
Romain

Quoted 89 lines

Michael

Quoted 86 lines

My main concern is to avoid adding a new package for a tool that is already deprecated ti-k3-image-gen (not sure if ti-k3-core-secdev is really deprecated) [1].

Also the topic is not only "AM62x-SK HS-FS devices" but "TI K3 HS-FS devices".

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 75 lines

Dario Binacchi (20):
configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
boot/ti-k3-r5-loader: bump to version 2024.01 boot/ti-k3-core-secdev: new package boot/ti-k3-image-gen: manage HS hardware package/python-jsonschema: add host variant package/python-attrs: add host variant package/python-referencing: add host variant package/python-rpds-py: add host variant package/python-jsonschema-specifications: add host variant boot/ti-k3-r5-loader: set binman environment boot/uboot: set BINMAN_INDIRS for TI K3 DM configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.1
boot: move ti-k3-* packages to 'ti-k3' directory boot/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin configs/ti_am62x_sk_defconfig: don't use ti-k3-image-gen anymore

 DEVELOPERS                                    |  1 +
 board/ti/am62x-sk/genimage.cfg                |  7 +-
 board/ti/am62x-sk/post-build.sh               | 49 ++++++++++++
 board/ti/am62x-sk/post-image.sh               |  5 ++
 boot/Config.in                                |  4 +-
 boot/ti-k3-image-gen/Config.in                | 77 -------------------
 boot/ti-k3/Config.in                          | 59 ++++++++++++++
 boot/ti-k3/common.mk                          |  1 +
 .../{ => ti-k3}/ti-k3-boot-firmware/Config.in |  0
 .../ti-k3-boot-firmware.hash                  |  0
 .../ti-k3-boot-firmware.mk                    |  0
 boot/ti-k3/ti-k3-core-secdev/Config.in        |  9 +++
 .../ti-k3-core-secdev/ti-k3-core-secdev.hash  |  3 +
 .../ti-k3-core-secdev/ti-k3-core-secdev.mk    | 22 ++++++
 boot/ti-k3/ti-k3-image-gen/Config.in          | 25 ++++++
 .../ti-k3-image-gen/ti-k3-image-gen.hash      |  0
 .../ti-k3-image-gen/ti-k3-image-gen.mk        | 20 ++++-
 boot/{ => ti-k3}/ti-k3-r5-loader/Config.in    |  4 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash      |  2 +-
 .../ti-k3-r5-loader/ti-k3-r5-loader.mk        | 16 +++-
 boot/uboot/Config.in                          |  7 +-
 boot/uboot/uboot.mk                           |  3 +-
 configs/ti_am62x_sk_defconfig                 | 23 +++---
 configs/ti_am64x_sk_defconfig                 |  8 +-
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       |  5 ++
 .../python-jsonschema/python-jsonschema.mk    |  6 ++
 .../python-referencing/python-referencing.mk  |  5 ++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 29 files changed, 263 insertions(+), 105 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3/Config.in
 create mode 100644 boot/ti-k3/common.mk
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/Config.in (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-boot-firmware/ti-k3-boot-firmware.mk (100%)
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/Config.in
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.hash
 create mode 100644 boot/ti-k3/ti-k3-core-secdev/ti-k3-core-secdev.mk
 create mode 100644 boot/ti-k3/ti-k3-image-gen/Config.in
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.hash (100%)
 rename boot/{ => ti-k3}/ti-k3-image-gen/ti-k3-image-gen.mk (67%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/Config.in (97%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.hash (54%)
 rename boot/{ => ti-k3}/ti-k3-r5-loader/ti-k3-r5-loader.mk (85%)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#79 lore raw

Hello Andreas,

Le 20/02/2024 à 01:41, Andreas Dannenberg a écrit :

Quoted 48 lines · Romain Naour
Quoted 39 lines

Hello Michael,

Le 19/02/2024 à 12:02, Michael Nazzareno Trimarchi a écrit :

Quoted 30 lines

Hi Romain

Quoted 22 lines · Romain Naour

Hello Dario,

Quoted 7 lines · Dario Binacchi

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

Quoted 10 lines

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Quoted 4 lines

Thanks for this new version. I beleive both series should be merged into one since we want to follow u-boot switch to binman, add more TI K3 SoC support and keeping exising am62x ans am64x working in GP or HS/HS-FS.

Quoted 5 lines

Because the Dario patchset was sent before (end of November), it's reasonable to review and adjust that one
and apply your changes for ti_j721e_sk on top of it. It think that is a standard way to make people happy about
their work and contribution.

Quoted 7 lines

Actually, the two series are about the same topic: TI K3 SoC support (GP, HS, HS-FS) not only AM62x-SK HS-FS devices

But due to the complexity of the BSP, the boot flow (4 way to boot!) and the switch from custom tool to binman... this series is really difficult to review without having a good understanding of TI K3 architecture peculiarity and having one of each TI evaluation boards 🙂

Quoted 7 lines

Although I helped conceive some of this and the associated tooling early on, some of the what may look strange architectural decisions were driven by different use cases and requirements for the different devices (especially around automotive fast/early boot, but also security) in combination with limited on-chip SRAM... So this where we are at now. A future AM6x device variant will have yet another boot flow, but I can already say it will be very much simplified over what we have today :)

About existing boot flow, I found two recent commit in u-boot that state that the "Split binary" (that requires sysfw.itb) is already a legacy boot flow:

arm: dts: k3-binman: Add support for FIT templates

Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)

https://gitlab.com/u-boot/u-boot/-/commit/b153bad0f14168d5fcc02ba6bf1a2cd98daba9b5

arm: dts: k3-*-binman: Move to using templated FITs

Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).

https://gitlab.com/u-boot/u-boot/-/commit/4509b9ff0b8cb26907f9e9c3571b43565c859275

Which one should be recommended or avoided for a new design?

Best regards,
Romain

Quoted 12 lines
Quoted 5 lines

The series (based on Dario's work) about ti_j721e_sk suggested to remove TI custom tools replaced by binman along with other improvements.

I'll way for v5 and rebase the ti_j721e_sk on top of it.

Thank you Romain for your buy-in. Let's focus on getting Dario's series in good shape and then move onto yours. I'd also like to re-introduce graphics (I had that working before) but I need to wait for all the "baseline" stuff to settle first.

Quoted 25 lines

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 19 lines

Best regards,
Romain

Quoted 14 lines

Michael

Quoted 11 lines

My main concern is to avoid adding a new package for a tool that is already deprecated ti-k3-image-gen (not sure if ti-k3-core-secdev is really deprecated) [1].

Also the topic is not only "AM62x-SK HS-FS devices" but "TI K3 HS-FS devices".

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 1 line

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#80 lore raw

Hi Romain,

Quoted 59 lines · Romain Naour

Hello Andreas,

Le 20/02/2024 à 01:41, Andreas Dannenberg a écrit :

Quoted 48 lines · Romain Naour
Quoted 39 lines

Hello Michael,

Le 19/02/2024 à 12:02, Michael Nazzareno Trimarchi a écrit :

Quoted 30 lines

Hi Romain

Quoted 22 lines · Romain Naour

Hello Dario,

Quoted 7 lines · Dario Binacchi

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

Quoted 10 lines

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Quoted 4 lines

Thanks for this new version. I beleive both series should be merged into one since we want to follow u-boot switch to binman, add more TI K3 SoC support and keeping exising am62x ans am64x working in GP or HS/HS-FS.

Quoted 5 lines

Because the Dario patchset was sent before (end of November), it's reasonable to review and adjust that one
and apply your changes for ti_j721e_sk on top of it. It think that is a standard way to make people happy about
their work and contribution.

Quoted 7 lines

Actually, the two series are about the same topic: TI K3 SoC support (GP, HS, HS-FS) not only AM62x-SK HS-FS devices

But due to the complexity of the BSP, the boot flow (4 way to boot!) and the switch from custom tool to binman... this series is really difficult to review without having a good understanding of TI K3 architecture peculiarity and having one of each TI evaluation boards 🙂

Quoted 7 lines

Although I helped conceive some of this and the associated tooling early on, some of the what may look strange architectural decisions were driven by different use cases and requirements for the different devices (especially around automotive fast/early boot, but also security) in combination with limited on-chip SRAM... So this where we are at now. A future AM6x device variant will have yet another boot flow, but I can already say it will be very much simplified over what we have today :)

Quoted 2 lines

About existing boot flow, I found two recent commit in u-boot that state that the "Split binary" (that requires sysfw.itb) is already a legacy boot flow:

It's called "legacy boot flow" because it was the boot flow used on the first K3 devices that were released (AM65x, J721E). This boot flow was not used on follow-on devices. The characteristics of this boot flow is that the initial FW image that gets loaded (tiboot3.bin) doesn't contain any device firmwares, but only a bootloader (such as U-Boot SPL). Then this boot loader will load the System Firmware firmware + config data blob (sysfw.itb) into the dedicated core (called "DMSC" = Device Manager and Security Controller). And then addiitonal boot stages will be loaded. These devices require this boot flow, and with this it is required to be supported by U-Boot (and any Linux distribution or build systems that build on that).

TI is still making/selling those "legacy boot flow" devices, and will continue to do so for a very long time. One promiment community incarnation that you are probably aware of is the BeagleBone AI-64.

Quoted 12 lines

arm: dts: k3-binman: Add support for FIT templates

Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)

https://gitlab.com/u-boot/u-boot/-/commit/b153bad0f14168d5fcc02ba6bf1a2cd98daba9b5

arm: dts: k3-*-binman: Move to using templated FITs

Quoted 7 lines

Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).

https://gitlab.com/u-boot/u-boot/-/commit/4509b9ff0b8cb26907f9e9c3571b43565c859275

Which one should be recommended or avoided for a new design?

Those commits are just a simplification to reduce duplication. As per earlier comment the "legacy boot flow" is something we continue needing to support. It isn't supposed to imply that those devices are about to disappear.

Not sure if this answered your question; please let me know.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 43 lines

Best regards,
Romain

Quoted 37 lines
Quoted 5 lines

The series (based on Dario's work) about ti_j721e_sk suggested to remove TI custom tools replaced by binman along with other improvements.

I'll way for v5 and rebase the ti_j721e_sk on top of it.

Thank you Romain for your buy-in. Let's focus on getting Dario's series in good shape and then move onto yours. I'd also like to re-introduce graphics (I had that working before) but I need to wait for all the "baseline" stuff to settle first.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 19 lines

Best regards,
Romain

Quoted 14 lines

Michael

Quoted 11 lines

My main concern is to avoid adding a new package for a tool that is already deprecated ti-k3-image-gen (not sure if ti-k3-core-secdev is really deprecated) [1].

Also the topic is not only "AM62x-SK HS-FS devices" but "TI K3 HS-FS devices".

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 1 line

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#81 lore raw

Hi Andreas,

Le 20/02/2024 à 21:04, Andreas Dannenberg a écrit :

Quoted 77 lines

Hi Romain,

Quoted 59 lines · Romain Naour

Hello Andreas,

Le 20/02/2024 à 01:41, Andreas Dannenberg a écrit :

Quoted 48 lines · Romain Naour
Quoted 39 lines

Hello Michael,

Le 19/02/2024 à 12:02, Michael Nazzareno Trimarchi a écrit :

Quoted 30 lines

Hi Romain

Quoted 22 lines · Romain Naour

Hello Dario,

Quoted 7 lines · Dario Binacchi

The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.

Quoted 10 lines

This series, which in my humble opinion, should have been immediately considered to correct the compilation errors in case of HS-FS devcies, has seen an increase in patches in version 4 to remove the ti-k3-image-gen package thanks to Binman. Additionally, it shares some modifications and views on how to implement certain changes with the series
https://patchwork.ozlabs.org/project/buildroot/list/?series=394840.
Therefore, I think it is necessary not to run them in parallel but to decide whether to merge one before the other or to consider a single series where the patches can be coherent with each other. I am available for both solutions. Let me know.

Quoted 4 lines

Thanks for this new version. I beleive both series should be merged into one since we want to follow u-boot switch to binman, add more TI K3 SoC support and keeping exising am62x ans am64x working in GP or HS/HS-FS.

Quoted 5 lines

Because the Dario patchset was sent before (end of November), it's reasonable to review and adjust that one
and apply your changes for ti_j721e_sk on top of it. It think that is a standard way to make people happy about
their work and contribution.

Quoted 7 lines

Actually, the two series are about the same topic: TI K3 SoC support (GP, HS, HS-FS) not only AM62x-SK HS-FS devices

But due to the complexity of the BSP, the boot flow (4 way to boot!) and the switch from custom tool to binman... this series is really difficult to review without having a good understanding of TI K3 architecture peculiarity and having one of each TI evaluation boards 🙂

Quoted 7 lines

Although I helped conceive some of this and the associated tooling early on, some of the what may look strange architectural decisions were driven by different use cases and requirements for the different devices (especially around automotive fast/early boot, but also security) in combination with limited on-chip SRAM... So this where we are at now. A future AM6x device variant will have yet another boot flow, but I can already say it will be very much simplified over what we have today :)

Quoted 2 lines

About existing boot flow, I found two recent commit in u-boot that state that the "Split binary" (that requires sysfw.itb) is already a legacy boot flow:

It's called "legacy boot flow" because it was the boot flow used on the first K3 devices that were released (AM65x, J721E). This boot flow was not used on follow-on devices. The characteristics of this boot flow is that the initial FW image that gets loaded (tiboot3.bin) doesn't contain any device firmwares, but only a bootloader (such as U-Boot SPL). Then this boot loader will load the System Firmware firmware + config data blob (sysfw.itb) into the dedicated core (called "DMSC" = Device Manager and Security Controller). And then addiitonal boot stages will be loaded. These devices require this boot flow, and with this it is required to be supported by U-Boot (and any Linux distribution or build systems that build on that).

Quoted 3 lines

TI is still making/selling those "legacy boot flow" devices, and will continue to do so for a very long time. One promiment community incarnation that you are probably aware of is the BeagleBone AI-64.

Thank you for the detailed explanation!

I previouly worked on a AM57xx SoC that is nowaday legacy SoC, the latest ti-kernel 6.1 doesn't support some of the driver that where available in ti-kernel 5.10 (prueth 100M, RPMsg Sockets over virtio-rpmsg transport (use for ARM-DSP IPC3.x), TI-RTOS (the csl-common package was also removed from meta-ti)).

Also the TI SDK on this plateform doesn't seems very active [1].

So, I'm worried when I read "legacy" :)

[1]
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1290197/processor-sdk-am57x-legacy-processor-s-linux-update-plan

Quoted 19 lines
Quoted 19 lines

arm: dts: k3-binman: Add support for FIT templates

Add templates for FIT images used extensively across K3 boards with most of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)

https://gitlab.com/u-boot/u-boot/-/commit/b153bad0f14168d5fcc02ba6bf1a2cd98daba9b5

arm: dts: k3-*-binman: Move to using templated FITs

Reduce redundancy in code by using templates to generate the A72 boot binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb (for legacy boot following devices J721E and AM65x).

https://gitlab.com/u-boot/u-boot/-/commit/4509b9ff0b8cb26907f9e9c3571b43565c859275

Quoted 8 lines
Quoted 1 line

Which one should be recommended or avoided for a new design?

Those commits are just a simplification to reduce duplication. As per earlier comment the "legacy boot flow" is something we continue needing to support. It isn't supposed to imply that those devices are about to disappear.

Not sure if this answered your question; please let me know.

Yes, thank you.

Best regards,
Romain

Quoted 49 lines

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 43 lines

Best regards,
Romain

Quoted 37 lines
Quoted 5 lines

The series (based on Dario's work) about ti_j721e_sk suggested to remove TI custom tools replaced by binman along with other improvements.

I'll way for v5 and rebase the ti_j721e_sk on top of it.

Thank you Romain for your buy-in. Let's focus on getting Dario's series in good shape and then move onto yours. I'd also like to re-introduce graphics (I had that working before) but I need to wait for all the "baseline" stuff to settle first.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 19 lines

Best regards,
Romain

Quoted 14 lines

Michael

Quoted 11 lines

My main concern is to avoid adding a new package for a tool that is already deprecated ti-k3-image-gen (not sure if ti-k3-core-secdev is really deprecated) [1].

Also the topic is not only "AM62x-SK HS-FS devices" but "TI K3 HS-FS devices".

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685820.html

Best regards,
Romain

Quoted 1 line

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#82 lore raw

Hi Romain,

On Tue, Feb 20, 2024 at 10:36:51PM +0100, Romain Naour wrote:

<snip>

Quoted 19 lines
Quoted 15 lines
Quoted 2 lines

About existing boot flow, I found two recent commit in u-boot that state that the "Split binary" (that requires sysfw.itb) is already a legacy boot flow:

It's called "legacy boot flow" because it was the boot flow used on the first K3 devices that were released (AM65x, J721E). This boot flow was not used on follow-on devices. The characteristics of this boot flow is that the initial FW image that gets loaded (tiboot3.bin) doesn't contain any device firmwares, but only a bootloader (such as U-Boot SPL). Then this boot loader will load the System Firmware firmware + config data blob (sysfw.itb) into the dedicated core (called "DMSC" = Device Manager and Security Controller). And then addiitonal boot stages will be loaded. These devices require this boot flow, and with this it is required to be supported by U-Boot (and any Linux distribution or build systems that build on that).

Quoted 3 lines

TI is still making/selling those "legacy boot flow" devices, and will continue to do so for a very long time. One promiment community incarnation that you are probably aware of is the BeagleBone AI-64.

Quoted 8 lines

Thank you for the detailed explanation!

I previouly worked on a AM57xx SoC that is nowaday legacy SoC, the latest ti-kernel 6.1 doesn't support some of the driver that where available in ti-kernel 5.10 (prueth 100M, RPMsg Sockets over virtio-rpmsg transport (use for ARM-DSP IPC3.x), TI-RTOS (the csl-common package was also removed from meta-ti)).

Also the TI SDK on this plateform doesn't seems very active [1].

since you brought this up I wanted to add some additional context here. Older devices like AM57xx (AM335x and AM437x fall into the same bucket) will get what we call "LTS refresh SDKs" every year, rather than multiple drops per year as we do for the more recent devices. As for AM57xx specifically that refresh is currently targeted for e/o March 2024 and will be known as "SDK 9.2". There shouldn't be any feature regressions, and the only "new" thing (in addition to an all-refreshed SW baseline with 6.1 kernel and 2023.04 U-Boot) will be some Y2K38 issue fix on Linux. TI will be making and selling those devices for a very long time to come, and the annual refresh is seen as a good compromise between keeping things refreshed periodically and up to date while limiting the amount of repeat work/effort.

--
Andreas Dannenberg
Texas Instruments Inc

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#83 lore raw

Hi Andreas,

Le 23/02/2024 à 20:31, Andreas Dannenberg a écrit :

Quoted 34 lines

Hi Romain,

On Tue, Feb 20, 2024 at 10:36:51PM +0100, Romain Naour wrote:

<snip>

Quoted 19 lines
Quoted 15 lines
Quoted 2 lines

About existing boot flow, I found two recent commit in u-boot that state that the "Split binary" (that requires sysfw.itb) is already a legacy boot flow:

It's called "legacy boot flow" because it was the boot flow used on the first K3 devices that were released (AM65x, J721E). This boot flow was not used on follow-on devices. The characteristics of this boot flow is that the initial FW image that gets loaded (tiboot3.bin) doesn't contain any device firmwares, but only a bootloader (such as U-Boot SPL). Then this boot loader will load the System Firmware firmware + config data blob (sysfw.itb) into the dedicated core (called "DMSC" = Device Manager and Security Controller). And then addiitonal boot stages will be loaded. These devices require this boot flow, and with this it is required to be supported by U-Boot (and any Linux distribution or build systems that build on that).

Quoted 3 lines

TI is still making/selling those "legacy boot flow" devices, and will continue to do so for a very long time. One promiment community incarnation that you are probably aware of is the BeagleBone AI-64.

Quoted 8 lines

Thank you for the detailed explanation!

I previouly worked on a AM57xx SoC that is nowaday legacy SoC, the latest ti-kernel 6.1 doesn't support some of the driver that where available in ti-kernel 5.10 (prueth 100M, RPMsg Sockets over virtio-rpmsg transport (use for ARM-DSP IPC3.x), TI-RTOS (the csl-common package was also removed from meta-ti)).

Also the TI SDK on this plateform doesn't seems very active [1].

Quoted 12 lines

since you brought this up I wanted to add some additional context here. Older devices like AM57xx (AM335x and AM437x fall into the same bucket) will get what we call "LTS refresh SDKs" every year, rather than multiple drops per year as we do for the more recent devices. As for AM57xx specifically that refresh is currently targeted for e/o March 2024 and will be known as "SDK 9.2". There shouldn't be any feature regressions, and the only "new" thing (in addition to an all-refreshed SW baseline with 6.1 kernel and 2023.04 U-Boot) will be some Y2K38 issue fix on Linux. TI will be making and selling those devices for a very long time to come, and the annual refresh is seen as a good compromise between keeping things refreshed periodically and up to date while limiting the amount of repeat work/effort.

Ok, thanks for the information.
I'm looking forward this new SDK release.

Best regards,
Romain

Quoted 5 lines

--
Andreas Dannenberg
Texas Instruments Inc

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot