All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices
@ 2024-02-22 10:16 Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 01/16] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting Dario Binacchi
                   ` (15 more replies)
  0 siblings, 16 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Changes in v5:
- Drop patches:
 - [v4,06/20] boot/ti-k3-core-secdev: new package
 - [v4,07/20] boot/ti-k3-image-gen: manage HS hardware
- Reorder the patches
 - [08/20] package/python-jsonschema: add host variant
 - [09/20] package/python-attrs: add host variant
 - [10/20] package/python-referencing: add host variant
 - [11/20] package/python-rpds-py: add host variant
 - [12/20] package/python-jsonschema-specifications: add host variant
 according to the sequence used by Romain Naour in the series "Add ti_j721e_sk_defconfig"
- The other changes are found in the changelog of each individual patch.

Dario Binacchi (16):
  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
  package/python-attrs: add host variant
  package/python-rpds-py: add host variant
  package/python-referencing: add host variant
  package/python-jsonschema-specifications: add host variant
  package/python-jsonschema: add host variant
  boot/ti-k3-r5-loader: set binman environment
  boot/uboot: set BINMAN_INDIRS for TI K3 DM
  package/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: bump U-Boot version to 2024.01
  configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17

 board/ti/am62x-sk/genimage.cfg                |  7 ++-
 board/ti/am62x-sk/post-build.sh               | 49 +++++++++++++++
 board/ti/am62x-sk/post-image.sh               |  5 ++
 boot/ti-k3-image-gen/Config.in                | 61 ++-----------------
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       |  4 +-
 boot/ti-k3-r5-loader/Config.in                |  5 +-
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash     |  2 +-
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 12 +++-
 boot/uboot/Config.in                          |  7 +--
 boot/uboot/uboot.mk                           |  2 +-
 configs/ti_am62x_sk_defconfig                 | 22 ++++---
 configs/ti_am64x_sk_defconfig                 |  7 ++-
 package/Config.in                             |  1 +
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       |  5 ++
 .../python-jsonschema/python-jsonschema.mk    | 14 +++++
 .../python-referencing/python-referencing.mk  | 11 ++++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 package/ti-k3/Config.in                       | 54 ++++++++++++++++
 package/ti-k3/ti-k3.mk                        |  7 +++
 20 files changed, 202 insertions(+), 80 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh
 create mode 100644 package/ti-k3/Config.in
 create mode 100644 package/ti-k3/ti-k3.mk

-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 01/16] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 21:25   ` Romain Naour
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 02/16] configs/ti_am64x_sk_defconfig: " Dario Binacchi
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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))

Suggested-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5
- Drop BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR option

Added in v4

 configs/ti_am62x_sk_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index f88252a89c68..c3ad555a8184 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -21,7 +21,7 @@ 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_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 02/16] configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 01/16] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 03/16] configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader version Dario Binacchi
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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))

Suggested-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5
- Drop BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR option

Added in v4

 configs/ti_am64x_sk_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index 4bfd31f0c8d3..097175bd8f39 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -21,7 +21,7 @@ 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_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 03/16] configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader version
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 01/16] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 02/16] configs/ti_am64x_sk_defconfig: " Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 04/16] configs/ti_am64x_sk_defconfig: " Dario Binacchi
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Suggested-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

no changes since v4

Added in v4

 configs/ti_am62x_sk_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index c3ad555a8184..a129e216d25b 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -25,6 +25,8 @@ BR2_TARGET_OPTEE_OS_PLATFORM="k3-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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 04/16] configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader version
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (2 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 03/16] configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader version Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 05/16] boot/ti-k3-r5-loader: bump to version 2024.01 Dario Binacchi
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Suggested-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

no changes since v4

Added in v4

 configs/ti_am64x_sk_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index 097175bd8f39..26195194c7d6 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -25,6 +25,8 @@ BR2_TARGET_OPTEE_OS_PLATFORM="k3-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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 05/16] boot/ti-k3-r5-loader: bump to version 2024.01
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (3 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 04/16] configs/ti_am64x_sk_defconfig: " Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 06/16] package/python-attrs: add host variant Dario Binacchi
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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

Suggested-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

no changes since v4

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(-)

diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
index 8c8368a1a5a8..5f86c045c99f 100644
--- a/boot/ti-k3-r5-loader/Config.in
+++ b/boot/ti-k3-r5-loader/Config.in
@@ -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
diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
index c5d1cb8e09f0..fbe5d215409d 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
@@ -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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 06/16] package/python-attrs: add host variant
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (4 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 05/16] boot/ti-k3-r5-loader: bump to version 2024.01 Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 07/16] package/python-rpds-py: " Dario Binacchi
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

no changes since v3

Changes in v3:
- Drop Config.in.host

 package/python-attrs/python-attrs.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/python-attrs/python-attrs.mk b/package/python-attrs/python-attrs.mk
index 8a1236cc4402..fb1729e62fa2 100644
--- a/package/python-attrs/python-attrs.mk
+++ b/package/python-attrs/python-attrs.mk
@@ -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))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 07/16] package/python-rpds-py: add host variant
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (5 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 06/16] package/python-attrs: add host variant Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 08/16] package/python-referencing: " Dario Binacchi
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

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(+)

diff --git a/package/python-rpds-py/python-rpds-py.mk b/package/python-rpds-py/python-rpds-py.mk
index 80670f2e4fde..cee2ff290a4e 100644
--- a/package/python-rpds-py/python-rpds-py.mk
+++ b/package/python-rpds-py/python-rpds-py.mk
@@ -12,3 +12,4 @@ PYTHON_RPDS_PY_LICENSE = MIT
 PYTHON_RPDS_PY_LICENSE_FILES = LICENSE
 
 $(eval $(python-package))
+$(eval $(host-python-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 08/16] package/python-referencing: add host variant
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (6 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 07/16] package/python-rpds-py: " Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 09/16] package/python-jsonschema-specifications: " Dario Binacchi
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5:
- Add runtime dependencies
- Add SOB and COB tags of Romain Naour

no changes in v4

Changes in v3:
- Drop Config.in.host

 package/python-referencing/python-referencing.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/python-referencing/python-referencing.mk b/package/python-referencing/python-referencing.mk
index 27d1452e913a..66d59ed8091a 100644
--- a/package/python-referencing/python-referencing.mk
+++ b/package/python-referencing/python-referencing.mk
@@ -14,4 +14,15 @@ PYTHON_REFERENCING_DEPENDENCIES = \
 	host-python-hatchling \
 	host-python-hatch-vcs
 
+HOST_PYTHON_REFERENCING_DEPENDENCIES = \
+	host-python-hatchling \
+	host-python-hatch-vcs
+
+# This is a runtime dependency, but we don't have the concept of
+# runtime dependencies for host packages.
+HOST_PYTHON_REFERENCING_DEPENDENCIES += \
+	host-python-attrs \
+	host-python-rpds-py
+
 $(eval $(python-package))
+$(eval $(host-python-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 09/16] package/python-jsonschema-specifications: add host variant
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (7 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 08/16] package/python-referencing: " Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 21:36   ` Romain Naour
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 10/16] package/python-jsonschema: " Dario Binacchi
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

no changes since v3

Changes in v3:
- Drop Config.in.host

 package/python-jsonschema-specifications.mk                      | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/python-jsonschema-specifications/python-jsonschema-specifications.mk b/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
index 40879898c9d4..b6e309ab2bc9 100644
--- a/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
+++ b/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
@@ -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))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 10/16] package/python-jsonschema: add host variant
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (8 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 09/16] package/python-jsonschema-specifications: " Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 11/16] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5:
- Add runtime dependencies
- Add SOB and COB tags of Romain Naour

no changes in v4

Changes in v3:
- Drop Config.in.host

 package/python-jsonschema/python-jsonschema.mk | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/python-jsonschema/python-jsonschema.mk b/package/python-jsonschema/python-jsonschema.mk
index 512c92aa7752..9e8b6e18b876 100644
--- a/package/python-jsonschema/python-jsonschema.mk
+++ b/package/python-jsonschema/python-jsonschema.mk
@@ -15,4 +15,18 @@ 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
+
+# This is a runtime dependency, but we don't have the concept of
+# runtime dependencies for host packages.
+HOST_PYTHON_JSONSCHEMA_DEPENDENCIES += \
+	host-python-attrs \
+	host-python-jsonschema-specifications \
+	host-python-referencing \
+	host-python-rpds-py
+
 $(eval $(python-package))
+$(eval $(host-python-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 11/16] boot/ti-k3-r5-loader: set binman environment
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (9 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 10/16] package/python-jsonschema: " Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 22:04   ` Romain Naour
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 12/16] boot/uboot: set BINMAN_INDIRS for TI K3 DM Dario Binacchi
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5:
- Add dependecy on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
- Drop runtime dependecies
- Add host-python-pylibfdt dependency without requiring
  BR2_TARGET_UBOOT_NEEDS_PYLIBFDT configuration
- Add host-python3 and host-python-setuptools dependencies
- Add SOB and COB tags of Romain Naour

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/Config.in          | 1 +
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
index 5f86c045c99f..fc71337e80cc 100644
--- a/boot/ti-k3-r5-loader/Config.in
+++ b/boot/ti-k3-r5-loader/Config.in
@@ -1,6 +1,7 @@
 config BR2_TARGET_TI_K3_R5_LOADER
 	bool "ti-k3-r5-loader"
 	depends on BR2_aarch64
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema
 	help
 	  Separate U-Boot SPL build for R5 core on TI's K3 processors.
 	  Usually used to build tiboot3.bin with k3-image-gen.
diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
index 0ffcb8235f2e..fdb058f3b72a 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -39,7 +39,12 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
 	host-pkgconf \
 	$(BR2_MAKE_HOST_DEPENDENCY) \
 	host-arm-gnu-toolchain \
-	host-openssl
+	host-openssl \
+	host-python-jsonschema \
+	host-python-pyyaml \
+	host-python3 \
+	host-python-setuptools \
+	host-python-pylibfdt
 
 TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
 TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
@@ -58,6 +63,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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 12/16] boot/uboot: set BINMAN_INDIRS for TI K3 DM
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (10 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 11/16] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 22:09   ` Romain Naour
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 13/16] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

In this way, the previous setting becomes unnecessary, so let's remove
it.

[1] https://patchwork.ozlabs.org/project/uboot/patch/20231030110138.1347603-3-n-yadav@ti.com/
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5:
- Drop "DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f"
  from UBOOT_MAKE_OPTS.

no changes since v1:

 boot/uboot/uboot.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index dda606a88059..70982a87719f 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -189,7 +189,7 @@ 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 += BINMAN_INDIRS=$(BINARIES_DIR)
 endif
 
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 13/16] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (11 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 12/16] boot/uboot: set BINMAN_INDIRS for TI K3 DM Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 22:31   ` Romain Naour
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.

The patch makes an exception to the Buildroot rule "no subdirectory in
package directory".

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5:
- Add SOB tag
- Move the new ti-k3 from boot to package

Added in v4

 boot/ti-k3-image-gen/Config.in          | 61 ++-----------------------
 boot/ti-k3-image-gen/ti-k3-image-gen.mk |  4 +-
 boot/uboot/Config.in                    |  7 ++-
 configs/ti_am62x_sk_defconfig           |  3 +-
 configs/ti_am64x_sk_defconfig           |  3 +-
 package/Config.in                       |  1 +
 package/ti-k3/Config.in                 | 54 ++++++++++++++++++++++
 package/ti-k3/ti-k3.mk                  |  7 +++
 8 files changed, 75 insertions(+), 65 deletions(-)
 create mode 100644 package/ti-k3/Config.in
 create mode 100644 package/ti-k3/ti-k3.mk

diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in
index d76cef82e911..a57319f4be6d 100644
--- a/boot/ti-k3-image-gen/Config.in
+++ b/boot/ti-k3-image-gen/Config.in
@@ -13,65 +13,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_PACKAGE_TI_K3_SOC_AM62AX
+	default "ti-fs"  if BR2_PACKAGE_TI_K3_SOC_AM62X
+	default "ti-sci" if BR2_PACKAGE_TI_K3_SOC_AM64X
+	default "ti-sci" if BR2_PACKAGE_TI_K3_SOC_AM65X
 
 endif
diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
index 64be9a18f2c4..aca29bcf1bd4 100644
--- a/boot/ti-k3-image-gen/ti-k3-image-gen.mk
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
@@ -26,8 +26,8 @@ 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_PACKAGE_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
 
 TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index beafb38930db..c7ebe2652001 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -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_PACKAGE_TI_K3_SOC_AM62AX || BR2_PACKAGE_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_PACKAGE_TI_K3_SOC_AM62AX
+	default "am62xx"  if BR2_PACKAGE_TI_K3_SOC_AM62X
 
 endif
 
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index a129e216d25b..2835404a57df 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -11,6 +11,8 @@ 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_PACKAGE_TI_K3=y
+BR2_PACKAGE_TI_K3_SOC_AM62X=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
@@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-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"
diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index 26195194c7d6..566cbbe4824f 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -11,6 +11,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_PACKAGE_TI_K3=y
+BR2_PACKAGE_TI_K3_SOC_AM64X=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
@@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-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"
diff --git a/package/Config.in b/package/Config.in
index bf0fe078b955..6d3ed34e121b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -629,6 +629,7 @@ endmenu
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
+	source "package/ti-k3/Config.in"
 	source "package/ti-sgx-demos/Config.in"
 	source "package/ti-sgx-km/Config.in"
 	source "package/ti-sgx-um/Config.in"
diff --git a/package/ti-k3/Config.in b/package/ti-k3/Config.in
new file mode 100644
index 000000000000..01d88c8e1643
--- /dev/null
+++ b/package/ti-k3/Config.in
@@ -0,0 +1,54 @@
+config BR2_PACKAGE_TI_K3
+	bool "TI K3"
+	help
+	  The TI K3 SOC specific selections.
+
+if BR2_PACKAGE_TI_K3
+
+choice
+	prompt "SoC family"
+
+config BR2_PACKAGE_TI_K3_SOC_AM62AX
+	bool "am62ax"
+
+config BR2_PACKAGE_TI_K3_SOC_AM62X
+	bool "am62x"
+
+config BR2_PACKAGE_TI_K3_SOC_AM64X
+	bool "am64x"
+
+config BR2_PACKAGE_TI_K3_SOC_AM65X
+	bool "am65x"
+
+endchoice
+
+choice
+	prompt "Security type"
+	help
+	  The target SoC security type option.
+
+config BR2_PACKAGE_TI_K3_SECTYPE_GP
+	bool "gp"
+
+config BR2_PACKAGE_TI_K3_SECTYPE_HS_FS
+	bool "hs-fs"
+
+config BR2_PACKAGE_TI_K3_SECTYPE_HS
+	bool "hs"
+
+endchoice
+
+config BR2_PACKAGE_TI_K3_SOC
+	string
+	default "am62ax" if BR2_PACKAGE_TI_K3_SOC_AM62AX
+	default "am62x"  if BR2_PACKAGE_TI_K3_SOC_AM62X
+	default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X
+	default "am65x"  if BR2_PACKAGE_TI_K3_SOC_AM65X
+
+config BR2_PACKAGE_TI_K3_SECTYPE
+	string
+	default "gp"    if BR2_PACKAGE_TI_K3_SECTYPE_GP
+	default "hs-fs" if BR2_PACKAGE_TI_K3_SECTYPE_HS_FS
+	default "hs"    if BR2_PACKAGE_TI_K3_SECTYPE_HS
+
+endif
diff --git a/package/ti-k3/ti-k3.mk b/package/ti-k3/ti-k3.mk
new file mode 100644
index 000000000000..a2da29f5148c
--- /dev/null
+++ b/package/ti-k3/ti-k3.mk
@@ -0,0 +1,7 @@
+################################################################################
+#
+# ti-k3
+#
+################################################################################
+
+include $(sort $(wildcard package/ti-k3/*/*.mk))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (12 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 13/16] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 22:49   ` Romain Naour
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 15/16] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17 Dario Binacchi
  15 siblings, 1 reply; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5:
- Replace tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin with
  tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin

Added in v4

 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
index fdb058f3b72a..e0c4c92bd4cc 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -70,8 +70,12 @@ 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_PACKAGE_TI_K3_SECTYPE))
+TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
+
 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_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef
 
 $(eval $(kconfig-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 15/16] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (13 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17 Dario Binacchi
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

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.
- U-Boot is capable of building tiboot3.bin using Binman. So it's no longer
  necessary to use custom tools like ti-k3-image-gen.

Tested on SK-AM62B-P1.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5:
- Update commit message.

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   | 13 +++++----
 4 files changed, 67 insertions(+), 7 deletions(-)
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh

diff --git a/board/ti/am62x-sk/genimage.cfg b/board/ti/am62x-sk/genimage.cfg
index 26304fe98f99..398209f4d831 100644
--- a/board/ti/am62x-sk/genimage.cfg
+++ b/board/ti/am62x-sk/genimage.cfg
@@ -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 {
diff --git a/board/ti/am62x-sk/post-build.sh b/board/ti/am62x-sk/post-build.sh
new file mode 100755
index 000000000000..0f1f98ef217a
--- /dev/null
+++ b/board/ti/am62x-sk/post-build.sh
@@ -0,0 +1,49 @@
+#!/bin/sh -x
+
+# genimage will need to find the extlinux.conf
+# in the binaries directory
+
+die() {
+  cat <<EOF >&2
+Error: $@
+
+Usage: ${0} -c <console> -r <root> [-x <extra-args>]
+EOF
+  exit 1
+}
+
+o='c:r:x:'
+O='console:,root:,extra-args:'
+opts="$(getopt -n "${0##*/}" -o "${o}" -l "${O}" -- "${@}")"
+eval set -- "${opts}"
+while [ ${#} -gt 0 ]; do
+    case "${1}" in
+    (-c|--console)
+        CONSOLE="${2}"; shift 2
+        ;;
+    (-r|--root)
+        ROOT="${2}"; shift 2
+        ;;
+    (-x|--extra-args)
+        EXTRA_ARGS="${2}"; shift 2
+        ;;
+    (--)
+        shift 1; break
+        ;;
+    esac
+done
+
+[ -n "${CONSOLE}" ] || die "Missing argument"
+[ -n "${ROOT}" ] || die "Missing argument"
+append="console=${CONSOLE} root=${ROOT} rw rootfstype=ext4 rootwait"
+if [ -n "${EXTRA_ARGS}" ]; then
+    append="${append} ${EXTRA_ARGS}"
+fi
+
+mkdir -p "${BINARIES_DIR}"
+cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
+	label am62x-sk-buildroot
+	  kernel /Image
+	  fdtdir /
+	  append ${append}
+	__HEADER_EOF
diff --git a/board/ti/am62x-sk/post-image.sh b/board/ti/am62x-sk/post-image.sh
new file mode 100755
index 000000000000..34f732c091ad
--- /dev/null
+++ b/board/ti/am62x-sk/post-image.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -x
+
+BOARD_DIR="$(dirname "$0")"
+
+support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index 2835404a57df..be01c696b170 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -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_PACKAGE_TI_K3=y
@@ -24,17 +24,18 @@ 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-am62x"
-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="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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [Buildroot] [PATCH v5 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17
  2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (14 preceding siblings ...)
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 15/16] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
@ 2024-02-22 10:16 ` Dario Binacchi
  15 siblings, 0 replies; 26+ messages in thread
From: Dario Binacchi @ 2024-02-22 10:16 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, bryce, Anand Gadiyar

Tested on SK-AM62B-P1.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v5
- Bump to 6.6.17 from 6.6.1
- Update commit message

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(-)

diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index be01c696b170..e0377591a349 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -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.17"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 01/16] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 01/16] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting Dario Binacchi
@ 2024-02-22 21:25   ` Romain Naour
  0 siblings, 0 replies; 26+ messages in thread
From: Romain Naour @ 2024-02-22 21:25 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin, bryce,
	Anand Gadiyar

Hello Dario,

Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
> 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))

I believe the commit log needs to explain the issue with the current optee
PLATFORM setting.

Indeed, using PLATFORM=k3 can leads to a runtime boot crash on some K3 SoC
(j721e) because the optee flavor is missing.

We could use BR2_TARGET_OPTEE_OS_PLATFORM=k3 and
BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR=am62x but we actually can use
BR2_TARGET_OPTEE_OS_PLATFORM=k3-am62x as explained in the optee-os Makefile [1]

  # If $(PLATFORM) is defined and contains a hyphen, parse it as
  # $(PLATFORM)-$(PLATFORM_FLAVOR) for convenience

This is how meta-ti set the optee-os platform:

  meta-ti]$ git grep OPTEEMACHINE
  meta-ti-bsp/conf/machine/am437x-hs-evm.conf:OPTEEMACHINE = "ti-am43xx"
  meta-ti-bsp/conf/machine/am57xx-hs-evm.conf:OPTEEMACHINE = "ti-am57xx"
  meta-ti-bsp/conf/machine/beagleplay.conf:OPTEEMACHINE = "k3-am62x"
  meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf:OPTEEMACHINE = "ti-dra7xx"
  meta-ti-bsp/conf/machine/include/am62axx.inc:OPTEEMACHINE = "k3-am62x"
  meta-ti-bsp/conf/machine/include/am62pxx.inc:OPTEEMACHINE = "k3-am62x"
  meta-ti-bsp/conf/machine/include/am62xx.inc:OPTEEMACHINE = "k3-am62x"
  meta-ti-bsp/conf/machine/include/am64xx.inc:OPTEEMACHINE = "k3-am64x"
  meta-ti-bsp/conf/machine/include/am65xx.inc:OPTEEMACHINE = "k3-am65x"
  meta-ti-bsp/conf/machine/include/j7200.inc:OPTEEMACHINE = "k3-j721e"
  meta-ti-bsp/conf/machine/include/j721e.inc:OPTEEMACHINE = "k3-j721e"
  meta-ti-bsp/conf/machine/include/j721s2.inc:OPTEEMACHINE = "k3-j784s4"
  meta-ti-bsp/conf/machine/include/j722s.inc:OPTEEMACHINE = "k3-am62x"
  meta-ti-bsp/conf/machine/include/j784s4.inc:OPTEEMACHINE = "k3-j784s4"

  meta-ti uses the OPTEEMACHINE to set optee-os platform [2].

[1] https://github.com/OP-TEE/optee_os/blob/4.0.0/Makefile#L37
[2]
https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23

Best regards,
Romain

> 
> Suggested-by: Romain Naour <romain.naour@smile.fr>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
> Changes in v5
> - Drop BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR option
> 
> Added in v4
> 
>  configs/ti_am62x_sk_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
> index f88252a89c68..c3ad555a8184 100644
> --- a/configs/ti_am62x_sk_defconfig
> +++ b/configs/ti_am62x_sk_defconfig
> @@ -21,7 +21,7 @@ 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_TI_K3_IMAGE_GEN=y
>  BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
>  BR2_TARGET_TI_K3_R5_LOADER=y

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 09/16] package/python-jsonschema-specifications: add host variant
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 09/16] package/python-jsonschema-specifications: " Dario Binacchi
@ 2024-02-22 21:36   ` Romain Naour
  0 siblings, 0 replies; 26+ messages in thread
From: Romain Naour @ 2024-02-22 21:36 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin, bryce,
	Anand Gadiyar

Hello Dario,

Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
> 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.
> 
> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
> no changes since v3
> 
> Changes in v3:
> - Drop Config.in.host
> 
>  package/python-jsonschema-specifications.mk                      | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/python-jsonschema-specifications/python-jsonschema-specifications.mk b/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
> index 40879898c9d4..b6e309ab2bc9 100644
> --- a/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
> +++ b/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
> @@ -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
> +

python-jsonschema-specifications depends on host-python-referencing due to a
runtime dependency. Notice the "select BR2_PACKAGE_PYTHON_REFERENCING # runtime"
in Config.in for the target variant.

http://patchwork.ozlabs.org/project/buildroot/patch/20240213172817.2872849-8-romain.naour@smile.fr/

Best regards,
Romain


>  $(eval $(python-package))
> +$(eval $(host-python-package))

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 11/16] boot/ti-k3-r5-loader: set binman environment
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 11/16] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
@ 2024-02-22 22:04   ` Romain Naour
  0 siblings, 0 replies; 26+ messages in thread
From: Romain Naour @ 2024-02-22 22:04 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin, bryce,
	Anand Gadiyar

Hello Dario,

Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
> 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.
> 
> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Co-developed-by: Romain Naour <romain.naour@smile.fr>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
> Changes in v5:
> - Add dependecy on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
> - Drop runtime dependecies
> - Add host-python-pylibfdt dependency without requiring
>   BR2_TARGET_UBOOT_NEEDS_PYLIBFDT configuration
> - Add host-python3 and host-python-setuptools dependencies
> - Add SOB and COB tags of Romain Naour
> 
> 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/Config.in          | 1 +
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 8 +++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
> index 5f86c045c99f..fc71337e80cc 100644
> --- a/boot/ti-k3-r5-loader/Config.in
> +++ b/boot/ti-k3-r5-loader/Config.in
> @@ -1,6 +1,7 @@
>  config BR2_TARGET_TI_K3_R5_LOADER
>  	bool "ti-k3-r5-loader"
>  	depends on BR2_aarch64
> +	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema
>  	help
>  	  Separate U-Boot SPL build for R5 core on TI's K3 processors.
>  	  Usually used to build tiboot3.bin with k3-image-gen.
> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> index 0ffcb8235f2e..fdb058f3b72a 100644
> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -39,7 +39,12 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
>  	host-pkgconf \
>  	$(BR2_MAKE_HOST_DEPENDENCY) \
>  	host-arm-gnu-toolchain \
> -	host-openssl
> +	host-openssl \
> +	host-python-jsonschema \
> +	host-python-pyyaml \
> +	host-python3 \
> +	host-python-setuptools \
> +	host-python-pylibfdt

The dependency of binman is not really easy to follow.

First we have the packages list from binman.rst [1] then we have to install
additional python modules [2].

I'm not sure if we also need host-lzma and host-lz4 in dependency.

Maybe add a comment to retrieve this package list?

[1]
https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/binman/binman.rst?plain=1#L377

[2]
https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt

Best regards,
Romain


>  
>  TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
>  TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
> @@ -58,6 +63,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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 12/16] boot/uboot: set BINMAN_INDIRS for TI K3 DM
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 12/16] boot/uboot: set BINMAN_INDIRS for TI K3 DM Dario Binacchi
@ 2024-02-22 22:09   ` Romain Naour
  2024-02-22 22:35     ` Romain Naour
  0 siblings, 1 reply; 26+ messages in thread
From: Romain Naour @ 2024-02-22 22:09 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin, bryce,
	Anand Gadiyar

Hello Dario,

Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
> 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.
> 
> In this way, the previous setting becomes unnecessary, so let's remove
> it.
> 
> [1] https://patchwork.ozlabs.org/project/uboot/patch/20231030110138.1347603-3-n-yadav@ti.com/
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
> Changes in v5:
> - Drop "DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f"
>   from UBOOT_MAKE_OPTS.
> 
> no changes since v1:
> 
>  boot/uboot/uboot.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index dda606a88059..70982a87719f 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -189,7 +189,7 @@ 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 += BINMAN_INDIRS=$(BINARIES_DIR)

Binman tool is not specific to TI K3 platform, see my previous comment [1]

[1] http://lists.busybox.net/pipermail/buildroot/2024-February/685949.html

Best regards,
Romain


>  endif
>  
>  ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 13/16] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 13/16] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
@ 2024-02-22 22:31   ` Romain Naour
  0 siblings, 0 replies; 26+ messages in thread
From: Romain Naour @ 2024-02-22 22:31 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin, bryce,
	Anand Gadiyar

Hello Dario,

Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
> 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.
> 
> The patch makes an exception to the Buildroot rule "no subdirectory in
> package directory".
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
> Changes in v5:
> - Add SOB tag
> - Move the new ti-k3 from boot to package
> 
> Added in v4
> 
>  boot/ti-k3-image-gen/Config.in          | 61 ++-----------------------
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk |  4 +-
>  boot/uboot/Config.in                    |  7 ++-
>  configs/ti_am62x_sk_defconfig           |  3 +-
>  configs/ti_am64x_sk_defconfig           |  3 +-
>  package/Config.in                       |  1 +
>  package/ti-k3/Config.in                 | 54 ++++++++++++++++++++++
>  package/ti-k3/ti-k3.mk                  |  7 +++
>  8 files changed, 75 insertions(+), 65 deletions(-)
>  create mode 100644 package/ti-k3/Config.in
>  create mode 100644 package/ti-k3/ti-k3.mk
> 
> diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in
> index d76cef82e911..a57319f4be6d 100644
> --- a/boot/ti-k3-image-gen/Config.in
> +++ b/boot/ti-k3-image-gen/Config.in
> @@ -13,65 +13,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_PACKAGE_TI_K3_SOC_AM62AX
> +	default "ti-fs"  if BR2_PACKAGE_TI_K3_SOC_AM62X
> +	default "ti-sci" if BR2_PACKAGE_TI_K3_SOC_AM64X
> +	default "ti-sci" if BR2_PACKAGE_TI_K3_SOC_AM65X
>  
>  endif
> diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> index 64be9a18f2c4..aca29bcf1bd4 100644
> --- a/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> @@ -26,8 +26,8 @@ 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_PACKAGE_TI_K3_SOC))
> +TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
>  
>  TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
>  
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index beafb38930db..c7ebe2652001 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -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_PACKAGE_TI_K3_SOC_AM62AX || BR2_PACKAGE_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_PACKAGE_TI_K3_SOC_AM62AX
> +	default "am62xx"  if BR2_PACKAGE_TI_K3_SOC_AM62X

TI_K3_DM_SOCNAME should also move to ti-k3 package.

>  
>  endif
>  
> diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
> index a129e216d25b..2835404a57df 100644
> --- a/configs/ti_am62x_sk_defconfig
> +++ b/configs/ti_am62x_sk_defconfig
> @@ -11,6 +11,8 @@ 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_PACKAGE_TI_K3=y
> +BR2_PACKAGE_TI_K3_SOC_AM62X=y
>  BR2_TARGET_ROOTFS_EXT2=y
>  BR2_TARGET_ROOTFS_EXT2_4=y
>  BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
> @@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
>  BR2_TARGET_OPTEE_OS=y
>  BR2_TARGET_OPTEE_OS_PLATFORM="k3-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"
> diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
> index 26195194c7d6..566cbbe4824f 100644
> --- a/configs/ti_am64x_sk_defconfig
> +++ b/configs/ti_am64x_sk_defconfig
> @@ -11,6 +11,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
>  BR2_LINUX_KERNEL_INSTALL_TARGET=y
>  BR2_PACKAGE_LINUX_FIRMWARE=y
>  BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
> +BR2_PACKAGE_TI_K3=y
> +BR2_PACKAGE_TI_K3_SOC_AM64X=y
>  BR2_TARGET_ROOTFS_EXT2=y
>  BR2_TARGET_ROOTFS_EXT2_4=y
>  BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
> @@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
>  BR2_TARGET_OPTEE_OS=y
>  BR2_TARGET_OPTEE_OS_PLATFORM="k3-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"
> diff --git a/package/Config.in b/package/Config.in
> index bf0fe078b955..6d3ed34e121b 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -629,6 +629,7 @@ endmenu
>  	source "package/sysstat/Config.in"
>  	source "package/targetcli-fb/Config.in"
>  	source "package/ti-gfx/Config.in"
> +	source "package/ti-k3/Config.in"
>  	source "package/ti-sgx-demos/Config.in"
>  	source "package/ti-sgx-km/Config.in"
>  	source "package/ti-sgx-um/Config.in"
> diff --git a/package/ti-k3/Config.in b/package/ti-k3/Config.in
> new file mode 100644
> index 000000000000..01d88c8e1643
> --- /dev/null
> +++ b/package/ti-k3/Config.in
> @@ -0,0 +1,54 @@
> +config BR2_PACKAGE_TI_K3
> +	bool "TI K3"
> +	help
> +	  The TI K3 SOC specific selections.
> +
> +if BR2_PACKAGE_TI_K3
> +
> +choice
> +	prompt "SoC family"
> +
> +config BR2_PACKAGE_TI_K3_SOC_AM62AX
> +	bool "am62ax"
> +
> +config BR2_PACKAGE_TI_K3_SOC_AM62X
> +	bool "am62x"
> +
> +config BR2_PACKAGE_TI_K3_SOC_AM64X
> +	bool "am64x"
> +
> +config BR2_PACKAGE_TI_K3_SOC_AM65X
> +	bool "am65x"
> +
> +endchoice
> +
> +choice
> +	prompt "Security type"
> +	help
> +	  The target SoC security type option.
> +
> +config BR2_PACKAGE_TI_K3_SECTYPE_GP
> +	bool "gp"
> +
> +config BR2_PACKAGE_TI_K3_SECTYPE_HS_FS
> +	bool "hs-fs"

Not related to your serie but it seems that some TI K3 SoC variant doesn't
provide all SECTYPE.

For example: AM65 can by only GP or HS, there is no HS-FS (yet?)

This can be checked in meta-ti:

meta-ti-bsp/conf/machine/include/am65xx.inc:IMAGE_BOOT_FILES +=
"tiboot3-am65x_sr2-gp-evm.bin"
meta-ti-bsp/conf/machine/include/am65xx.inc:IMAGE_BOOT_FILES +=
"tiboot3-am65x_sr2-hs-evm.bin"

So BR2_PACKAGE_TI_K3_SECTYPE_HS_FS must not be selected if
BR2_PACKAGE_TI_K3_SOC_AM65X is used.

> +
> +config BR2_PACKAGE_TI_K3_SECTYPE_HS
> +	bool "hs"
> +
> +endchoice
> +
> +config BR2_PACKAGE_TI_K3_SOC
> +	string
> +	default "am62ax" if BR2_PACKAGE_TI_K3_SOC_AM62AX
> +	default "am62x"  if BR2_PACKAGE_TI_K3_SOC_AM62X
> +	default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X
> +	default "am65x"  if BR2_PACKAGE_TI_K3_SOC_AM65X
> +
> +config BR2_PACKAGE_TI_K3_SECTYPE
> +	string
> +	default "gp"    if BR2_PACKAGE_TI_K3_SECTYPE_GP
> +	default "hs-fs" if BR2_PACKAGE_TI_K3_SECTYPE_HS_FS
> +	default "hs"    if BR2_PACKAGE_TI_K3_SECTYPE_HS

move BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME here (BR2_PACKAGE_TI_K3_DM).

Best regards,
Romain

> +
> +endif
> diff --git a/package/ti-k3/ti-k3.mk b/package/ti-k3/ti-k3.mk
> new file mode 100644
> index 000000000000..a2da29f5148c
> --- /dev/null
> +++ b/package/ti-k3/ti-k3.mk
> @@ -0,0 +1,7 @@
> +################################################################################
> +#
> +# ti-k3
> +#
> +################################################################################
> +
> +include $(sort $(wildcard package/ti-k3/*/*.mk))

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 12/16] boot/uboot: set BINMAN_INDIRS for TI K3 DM
  2024-02-22 22:09   ` Romain Naour
@ 2024-02-22 22:35     ` Romain Naour
  0 siblings, 0 replies; 26+ messages in thread
From: Romain Naour @ 2024-02-22 22:35 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin, bryce,
	Anand Gadiyar

Le 22/02/2024 à 23:09, Romain Naour a écrit :
> Hello Dario,
> 
> Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
>> 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.
>>
>> In this way, the previous setting becomes unnecessary, so let's remove
>> it.
>>
>> [1] https://patchwork.ozlabs.org/project/uboot/patch/20231030110138.1347603-3-n-yadav@ti.com/
>> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>>
>> ---
>>
>> Changes in v5:
>> - Drop "DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f"
>>   from UBOOT_MAKE_OPTS.
>>
>> no changes since v1:
>>
>>  boot/uboot/uboot.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
>> index dda606a88059..70982a87719f 100644
>> --- a/boot/uboot/uboot.mk
>> +++ b/boot/uboot/uboot.mk
>> @@ -189,7 +189,7 @@ 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_TI_K3_DM_SOCNAME is not used anymore

With the ti-k3 package introduced in the followup patch, it can be simplifed to
(along the separate binman uboot option)

ifeq ($(BR2_PACKAGE_TI_K3),y)
UBOOT_DEPENDENCIES += ti-k3-boot-firmware
endif

>>  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 += BINMAN_INDIRS=$(BINARIES_DIR)
> 
> Binman tool is not specific to TI K3 platform, see my previous comment [1]
> 
> [1] http://lists.busybox.net/pipermail/buildroot/2024-February/685949.html
> 
> Best regards,
> Romain
> 
> 
>>  endif
>>  
>>  ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-02-22 10:16 ` [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
@ 2024-02-22 22:49   ` Romain Naour
  2024-02-23 11:12     ` Dario Binacchi
  0 siblings, 1 reply; 26+ messages in thread
From: Romain Naour @ 2024-02-22 22:49 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin, bryce,
	Anand Gadiyar

Hello Dario,

Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
> Recent versions of U-Boot are capable of building tiboot3.bin using
> Binman. In this case, let's copy it to the binaries directory.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
> Changes in v5:
> - Replace tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin with
>   tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
> 
> Added in v4
> 
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> index fdb058f3b72a..e0c4c92bd4cc 100644
> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -70,8 +70,12 @@ 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_PACKAGE_TI_K3_SECTYPE))
> +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> +
>  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_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;

I don't think "find" is needed here since we should copy only one file to
$(BINARIES_DIR)/tiboot3.bin



>  endef
>  
>  $(eval $(kconfig-package))

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-02-22 22:49   ` Romain Naour
@ 2024-02-23 11:12     ` Dario Binacchi
  2024-02-23 13:18       ` Romain Naour
  0 siblings, 1 reply; 26+ messages in thread
From: Dario Binacchi @ 2024-02-23 11:12 UTC (permalink / raw)
  To: Romain Naour
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, buildroot, Andreas Dannenberg,
	Alexander Sverdlin, bryce, Anand Gadiyar

Hi Romain,

On Thu, Feb 22, 2024 at 11:49 PM Romain Naour <romain.naour@smile.fr> wrote:
>
> Hello Dario,
>
> Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
> > Recent versions of U-Boot are capable of building tiboot3.bin using
> > Binman. In this case, let's copy it to the binaries directory.
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> >
> > ---
> >
> > Changes in v5:
> > - Replace tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin with
> >   tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
> >
> > Added in v4
> >
> >  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > index fdb058f3b72a..e0c4c92bd4cc 100644
> > --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > @@ -70,8 +70,12 @@ 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_PACKAGE_TI_K3_SECTYPE))
> > +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> > +
> >  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_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
>
> I don't think "find" is needed here since we should copy only one file to
> $(BINARIES_DIR)/tiboot3.bin

Can it be ok?

-       find $(@D) -name
"tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin"
-type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
+       cp $(@D)/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
$(BINARIES_DIR)/tiboot3.bin

I tested it and It works.

Thanks and Regards,
Dario

>
>
>
> >  endef
> >
> >  $(eval $(kconfig-package))
>


-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi@amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info@amarulasolutions.com

www.amarulasolutions.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-02-23 11:12     ` Dario Binacchi
@ 2024-02-23 13:18       ` Romain Naour
  0 siblings, 0 replies; 26+ messages in thread
From: Romain Naour @ 2024-02-23 13:18 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, buildroot, Andreas Dannenberg,
	Alexander Sverdlin, bryce, Anand Gadiyar

Hi Dario,

Le 23/02/2024 à 12:12, Dario Binacchi a écrit :
> Hi Romain,
> 
> On Thu, Feb 22, 2024 at 11:49 PM Romain Naour <romain.naour@smile.fr> wrote:
>>
>> Hello Dario,
>>
>> Le 22/02/2024 à 11:16, Dario Binacchi a écrit :
>>> Recent versions of U-Boot are capable of building tiboot3.bin using
>>> Binman. In this case, let's copy it to the binaries directory.
>>>
>>> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>>>
>>> ---
>>>
>>> Changes in v5:
>>> - Replace tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin with
>>>   tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
>>>
>>> Added in v4
>>>
>>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
>>> index fdb058f3b72a..e0c4c92bd4cc 100644
>>> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
>>> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
>>> @@ -70,8 +70,12 @@ 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_PACKAGE_TI_K3_SECTYPE))
>>> +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
>>> +
>>>  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_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin" -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
>>
>> I don't think "find" is needed here since we should copy only one file to
>> $(BINARIES_DIR)/tiboot3.bin
> 
> Can it be ok?
> 
> -       find $(@D) -name
> "tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin"
> -type f -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
> +       cp $(@D)/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
> $(BINARIES_DIR)/tiboot3.bin
> 
> I tested it and It works.

Looks good, thanks!

Best regards,
Romain


> 
> Thanks and Regards,
> Dario
> 
>>
>>
>>
>>>  endef
>>>
>>>  $(eval $(kconfig-package))
>>
> 
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-02-23 13:19 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 10:16 [Buildroot] [PATCH v5 00/16] Add support for AM62x-SK HS-FS devices Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 01/16] configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting Dario Binacchi
2024-02-22 21:25   ` Romain Naour
2024-02-22 10:16 ` [Buildroot] [PATCH v5 02/16] configs/ti_am64x_sk_defconfig: " Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 03/16] configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader version Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 04/16] configs/ti_am64x_sk_defconfig: " Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 05/16] boot/ti-k3-r5-loader: bump to version 2024.01 Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 06/16] package/python-attrs: add host variant Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 07/16] package/python-rpds-py: " Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 08/16] package/python-referencing: " Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 09/16] package/python-jsonschema-specifications: " Dario Binacchi
2024-02-22 21:36   ` Romain Naour
2024-02-22 10:16 ` [Buildroot] [PATCH v5 10/16] package/python-jsonschema: " Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 11/16] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
2024-02-22 22:04   ` Romain Naour
2024-02-22 10:16 ` [Buildroot] [PATCH v5 12/16] boot/uboot: set BINMAN_INDIRS for TI K3 DM Dario Binacchi
2024-02-22 22:09   ` Romain Naour
2024-02-22 22:35     ` Romain Naour
2024-02-22 10:16 ` [Buildroot] [PATCH v5 13/16] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
2024-02-22 22:31   ` Romain Naour
2024-02-22 10:16 ` [Buildroot] [PATCH v5 14/16] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
2024-02-22 22:49   ` Romain Naour
2024-02-23 11:12     ` Dario Binacchi
2024-02-23 13:18       ` Romain Naour
2024-02-22 10:16 ` [Buildroot] [PATCH v5 15/16] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
2024-02-22 10:16 ` [Buildroot] [PATCH v5 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17 Dario Binacchi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.