All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
@ 2024-02-13 17:27 Romain Naour
  2024-02-13 17:27 ` [Buildroot] [PATCH 01/21] DEVELOPERS: add Romain Naour for am574x_idk_defconfig Romain Naour
                   ` (22 more replies)
  0 siblings, 23 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:27 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.

This series start by adding U-boot binman support already submitted in the
preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
[1], with small improvements.
See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]

With binman support, we can add the TI K3 j721e SoC support by
providing all required firmware generated by the build.

Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
boot the board (serial debug and ethernet working).

Thanks to binman support, we can remove the ti-k3-image-gen tool from
Buildroot. To do that, we have to update existing defconfig (am62, am64).

Followup commits can improve TI K3 HS-FS devices based on binman instead
of legacy core-secdev-k3 tool.

[1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
[2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf

Best regards,
Romain

Dario Binacchi (5):
  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

Romain Naour (16):
  DEVELOPERS: add Romain Naour for am574x_idk_defconfig
  configs/ti_am62x_sk_defconfig: fix optee-os plateform
  configs/ti_am64x_sk_defconfig: fix optee-os plateform
  boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
  boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
  boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
    BINARIES_DIR
  boot/ti-k3-boot-firmware: introduce
    BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
  boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
    package
  boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
  boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
  boot/uboot: enable TI K3 Device Manager (DM) for j721e
  boot/ti-k3-boot-firmware: bump to version 09.02.00.004
  configs/ti_j721e_sk_defconfig: new defconfig
  configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
    tool
  configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
    tool
  boot/ti-k3-image-gen: remove package

 Config.in.legacy                              |  7 ++
 DEVELOPERS                                    |  6 +-
 board/ti/j721e-sk/genimage.cfg                | 28 +++++++
 board/ti/j721e-sk/post-build.sh               | 16 ++++
 board/ti/j721e-sk/readme.txt                  | 34 ++++++++
 boot/Config.in                                |  1 -
 boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
 .../ti-k3-boot-firmware.hash                  |  2 +-
 .../ti-k3-boot-firmware.mk                    | 16 ++--
 boot/ti-k3-image-gen/Config.in                | 77 -------------------
 boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
 boot/ti-k3-r5-loader/Config.in                |  8 ++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
 boot/uboot/Config.in                          | 27 ++++---
 boot/uboot/uboot.mk                           | 10 ++-
 configs/ti_am62x_sk_defconfig                 | 14 ++--
 configs/ti_am64x_sk_defconfig                 | 14 ++--
 ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       | 10 +++
 .../python-jsonschema/python-jsonschema.mk    | 14 ++++
 .../python-referencing/python-referencing.mk  | 11 +++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 24 files changed, 275 insertions(+), 180 deletions(-)
 create mode 100644 board/ti/j721e-sk/genimage.cfg
 create mode 100755 board/ti/j721e-sk/post-build.sh
 create mode 100644 board/ti/j721e-sk/readme.txt
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
 copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)

--
2.43.0

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

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

* [Buildroot] [PATCH 01/21] DEVELOPERS: add Romain Naour for am574x_idk_defconfig
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
@ 2024-02-13 17:27 ` Romain Naour
  2024-02-13 17:27 ` [Buildroot] [PATCH 02/21] configs/ti_am62x_sk_defconfig: fix optee-os plateform Romain Naour
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:27 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

The DEVELOPERS entry was missing.

Fixes: 35eb74c634 ("configs/am574x_idk_defconfig: new defconfig")
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 DEVELOPERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index 0d12c3abcb..ff44741f9f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2667,7 +2667,9 @@ F:	package/vnstat/
 
 N:	Romain Naour <romain.naour@gmail.com>
 F:	board/qemu/
+F:	board/ti/am574x-idk/
 F:	configs/qemu_*
+F:	configs/am574x_idk_defconfig
 F:	package/alure/
 F:	package/aubio/
 F:	package/binutils/
-- 
2.43.0

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

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

* [Buildroot] [PATCH 02/21] configs/ti_am62x_sk_defconfig: fix optee-os plateform
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
  2024-02-13 17:27 ` [Buildroot] [PATCH 01/21] DEVELOPERS: add Romain Naour for am574x_idk_defconfig Romain Naour
@ 2024-02-13 17:27 ` Romain Naour
  2024-02-13 18:45   ` Alexander Sverdlin
  2024-02-13 17:27 ` [Buildroot] [PATCH 03/21] configs/ti_am64x_sk_defconfig: " Romain Naour
                   ` (20 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:27 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

According to meta-ti, the optee-os plateform must be
"k3-am62x" not "k3".

  meta-ti uses the OPTEEMACHINE to set optee-os platform [1].
  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"

[1] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
On SK-TDA4VM, such error leads to a runtime boot crash.
---
 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 f88252a89c..c3ad555a81 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] 63+ messages in thread

* [Buildroot] [PATCH 03/21] configs/ti_am64x_sk_defconfig: fix optee-os plateform
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
  2024-02-13 17:27 ` [Buildroot] [PATCH 01/21] DEVELOPERS: add Romain Naour for am574x_idk_defconfig Romain Naour
  2024-02-13 17:27 ` [Buildroot] [PATCH 02/21] configs/ti_am62x_sk_defconfig: fix optee-os plateform Romain Naour
@ 2024-02-13 17:27 ` Romain Naour
  2024-02-13 18:56   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 04/21] package/python-attrs: add host variant Romain Naour
                   ` (19 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:27 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

According to meta-ti, the optee-os plateform must be
"k3-am64x" not "k3".

  meta-ti uses the OPTEEMACHINE to set optee-os platform [1].
  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"

[1] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
On SK-TDA4VM, such error leads to a runtime boot crash.
---
 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 4bfd31f0c8..097175bd8f 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] 63+ messages in thread

* [Buildroot] [PATCH 04/21] package/python-attrs: add host variant
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (2 preceding siblings ...)
  2024-02-13 17:27 ` [Buildroot] [PATCH 03/21] configs/ti_am64x_sk_defconfig: " Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-13 17:28 ` [Buildroot] [PATCH 05/21] package/python-rpds-py: " Romain Naour
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Dario Binacchi, Michael Trimarchi

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>

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.

On some plateforms (curently TI K3 SoC familly) binman uses
python-jsonschema [1] on the host that requires host-python-attrs.

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

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>
[Romain: extend commit log]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Changes in v4:
- extend commit log
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 8a1236cc44..fb1729e62f 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] 63+ messages in thread

* [Buildroot] [PATCH 05/21] package/python-rpds-py: add host variant
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (3 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 04/21] package/python-attrs: add host variant Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-13 17:28 ` [Buildroot] [PATCH 06/21] package/python-referencing: " Romain Naour
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Dario Binacchi, Michael Trimarchi

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>

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

On some plateforms (curently TI K3 SoC familly) binman uses
python-jsonschema [1] on the host that requires host-python-rpds-py.

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

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>
[Romain: extend commit log]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Changes in v4:
- extend commit log
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 80670f2e4f..cee2ff290a 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] 63+ messages in thread

* [Buildroot] [PATCH 06/21] package/python-referencing: add host variant
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (4 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 05/21] package/python-rpds-py: " Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-13 17:28 ` [Buildroot] [PATCH 07/21] package/python-jsonschema-specifications: " Romain Naour
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Dario Binacchi, Michael Trimarchi

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>

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.

On some plateforms (curently TI K3 SoC familly) binman uses
python-jsonschema [1] on the host that requires host-python-referencing.

We don't have the concept of runtime dependencies for host packages,
so we must add them as build dependencies of the host variant.

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

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>
[Romain:
  - extend commit log
  - remove host-python-attrs from target variant dependency
  - add missing host runtime dependencies]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Changes in v4:
- extend commit log
- remove host-python-attrs from target variant dependency
- add missing host runtime dependencies
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 27d1452e91..66d59ed809 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] 63+ messages in thread

* [Buildroot] [PATCH 07/21] package/python-jsonschema-specifications: add host variant
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (5 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 06/21] package/python-referencing: " Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-13 17:28 ` [Buildroot] [PATCH 08/21] package/python-jsonschema: " Romain Naour
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Dario Binacchi, Michael Trimarchi

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>

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.

On some plateforms (curently TI K3 SoC familly) binman uses
python-jsonschema [1] on the host that requires
host-python-jsonschema-specifications.

We don't have the concept of runtime dependencies for host packages,
so we must add them as build dependencies of the host variant.

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

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>
[Romain:
  - extend commit log
  - add missing host runtime dependencies]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Changes in v4:
- extend commit log
- add missing host runtime dependencies
Changes in v3:
- Drop Config.in.host
---
 .../python-jsonschema-specifications.mk                | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/python-jsonschema-specifications/python-jsonschema-specifications.mk b/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
index 40879898c9..653c839bb4 100644
--- a/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
+++ b/package/python-jsonschema-specifications/python-jsonschema-specifications.mk
@@ -14,4 +14,14 @@ PYTHON_JSONSCHEMA_SPECIFICATIONS_DEPENDENCIES = \
 	host-python-hatchling \
 	host-python-hatch-vcs
 
+HOST_PYTHON_JSONSCHEMA_SPECIFICATIONS_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_JSONSCHEMA_SPECIFICATIONS_DEPENDENCIES += \
+	host-python-referencing
+
 $(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] 63+ messages in thread

* [Buildroot] [PATCH 08/21] package/python-jsonschema: add host variant
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (6 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 07/21] package/python-jsonschema-specifications: " Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-13 17:28 ` [Buildroot] [PATCH 09/21] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Romain Naour
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Dario Binacchi, Michael Trimarchi

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>

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.

On some plateforms (curently TI K3 SoC familly) binman uses
python-jsonschema [1] add all missing runtime rependencies
for the host variant.

We don't have the concept of runtime dependencies for host packages,
so we must add them as build dependencies of the host variant.

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

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>
[Romain:
  - extend commit log
  - add missing host runtime dependencies]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Changes in v4:
- extend commit log
- add missing host runtime dependencies
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 512c92aa77..9e8b6e18b8 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] 63+ messages in thread

* [Buildroot] [PATCH 09/21] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (7 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 08/21] package/python-jsonschema: " Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 10:58   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 10/21] boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option Romain Naour
                   ` (13 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

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 tool uses additional host python modules that must be provided by
Buildroot. So introduce a new option BR2_TARGET_UBOOT_USE_BINMAN to
add additional host packages in U-Boot build dependency to use binman.

The binman requirement is directly included in buildman dependency
(tools/buildman/requirements.txt) since within U-Boot, binman is
invoked by the build system, here buildman [1].

[1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Note:
  binman is bundled in U-Boot source code. Use "USE_BINMAN" instead of
  "NEEDS_BINMAN" since it's not an external U-Boot dependency.
---
 boot/uboot/Config.in | 11 +++++++++++
 boot/uboot/uboot.mk  |  8 ++++++++
 2 files changed, 19 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index beafb38930..e6e7956adc 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -290,6 +290,17 @@ config BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN
 	  This option makes sure that the needed binary blobs are copied
 	  into the U-Boot source directory.
 
+config BR2_TARGET_UBOOT_USE_BINMAN
+	bool "U-Boot use binman"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema
+	select BR2_TARGET_UBOOT_NEEDS_PYTHON3
+	select BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS
+	select BR2_TARGET_UBOOT_NEEDS_PYLIBFDT
+	help
+	  Use binman tool for generation and signing of boot images.
+
+	  https://docs.u-boot.org/en/v2024.01/develop/package/binman.html
+
 menu "U-Boot binary format"
 
 config BR2_TARGET_UBOOT_FORMAT_AIS
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index dda606a880..0714522550 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -269,6 +269,14 @@ ifeq ($(BR2_TARGET_UBOOT_NEEDS_XXD),y)
 UBOOT_DEPENDENCIES += host-vim
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),y)
+# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt
+UBOOT_DEPENDENCIES += \
+	host-python-jsonschema \
+	host-python-pyyaml
+UBOOT_MAKE_OPTS += BINMAN_INDIRS=$(BINARIES_DIR)
+endif
+
 # prior to u-boot 2013.10 the license info was in COPYING. Copy it so
 # legal-info finds it
 define UBOOT_COPY_OLD_LICENSE_FILE
-- 
2.43.0

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

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

* [Buildroot] [PATCH 10/21] boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (8 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 09/21] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 10:58   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 11/21] boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to BINARIES_DIR Romain Naour
                   ` (12 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

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.

As for U-boot package, this tool uses additional host python modules
that must be provided by Buildroot. So introduce a new option
BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN to add additional host packages
in U-Boot build dependency to use binman.

The binman requirement is directly included in buildman dependency
(tools/buildman/requirements.txt) since within U-Boot, binman is
invoked by the build system, here buildman [1].

Make sure that all binman requirements are build before
ti-k3-r5-loader.

[1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Note:
  binman is bundled in U-Boot source code. Use "USE_BINMAN" instead of
  "NEEDS_BINMAN" since it's not an external U-Boot dependency.
---
 boot/ti-k3-r5-loader/Config.in          |  8 ++++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 14 ++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
index 8c8368a1a5..d678bd17c2 100644
--- a/boot/ti-k3-r5-loader/Config.in
+++ b/boot/ti-k3-r5-loader/Config.in
@@ -93,4 +93,12 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE
 	help
 	  Path to the TI K3 R5 Loader configuration file.
 
+config BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN
+	bool "ti-k3-r5-loader use binman"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema
+	help
+	  Use binman tool for generation and signing of boot images.
+
+	  https://docs.u-boot.org/en/v2024.01/develop/package/binman.html
+
 endif
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 0ffcb8235f..8f86e0fb07 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -60,6 +60,20 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
 	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
 	HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
+ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN),y)
+# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt
+TI_K3_R5_LOADER_DEPENDENCIES += \
+	host-python-jsonschema \
+	host-python-pyyaml
+# Make sure that all binman requirements are build before ti-k3-r5-loader.
+TI_K3_R5_LOADER_DEPENDENCIES += \
+	host-python3 \
+	host-python-setuptools \
+	host-python-pylibfdt \
+	host-python-pyelftools
+TI_K3_R5_LOADER_MAKE_OPTS += BINMAN_INDIRS=$(BINARIES_DIR)
+endif
+
 define TI_K3_R5_LOADER_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
-- 
2.43.0

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

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

* [Buildroot] [PATCH 11/21] boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to BINARIES_DIR
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (9 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 10/21] boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 10:58   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 12/21] boot/ti-k3-boot-firmware: introduce BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX, AM62X, AM64X, AM65X} Romain Naour
                   ` (11 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

U-boot for k3 r5 core (ti-k3-r5-loader) can install different target
image (tiboot3*.bin) depending on the k3 SoC variant using different
boot flow [1]:

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

K3 SoC using Split Binary Boot Flow also requires sysfw-*.itb file
to boot (eg: am65, j721e). Only tiboot3*.bin is needed for other
boot flow.

From [1]:
"It's important to rename the generated tiboot3.bin and sysfw.itb
to match exactly tiboot3.bin and sysfw.itb as ROM and the wakeup
UBoot SPL will only look for and load the files with these names."

So boards using HS (High Secure) K3 SoC variant must update the
tiboot3.bin (and sysfw.itb) in their post-build script.

ti-k3-r5-loader must install any tiboot3*.bin (and sysfw*.itb)
to BINARIES_DIR let the user which one should be used in a
post-build script.

See the list of all tiboot3*.bin and sysfw*.itb file variant found in meta-ti:

  meta-ti-bsp/conf/machine/beaglebone-ai64-k3r5.conf:UBOOT_IMAGE = "tiboot3-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
  meta-ti-bsp/conf/machine/beaglebone-ai64-k3r5.conf:UBOOT_SYMLINK = "tiboot3-${MAINMACHINE}.${UBOOT_SUFFIX}"
  meta-ti-bsp/conf/machine/include/am62axx.inc:IMAGE_BOOT_FILES += "tiboot3-am62ax-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/am62axx.inc:IMAGE_BOOT_FILES += "tiboot3-am62ax-gp-evm.bin"
  meta-ti-bsp/conf/machine/include/am62axx.inc:IMAGE_BOOT_FILES += "tiboot3-am62ax-hs-evm.bin"
  meta-ti-bsp/conf/machine/include/am62pxx.inc:IMAGE_BOOT_FILES += "tiboot3-am62px-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/am62xx.inc:IMAGE_BOOT_FILES += "tiboot3-am62x-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/am62xx.inc:IMAGE_BOOT_FILES += "tiboot3-am62x-gp-evm.bin"
  meta-ti-bsp/conf/machine/include/am62xx.inc:IMAGE_BOOT_FILES += "tiboot3-am62x-hs-evm.bin"
  meta-ti-bsp/conf/machine/include/am64xx.inc:IMAGE_BOOT_FILES += "tiboot3-am64x_sr2-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/am64xx.inc:IMAGE_BOOT_FILES += "tiboot3-am64x-gp-evm.bin"
  meta-ti-bsp/conf/machine/include/am64xx.inc:IMAGE_BOOT_FILES += "tiboot3-am64x_sr2-hs-evm.bin"
  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"
  meta-ti-bsp/conf/machine/include/j7200.inc:IMAGE_BOOT_FILES += "tiboot3-j7200-gp-evm.bin"
  meta-ti-bsp/conf/machine/include/j7200.inc:IMAGE_BOOT_FILES += "tiboot3-j7200_sr2-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/j7200.inc:IMAGE_BOOT_FILES += "tiboot3-j7200_sr2-hs-evm.bin"
  meta-ti-bsp/conf/machine/include/j721e.inc:IMAGE_BOOT_FILES += "tiboot3-j721e-gp-evm.bin"
  meta-ti-bsp/conf/machine/include/j721e.inc:IMAGE_BOOT_FILES += "tiboot3-j721e_sr2-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/j721e.inc:IMAGE_BOOT_FILES += "tiboot3-j721e_sr1_1-hs-evm.bin"
  meta-ti-bsp/conf/machine/include/j721s2.inc:IMAGE_BOOT_FILES += "tiboot3-j721s2-gp-evm.bin"
  meta-ti-bsp/conf/machine/include/j721s2.inc:IMAGE_BOOT_FILES += "tiboot3-j721s2-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/j722s.inc:IMAGE_BOOT_FILES += "tiboot3-j722s-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/j784s4.inc:IMAGE_BOOT_FILES += "tiboot3-j784s4-gp-evm.bin"
  meta-ti-bsp/conf/machine/include/j784s4.inc:IMAGE_BOOT_FILES += "tiboot3-j784s4-hs-fs-evm.bin"
  meta-ti-bsp/conf/machine/include/k3r5.inc:SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"

  meta-ti-bsp/conf/machine/include/am65xx.inc:IMAGE_BOOT_FILES += "sysfw.itb"
  meta-ti-bsp/conf/machine/include/am65xx.inc:IMAGE_BOOT_FILES += "sysfw-am65x_sr2-gp-evm.itb"
  meta-ti-bsp/conf/machine/include/am65xx.inc:IMAGE_BOOT_FILES += "sysfw-am65x_sr2-hs-evm.itb"
  meta-ti-bsp/conf/machine/include/j721e.inc:IMAGE_BOOT_FILES += "sysfw.itb"
  meta-ti-bsp/conf/machine/include/j721e.inc:IMAGE_BOOT_FILES += "sysfw-j721e-gp-evm.itb"
  meta-ti-bsp/conf/machine/include/j721e.inc:IMAGE_BOOT_FILES += "sysfw-j721e_sr2-hs-fs-evm.itb"
  meta-ti-bsp/conf/machine/include/j721e.inc:IMAGE_BOOT_FILES += "sysfw-j721e_sr1_1-hs-evm.itb"

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

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 9 +++++++++
 1 file changed, 9 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 8f86e0fb07..b3c756dc47 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -78,8 +78,17 @@ define TI_K3_R5_LOADER_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
 
+# sysfw*.itb are only generated for Split binary based Boot Flow (eg: am65, j721e)
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
 	cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+	for f in $(@D)/tiboot3*.bin ; do \
+		$(INSTALL) -D -m 0644 $$f $(BINARIES_DIR)/`basename $$f` || exit 1; \
+	done
+	for f in $(@D)/sysfw*.itb ; do \
+		if test -e $$f ; then \
+			$(INSTALL) -D -m 0644 $$f $(BINARIES_DIR)/`basename $$f` || exit 1; \
+		fi ; \
+	done
 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] 63+ messages in thread

* [Buildroot] [PATCH 12/21] boot/ti-k3-boot-firmware: introduce BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX, AM62X, AM64X, AM65X}
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (10 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 11/21] boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to BINARIES_DIR Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 11:20   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 13/21] boot/uboot: use DM firmware name defined by ti-k3-boot-firmware package Romain Naour
                   ` (10 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

ti-k3-image-gen tool is deprecated an replaced by binman [1].

But BR2_TARGET_TI_K3_IMAGE_GEN_SOC_{AM62AX,AM62X} is used by u-boot
package to select which Device Manager (DM) firmware to use for the
U-Boot build.

In order to remove ti-k3-image-gen package, introduce
BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X} to
replace BR2_TARGET_TI_K3_IMAGE_GEN_SOC_{AM62AX,AM62X,AM64X,AM65X}.

In order to avoid breaking existing defconfig still using
ti-k3-image-gen tool (ti_am62x_sk_defconfig, ti_am64x_sk_defconfig)
select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC symbol from ti-k3-image-gen
package.

While at it, only install required firmware to BINARIES_DIR based
on the selected TI K3 SoC variant.

This requires two intall step:
  - ti-sysfw installation based on the SoC variant.
  - ti-dm installation only for SoC using split firmware boot flow
    (eg: am62, j721e)

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

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 boot/ti-k3-boot-firmware/Config.in            | 34 +++++++++++++++++++
 .../ti-k3-boot-firmware.mk                    | 12 +++++--
 boot/ti-k3-image-gen/Config.in                |  4 +++
 3 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/boot/ti-k3-boot-firmware/Config.in b/boot/ti-k3-boot-firmware/Config.in
index d80bb4bdb3..8393699998 100644
--- a/boot/ti-k3-boot-firmware/Config.in
+++ b/boot/ti-k3-boot-firmware/Config.in
@@ -5,3 +5,37 @@ config BR2_TARGET_TI_K3_BOOT_FIRMWARE
 	  This package downloads and installs the TI-specific ti-sysfw
 	  and ti-dm firmware needed to boot TI K3 platforms (which
 	  include AM62x, AM64x, AM65x and more).
+
+if BR2_TARGET_TI_K3_BOOT_FIRMWARE
+choice
+	prompt "SoC family"
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX
+	bool "am62ax"
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
+	bool "am62x"
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
+	bool "am64x"
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM65X
+	bool "am65x"
+
+endchoice
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC
+	string
+	default "am62ax" if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX
+	default "am62x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
+	default "am64x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
+	default "am65x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM65X
+
+# Only devices with a split firmware boot flow requires a DM firmware (eg: am62, j721e)
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM
+	string
+	default "am62axx" if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX
+	default "am62xx"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
+	default ""
+
+endif
diff --git a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
index 1f8ade207c..c7c5eb0818 100644
--- a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
+++ b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
@@ -13,9 +13,17 @@ TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES = YES
 TI_K3_BOOT_FIRMWARE_LICENSE = TI Proprietary
 TI_K3_BOOT_FIRMWARE_LICENSE_FILES = LICENSE.ti
 
+ifneq ($(BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM),)
+define TI_K3_BOOT_FIRMWARE_INSTALL_DM_FILES
+	mkdir -p $(BINARIES_DIR)/ti-dm
+	cp -dpfr $(@D)/ti-dm/$(BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM) $(BINARIES_DIR)/ti-dm
+endef
+endif
+
 define TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES_CMDS
-	cp -dpfr $(@D)/ti-sysfw $(BINARIES_DIR)/
-	cp -dpfr $(@D)/ti-dm $(BINARIES_DIR)/
+	mkdir -p $(BINARIES_DIR)/ti-sysfw
+	cp -dpfr $(@D)/ti-sysfw/*$(BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC)* $(BINARIES_DIR)/ti-sysfw
+	$(TI_K3_BOOT_FIRMWARE_INSTALL_DM_FILES)
 endef
 
 $(eval $(generic-package))
diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in
index d76cef82e9..e54f5ec992 100644
--- a/boot/ti-k3-image-gen/Config.in
+++ b/boot/ti-k3-image-gen/Config.in
@@ -18,15 +18,19 @@ choice
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
 	bool "am62ax"
+	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
 	bool "am62x"
+	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
 	bool "am64x"
+	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 	bool "am65x"
+	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM65X
 
 endchoice
 
-- 
2.43.0

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

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

* [Buildroot] [PATCH 13/21] boot/uboot: use DM firmware name defined by ti-k3-boot-firmware package
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (11 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 12/21] boot/ti-k3-boot-firmware: introduce BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX, AM62X, AM64X, AM65X} Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 11:29   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 14/21] boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E Romain Naour
                   ` (9 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

The DM firmware name is now defined by ti-k3-boot-frimware package by
BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM, so BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
can be removed to avoid duplication in Kconfig.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 boot/uboot/Config.in | 9 ---------
 boot/uboot/uboot.mk  | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index e6e7956adc..63359266c6 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -250,15 +250,6 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 	  Some TI K3 devices need the Device Manager (DM) firmware to
 	  be available for the U-Boot build.
 
-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
-
-endif
-
 config BR2_TARGET_UBOOT_NEEDS_OPENSBI
 	bool "U-Boot needs OpenSBI"
 	depends on BR2_TARGET_OPENSBI
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 0714522550..aa2ca99bdd 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -187,7 +187,7 @@ UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 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 = $(call qstrip,$(BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM))
 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
 endif
-- 
2.43.0

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

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

* [Buildroot] [PATCH 14/21] boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (12 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 13/21] boot/uboot: use DM firmware name defined by ti-k3-boot-firmware package Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-13 20:23   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 15/21] boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options Romain Naour
                   ` (8 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

The k3 J721E support is needed to build for DRA829/TDA4VM SoC.

https://www.ti.com/product/TDA4VM (SoC)
https://www.ti.com/tool/PROCESSOR-SDK-J721E (TI SDK)
https://www.ti.com/tool/SK-TDA4VM (TDA4VM processor starter kit)
https://beagleboard.org/ai-64 (BeagleBone AI-64 SBC)

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 boot/ti-k3-boot-firmware/Config.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/boot/ti-k3-boot-firmware/Config.in b/boot/ti-k3-boot-firmware/Config.in
index 8393699998..c9a09d8b19 100644
--- a/boot/ti-k3-boot-firmware/Config.in
+++ b/boot/ti-k3-boot-firmware/Config.in
@@ -22,6 +22,9 @@ config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
 config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM65X
 	bool "am65x"
 
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
+	bool "j721e"
+
 endchoice
 
 config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC
@@ -30,12 +33,14 @@ config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC
 	default "am62x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
 	default "am64x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
 	default "am65x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM65X
+	default "j721e"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
 
 # Only devices with a split firmware boot flow requires a DM firmware (eg: am62, j721e)
 config BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM
 	string
 	default "am62axx" if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX
 	default "am62xx"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
+	default "j721e"   if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
 	default ""
 
 endif
-- 
2.43.0

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

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

* [Buildroot] [PATCH 15/21] boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (13 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 14/21] boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 11:37   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 16/21] boot/uboot: enable TI K3 Device Manager (DM) for j721e Romain Naour
                   ` (7 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

ti-k3-image-gen tool is deprecated an replaced by binman [1].

Use the newly introduced BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X}.

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

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 boot/uboot/Config.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 63359266c6..7586f24c90 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -242,10 +242,10 @@ config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE
 
 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
+	# We use the SoC selection defined for the ti-k3-boot-firmware
 	# package
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE
+	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX || BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
 	help
 	  Some TI K3 devices need the Device Manager (DM) firmware to
 	  be available for the U-Boot build.
-- 
2.43.0

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

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

* [Buildroot] [PATCH 16/21] boot/uboot: enable TI K3 Device Manager (DM) for j721e
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (14 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 15/21] boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 10:58   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 17/21] boot/ti-k3-boot-firmware: bump to version 09.02.00.004 Romain Naour
                   ` (6 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

The TI K3 Device Manager (DM) support for J721E is needed to boot
DRA829/TDA4VM SoC.

https://www.ti.com/product/TDA4VM (SoC)
https://www.ti.com/tool/PROCESSOR-SDK-J721E (TI SDK)
https://www.ti.com/tool/SK-TDA4VM (TDA4VM processor starter kit)
https://beagleboard.org/ai-64 (BeagleBone AI-64 SBC)

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 boot/uboot/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 7586f24c90..837f1605b7 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -245,7 +245,8 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 	# We use the SoC selection defined for the ti-k3-boot-firmware
 	# package
 	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE
-	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX || BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
+	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX || BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X \
+		|| BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
 	help
 	  Some TI K3 devices need the Device Manager (DM) firmware to
 	  be available for the U-Boot build.
-- 
2.43.0

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

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

* [Buildroot] [PATCH 17/21] boot/ti-k3-boot-firmware: bump to version 09.02.00.004
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (15 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 16/21] boot/uboot: enable TI K3 Device Manager (DM) for j721e Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 11:25   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig Romain Naour
                   ` (5 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Remove the comment about ti-k3-image-gen since this tool is
deprecated an replaced by binman.

ti-k3-image-gen has been removed from meta-ti [1].

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

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash | 2 +-
 boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk   | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
index 95131180ef..939bd0794a 100644
--- a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
+++ b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
@@ -1,3 +1,3 @@
 # Locally calculated
 sha256  ab20ffbe7bba7e94be246b3417d33a914b3f07c16c47ef5a7f7602349a666a61  LICENSE.ti
-sha256  6032a258ce731d987576115f5de44c677a6b0cf8bddcd61a9a2852928bdfff92  ti-linux-firmware-08.06.00.006.tar.xz
+sha256  701d400ac33b2885ec35d73f0d66e5186e3c2f71ef28679508b58ef986804d35  ti-linux-firmware-09.02.00.004.tar.xz
diff --git a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
index c7c5eb0818..fb28d8ac41 100644
--- a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
+++ b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
@@ -4,9 +4,7 @@
 #
 ################################################################################
 
-# The hash 340194800a581baf976360386dfc7b5acab8d948 defined in the
-# Makefile of ti-k3-image-gen corresponds to the tag 08.06.00.006.
-TI_K3_BOOT_FIRMWARE_VERSION = 08.06.00.006
+TI_K3_BOOT_FIRMWARE_VERSION = 09.02.00.004
 TI_K3_BOOT_FIRMWARE_SITE = https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/snapshot
 TI_K3_BOOT_FIRMWARE_SOURCE = ti-linux-firmware-$(TI_K3_BOOT_FIRMWARE_VERSION).tar.xz
 TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES = YES
-- 
2.43.0

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

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

* [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (16 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 17/21] boot/ti-k3-boot-firmware: bump to version 09.02.00.004 Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 12:06   ` Alexander Sverdlin
                     ` (2 more replies)
  2024-02-13 17:28 ` [Buildroot] [PATCH 19/21] configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman tool Romain Naour
                   ` (4 subsequent siblings)
  22 siblings, 3 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Adds support for TI's SK-TDA4VM board by introducing the
ti_j721e_sk_defconfig file and related support files.

Retrieve BSP settings from meta-ti (may be useful for other TI boards):

- Don't set BR2_TARGET_TI_K3_IMAGE_GEN since this tool is deprecated
  [1] and must be replaced by u-boot binman (upstream).
  See FOSDEM 2024 talk by TI folks about Binman and how it simplify the
  overall boot-loader build flow [2].

- Set BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD = "generic"

  meta-ti]$ git grep TFA_BOARD
  meta-ti-bsp/conf/machine/beagleplay.conf:TFA_BOARD = "lite"
  meta-ti-bsp/conf/machine/include/am62axx.inc:TFA_BOARD = "lite"
  meta-ti-bsp/conf/machine/include/am62pxx.inc:TFA_BOARD = "lite"
  meta-ti-bsp/conf/machine/include/am62xx.inc:TFA_BOARD = "lite"
  meta-ti-bsp/conf/machine/include/am64xx.inc:TFA_BOARD = "lite"
  meta-ti-bsp/conf/machine/include/am65xx.inc:TFA_BOARD = "generic"
  meta-ti-bsp/conf/machine/include/j7200.inc:TFA_BOARD = "generic"
  meta-ti-bsp/conf/machine/include/j721e.inc:TFA_BOARD = "generic"
  meta-ti-bsp/conf/machine/include/j721s2.inc:TFA_BOARD = "generic"
  meta-ti-bsp/conf/machine/include/j722s.inc:TFA_BOARD = "lite"
  meta-ti-bsp/conf/machine/include/j784s4.inc:TFA_BOARD = "j784s4"

- Set BR2_TARGET_UBOOT_NEEDS_ATF_BL31 to provide BL31 variable pointing
  to ATF bl31.bin to the U-Boot build process [3].

- Set BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE to OP-TEE as BL32
  secure payload. meta-ti set "SPD=opteed" to build ATF [4].

- Set BR2_TARGET_OPTEE_OS_PLATFORM to "k3-j721e".
  meta-ti uses the OPTEEMACHINE to set optee-os platform [5].
  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"

- Set BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME since u-boot is looking at /boot/dtb/ti
  for devicetree. (Yocto uses KERNEL_DTBDEST)
  Create a symlink to make sure /boot/dtb/ti exist.
  (We want to keep the u-boot environment provided by upstream as is).

[1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
[2] https://fosdem.org/2024/schedule/event/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/
[3] https://git.yoctoproject.org/meta-ti/commit/?id=e74b9a1746d4d04757c87c1920a0f743e55ff096
[4] https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc?h=09.02.00.004#n7
[5] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23

More information about the board can be found at:
https://www.ti.com/tool/SK-TDA4VM

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 DEVELOPERS                      |  2 ++
 board/ti/j721e-sk/genimage.cfg  | 28 ++++++++++++++++++
 board/ti/j721e-sk/post-build.sh | 16 +++++++++++
 board/ti/j721e-sk/readme.txt    | 34 ++++++++++++++++++++++
 configs/ti_j721e_sk_defconfig   | 51 +++++++++++++++++++++++++++++++++
 5 files changed, 131 insertions(+)
 create mode 100644 board/ti/j721e-sk/genimage.cfg
 create mode 100755 board/ti/j721e-sk/post-build.sh
 create mode 100644 board/ti/j721e-sk/readme.txt
 create mode 100644 configs/ti_j721e_sk_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index ff44741f9f..e5f2dd2327 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2668,8 +2668,10 @@ F:	package/vnstat/
 N:	Romain Naour <romain.naour@gmail.com>
 F:	board/qemu/
 F:	board/ti/am574x-idk/
+F:	board/ti/j721e-sk/
 F:	configs/qemu_*
 F:	configs/am574x_idk_defconfig
+F:	configs/ti_j721e_sk_defconfig
 F:	package/alure/
 F:	package/aubio/
 F:	package/binutils/
diff --git a/board/ti/j721e-sk/genimage.cfg b/board/ti/j721e-sk/genimage.cfg
new file mode 100644
index 0000000000..2a991748d5
--- /dev/null
+++ b/board/ti/j721e-sk/genimage.cfg
@@ -0,0 +1,28 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"sysfw.itb",
+			"tiboot3.bin",
+			"tispl.bin",
+			"u-boot.img",
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
diff --git a/board/ti/j721e-sk/post-build.sh b/board/ti/j721e-sk/post-build.sh
new file mode 100755
index 0000000000..01af6ca474
--- /dev/null
+++ b/board/ti/j721e-sk/post-build.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+BOARD_DIR="$(dirname $0)"
+
+# u-boot is looking at /boot/dtb/ti for devicetree in the rootfs
+# partition while Buildroot install the kernel and its devicetree
+# in /boot (BR2_LINUX_KERNEL_INSTALL_TARGET enabled).
+# Enabling BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME allows to keep the
+# "ti" subdirectory but "dts" is still missing.
+# Make sure /boot/dtb/ti exist by creating a symlink in
+# ${TARGET_DIR}/boot
+# https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc?h=09.02.00.004#n13
+# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/include/env/ti/mmc.env?ref_type=tags#L18
+if [ -L ${TARGET_DIR}/boot/dtb ]; then
+    rm ${TARGET_DIR}/boot/dtb
+    ln -sf . ${TARGET_DIR}/boot/dtb
+fi
diff --git a/board/ti/j721e-sk/readme.txt b/board/ti/j721e-sk/readme.txt
new file mode 100644
index 0000000000..bebed1b3f6
--- /dev/null
+++ b/board/ti/j721e-sk/readme.txt
@@ -0,0 +1,34 @@
+Texas Instuments SK-TDA4VM Test and Development Board
+
+Description
+===========
+
+This configuration will build a basic image for the TI SK-TDA4VM
+board: https://www.ti.com/tool/SK-TDA4VM.
+
+How to Build
+============
+
+Select the default configuration for the target:
+
+$ make ti_j721e_sk_defconfig
+
+Optional: modify the configuration:
+
+$ make menuconfig
+
+Build:
+
+$ make
+
+To copy the resultimg output image file to an SD card use dd:
+
+$ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+
+How to Run
+==========
+
+Insert the SD card into the SK-TDA4VM board, and power it up through the
+USB Type-C connector. The system should come up. You can use a
+micro-USB cable to connect to the connector labeled DEBUG CONSOLE to
+communicate with the board.
diff --git a/configs/ti_j721e_sk_defconfig b/configs/ti_j721e_sk_defconfig
new file mode 100644
index 0000000000..fc2d70d76f
--- /dev/null
+++ b/configs/ti_j721e_sk_defconfig
@@ -0,0 +1,51 @@
+BR2_aarch64=y
+BR2_cortex_a72=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/j721e-sk/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/j721e-sk/genimage.cfg"
+BR2_SYSTEM_DHCP="eth0"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.4"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-j721e-sk"
+BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.10"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="generic"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
+BR2_TARGET_OPTEE_OS=y
+BR2_TARGET_OPTEE_OS_PLATFORM="k3-j721e"
+BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E=y
+BR2_TARGET_TI_K3_R5_LOADER=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
+BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="j721e_evm_r5"
+BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="j721e_evm_a72"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_TI_K3_DM=y
+BR2_TARGET_UBOOT_USE_BINMAN=y
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
-- 
2.43.0

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

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

* [Buildroot] [PATCH 19/21] configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman tool
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (17 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 10:59   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 20/21] configs/ti_am64x_sk_defconfig: " Romain Naour
                   ` (3 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Update u-boot for a53 and r5 core to 2024.01 and enable binman support
in order to remove BR2_TARGET_TI_K3_IMAGE_GEN.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 configs/ti_am62x_sk_defconfig | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index c3ad555a81..f725734551 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -16,25 +16,29 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.10"
 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-am62x"
-BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
 BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5"
+BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN=y
 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_OPENSSL=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
 BR2_TARGET_UBOOT_NEEDS_TI_K3_DM=y
+BR2_TARGET_UBOOT_USE_BINMAN=y
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
-- 
2.43.0

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

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

* [Buildroot] [PATCH 20/21] configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman tool
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (18 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 19/21] configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman tool Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-14 11:05   ` Alexander Sverdlin
  2024-02-13 17:28 ` [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package Romain Naour
                   ` (2 subsequent siblings)
  22 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

Update u-boot for a53 and r5 core to 2024.01 and enable binman support
in order to remove BR2_TARGET_TI_K3_IMAGE_GEN.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 configs/ti_am64x_sk_defconfig | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index 097175bd8f..bcef16777e 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -16,24 +16,28 @@ BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
-BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.10"
 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-am64x"
-BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE_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="2024.01"
 BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5"
+BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN=y
 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="am64x_evm_a53"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_USE_BINMAN=y
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
-- 
2.43.0

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

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

* [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (19 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 20/21] configs/ti_am64x_sk_defconfig: " Romain Naour
@ 2024-02-13 17:28 ` Romain Naour
  2024-02-13 19:05   ` Alexander Sverdlin
                     ` (2 more replies)
  2024-02-15 10:13 ` [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Alexander Sverdlin
  2024-02-16 20:19 ` Andreas Dannenberg via buildroot
  22 siblings, 3 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 17:28 UTC (permalink / raw)
  To: buildroot; +Cc: Xuanhao Shi, Romain Naour, Anand Gadiyar

ti-k3-image-gen tool is deprecated an replaced by binman [1].

All defconfig that was using it have been updated to use U-boot
binman tool instead.

So, we can safely remove ti-k3-image-gen package.

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

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Xuanhao Shi <X15000177@gmail.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 Config.in.legacy                          |  7 ++
 DEVELOPERS                                |  2 -
 boot/Config.in                            |  1 -
 boot/ti-k3-image-gen/Config.in            | 81 -----------------------
 boot/ti-k3-image-gen/ti-k3-image-gen.hash |  3 -
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 54 ---------------
 6 files changed, 7 insertions(+), 141 deletions(-)
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk

diff --git a/Config.in.legacy b/Config.in.legacy
index a869279af7..2b59a65f1c 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2024.02"
 
+config BR2_TARGET_TI_K3_IMAGE_GEN
+	bool "ti-k3-image-gen removed"
+	select BR2_LEGACY
+	help
+	  ti-k3-image-gen tool  has been removed and replaced by
+	  U-Boot binman tool (requires U-boot >= 2024.01).
+
 config BR2_PACKAGE_TINYMEMBENCH
 	bool "tinymembench removed"
 	select BR2_LEGACY
diff --git a/DEVELOPERS b/DEVELOPERS
index e5f2dd2327..df6c60704c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -151,7 +151,6 @@ N:	Anand Gadiyar <gadiyar@ti.com>
 F:	board/ti/am62x-sk/
 F:	board/ti/am64x-sk/
 F:	boot/ti-k3-boot-firmware/
-F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
 F:	configs/ti_am62x_sk_defconfig
 F:	configs/ti_am64x_sk_defconfig
@@ -3219,7 +3218,6 @@ N:	Xuanhao Shi <X15000177@gmail.com>
 F:	board/ti/am62x-sk/
 F:	board/ti/am64x-sk/
 F:	boot/ti-k3-boot-firmware/
-F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
 F:	configs/ti_am62x_sk_defconfig
 F:	configs/ti_am64x_sk_defconfig
diff --git a/boot/Config.in b/boot/Config.in
index e5fdf7ad43..87e1b7c00e 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -20,7 +20,6 @@ source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
 source "boot/ti-k3-boot-firmware/Config.in"
-source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in
deleted file mode 100644
index e54f5ec992..0000000000
--- a/boot/ti-k3-image-gen/Config.in
+++ /dev/null
@@ -1,81 +0,0 @@
-config BR2_TARGET_TI_K3_IMAGE_GEN
-	bool "ti-k3-image-gen"
-	depends on BR2_TARGET_TI_K3_R5_LOADER
-	select BR2_TARGET_TI_K3_BOOT_FIRMWARE
-	# We need FIT support in uboot-tools, which is why we select a
-	# host package
-	select BR2_PACKAGE_HOST_UBOOT_TOOLS
-	select BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT
-	help
-	  Use TI's k3-image-gen to build a separate bare metal boot
-	  binary from a separate SPL that is running on the R5 core.
-
-	  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"
-	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	bool "am62x"
-	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	bool "am64x"
-	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-	bool "am65x"
-	select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_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
-
-endif
diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.hash b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
deleted file mode 100644
index c968c5648f..0000000000
--- a/boot/ti-k3-image-gen/ti-k3-image-gen.hash
+++ /dev/null
@@ -1,3 +0,0 @@
-# Locally calculated
-sha256  f89ea4b1f5c992455b1a682fde48359221b53f3294135df4bf20feea6aea90e4  k3-image-gen-08.06.00.007.tar.gz
-sha256  f012e8d000d711d0539e5b4c812fc1d3a59c10fc1e3d6ea155556f5b78286845  LICENSE
diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
deleted file mode 100644
index 64be9a18f2..0000000000
--- a/boot/ti-k3-image-gen/ti-k3-image-gen.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-################################################################################
-#
-# ti-k3-image-gen
-#
-################################################################################
-
-TI_K3_IMAGE_GEN_VERSION = 08.06.00.007
-TI_K3_IMAGE_GEN_SITE = https://git.ti.com/cgit/k3-image-gen/k3-image-gen/snapshot
-TI_K3_IMAGE_GEN_SOURCE = k3-image-gen-$(TI_K3_IMAGE_GEN_VERSION).tar.gz
-TI_K3_IMAGE_GEN_LICENSE = BSD-3-Clause
-TI_K3_IMAGE_GEN_LICENSE_FILES = LICENSE
-TI_K3_IMAGE_GEN_INSTALL_IMAGES = YES
-
-# - ti-k3-image-gen is used to build tiboot3.bin, using the
-#   r5-u-boot-spl.bin file from the ti-k3-r5-loader package. Hence the
-#   dependency on ti-k3-r5-loader.
-# - the ti-k3-image-gen makefiles seem to need some feature from Make
-#   v4.0, similar to u-boot.
-TI_K3_IMAGE_GEN_DEPENDENCIES = \
-	host-arm-gnu-toolchain \
-	host-python3 \
-	host-openssl \
-	host-uboot-tools \
-	ti-k3-r5-loader \
-	ti-k3-boot-firmware \
-	$(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_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
-
-define TI_K3_IMAGE_GEN_CONFIGURE_CMDS
-	cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
-endef
-
-define TI_K3_IMAGE_GEN_BUILD_CMDS
-	$(TARGET_MAKE_ENV) \
-	$(BR2_MAKE) -C $(@D) \
-		SOC=$(TI_K3_IMAGE_GEN_SOC) \
-		SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
-		CONFIG=evm \
-		CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
-		SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
-		O=$(@D)/tmp \
-		BIN_DIR=$(@D)
-endef
-
-define TI_K3_IMAGE_GEN_INSTALL_IMAGES_CMDS
-	cp $(@D)/tiboot3.bin $(BINARIES_DIR)
-endef
-
-$(eval $(generic-package))
-- 
2.43.0

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

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

* Re: [Buildroot] [PATCH 02/21] configs/ti_am62x_sk_defconfig: fix optee-os plateform
  2024-02-13 17:27 ` [Buildroot] [PATCH 02/21] configs/ti_am62x_sk_defconfig: fix optee-os plateform Romain Naour
@ 2024-02-13 18:45   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-13 18:45 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
> According to meta-ti, the optee-os plateform must be
> "k3-am62x" not "k3".
> 
>   meta-ti uses the OPTEEMACHINE to set optee-os platform [1].
>   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"
> 
> [1] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

indeed,
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
> On SK-TDA4VM, such error leads to a runtime boot crash.
> ---
>  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 f88252a89c..c3ad555a81 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

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 03/21] configs/ti_am64x_sk_defconfig: fix optee-os plateform
  2024-02-13 17:27 ` [Buildroot] [PATCH 03/21] configs/ti_am64x_sk_defconfig: " Romain Naour
@ 2024-02-13 18:56   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-13 18:56 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
> According to meta-ti, the optee-os plateform must be
> "k3-am64x" not "k3".
> 
>   meta-ti uses the OPTEEMACHINE to set optee-os platform [1].
>   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"
> 
> [1] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
> On SK-TDA4VM, such error leads to a runtime boot crash.
> ---
>  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 4bfd31f0c8..097175bd8f 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

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-13 17:28 ` [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package Romain Naour
@ 2024-02-13 19:05   ` Alexander Sverdlin
  2024-02-13 21:35     ` Romain Naour
  2024-02-14 10:58   ` Alexander Sverdlin
  2024-02-15 10:20   ` Alexander Sverdlin
  2 siblings, 1 reply; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-13 19:05 UTC (permalink / raw)
  To: Romain Naour, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> ti-k3-image-gen tool is deprecated an replaced by binman [1].
> 
> All defconfig that was using it have been updated to use U-boot
> binman tool instead.
> 
> So, we can safely remove ti-k3-image-gen package.
> 
> [1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
> 
> Cc: Anand Gadiyar <gadiyar@ti.com>
> Cc: Xuanhao Shi <X15000177@gmail.com>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
>  Config.in.legacy                          |  7 ++
>  DEVELOPERS                                |  2 -
>  boot/Config.in                            |  1 -
>  boot/ti-k3-image-gen/Config.in            | 81 -----------------------
>  boot/ti-k3-image-gen/ti-k3-image-gen.hash |  3 -
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 54 ---------------
>  6 files changed, 7 insertions(+), 141 deletions(-)
>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> 
> diff --git a/Config.in.legacy b/Config.in.legacy
> index a869279af7..2b59a65f1c 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -146,6 +146,13 @@ endif
>  
>  comment "Legacy options removed in 2024.02"
>  
> +config BR2_TARGET_TI_K3_IMAGE_GEN
> +	bool "ti-k3-image-gen removed"
> +	select BR2_LEGACY
> +	help
> +	  ti-k3-image-gen tool  has been removed and replaced by
> +	  U-Boot binman tool (requires U-boot >= 2024.01).

Is commit 6d6228ab8fe5 "am62a: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img"
in U-Boot repo not what is actually required (since v2023.10)?
At least that's the version which works for me.

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 14/21] boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
  2024-02-13 17:28 ` [Buildroot] [PATCH 14/21] boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E Romain Naour
@ 2024-02-13 20:23   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-13 20:23 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> The k3 J721E support is needed to build for DRA829/TDA4VM SoC.
> 
> https://www.ti.com/product/TDA4VM (SoC)
> https://www.ti.com/tool/PROCESSOR-SDK-J721E (TI SDK)
> https://www.ti.com/tool/SK-TDA4VM (TDA4VM processor starter kit)
> https://beagleboard.org/ai-64 (BeagleBone AI-64 SBC)
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  boot/ti-k3-boot-firmware/Config.in | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/boot/ti-k3-boot-firmware/Config.in b/boot/ti-k3-boot-firmware/Config.in
> index 8393699998..c9a09d8b19 100644
> --- a/boot/ti-k3-boot-firmware/Config.in
> +++ b/boot/ti-k3-boot-firmware/Config.in
> @@ -22,6 +22,9 @@ config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
>  config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM65X
>  	bool "am65x"
>  
> +config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
> +	bool "j721e"
> +
>  endchoice
>  
>  config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC
> @@ -30,12 +33,14 @@ config BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC
>  	default "am62x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
>  	default "am64x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM64X
>  	default "am65x"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM65X
> +	default "j721e"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>  
>  # Only devices with a split firmware boot flow requires a DM firmware (eg: am62, j721e)
>  config BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM
>  	string
>  	default "am62axx" if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX
>  	default "am62xx"  if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
> +	default "j721e"   if BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>  	default ""
>  
>  endif

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-13 19:05   ` Alexander Sverdlin
@ 2024-02-13 21:35     ` Romain Naour
  0 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-13 21:35 UTC (permalink / raw)
  To: Alexander Sverdlin, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Alexander,

Le 13/02/2024 à 20:05, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
>> ti-k3-image-gen tool is deprecated an replaced by binman [1].
>>
>> All defconfig that was using it have been updated to use U-boot
>> binman tool instead.
>>
>> So, we can safely remove ti-k3-image-gen package.
>>
>> [1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
>>
>> Cc: Anand Gadiyar <gadiyar@ti.com>
>> Cc: Xuanhao Shi <X15000177@gmail.com>
>> Signed-off-by: Romain Naour <romain.naour@smile.fr>
>> ---
>>  Config.in.legacy                          |  7 ++
>>  DEVELOPERS                                |  2 -
>>  boot/Config.in                            |  1 -
>>  boot/ti-k3-image-gen/Config.in            | 81 -----------------------
>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash |  3 -
>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 54 ---------------
>>  6 files changed, 7 insertions(+), 141 deletions(-)
>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>>
>> diff --git a/Config.in.legacy b/Config.in.legacy
>> index a869279af7..2b59a65f1c 100644
>> --- a/Config.in.legacy
>> +++ b/Config.in.legacy
>> @@ -146,6 +146,13 @@ endif
>>  
>>  comment "Legacy options removed in 2024.02"
>>  
>> +config BR2_TARGET_TI_K3_IMAGE_GEN
>> +	bool "ti-k3-image-gen removed"
>> +	select BR2_LEGACY
>> +	help
>> +	  ti-k3-image-gen tool  has been removed and replaced by
>> +	  U-Boot binman tool (requires U-boot >= 2024.01).
> 
> Is commit 6d6228ab8fe5 "am62a: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img"
> in U-Boot repo not what is actually required (since v2023.10)?
> At least that's the version which works for me.
> 

Thank you for the info, indeed v2023.10 should be good-enough.

I was looking at meta-ti history [1] and I thought that v2024.01 was the minimum
u-boot release for complete binman support for all TI K3 SoC variant.

I'll fix!

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

Best regards,
Romain

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

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

* Re: [Buildroot] [PATCH 09/21] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
  2024-02-13 17:28 ` [Buildroot] [PATCH 09/21] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Romain Naour
@ 2024-02-14 10:58   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 10:58 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> 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 tool uses additional host python modules that must be provided by
> Buildroot. So introduce a new option BR2_TARGET_UBOOT_USE_BINMAN to
> add additional host packages in U-Boot build dependency to use binman.
> 
> The binman requirement is directly included in buildman dependency
> (tools/buildman/requirements.txt) since within U-Boot, binman is
> invoked by the build system, here buildman [1].
> 
> [1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
> Note:
>   binman is bundled in U-Boot source code. Use "USE_BINMAN" instead of
>   "NEEDS_BINMAN" since it's not an external U-Boot dependency.
> ---
>  boot/uboot/Config.in | 11 +++++++++++
>  boot/uboot/uboot.mk  |  8 ++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index beafb38930..e6e7956adc 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -290,6 +290,17 @@ config BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN
>  	  This option makes sure that the needed binary blobs are copied
>  	  into the U-Boot source directory.
>  
> +config BR2_TARGET_UBOOT_USE_BINMAN
> +	bool "U-Boot use binman"
> +	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema
> +	select BR2_TARGET_UBOOT_NEEDS_PYTHON3
> +	select BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS
> +	select BR2_TARGET_UBOOT_NEEDS_PYLIBFDT
> +	help
> +	  Use binman tool for generation and signing of boot images.
> +
> +	  https://docs.u-boot.org/en/v2024.01/develop/package/binman.html
> +
>  menu "U-Boot binary format"
>  
>  config BR2_TARGET_UBOOT_FORMAT_AIS
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index dda606a880..0714522550 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -269,6 +269,14 @@ ifeq ($(BR2_TARGET_UBOOT_NEEDS_XXD),y)
>  UBOOT_DEPENDENCIES += host-vim
>  endif
>  
> +ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),y)
> +# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt
> +UBOOT_DEPENDENCIES += \
> +	host-python-jsonschema \
> +	host-python-pyyaml
> +UBOOT_MAKE_OPTS += BINMAN_INDIRS=$(BINARIES_DIR)
> +endif
> +
>  # prior to u-boot 2013.10 the license info was in COPYING. Copy it so
>  # legal-info finds it
>  define UBOOT_COPY_OLD_LICENSE_FILE

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 10/21] boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
  2024-02-13 17:28 ` [Buildroot] [PATCH 10/21] boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option Romain Naour
@ 2024-02-14 10:58   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 10:58 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> 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.
> 
> As for U-boot package, this tool uses additional host python modules
> that must be provided by Buildroot. So introduce a new option
> BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN to add additional host packages
> in U-Boot build dependency to use binman.
> 
> The binman requirement is directly included in buildman dependency
> (tools/buildman/requirements.txt) since within U-Boot, binman is
> invoked by the build system, here buildman [1].
> 
> Make sure that all binman requirements are build before
> ti-k3-r5-loader.
> 
> [1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
> Note:
>   binman is bundled in U-Boot source code. Use "USE_BINMAN" instead of
>   "NEEDS_BINMAN" since it's not an external U-Boot dependency.
> ---
>  boot/ti-k3-r5-loader/Config.in          |  8 ++++++++
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 14 ++++++++++++++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
> index 8c8368a1a5..d678bd17c2 100644
> --- a/boot/ti-k3-r5-loader/Config.in
> +++ b/boot/ti-k3-r5-loader/Config.in
> @@ -93,4 +93,12 @@ config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE
>  	help
>  	  Path to the TI K3 R5 Loader configuration file.
>  
> +config BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN
> +	bool "ti-k3-r5-loader use binman"
> +	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema
> +	help
> +	  Use binman tool for generation and signing of boot images.
> +
> +	  https://docs.u-boot.org/en/v2024.01/develop/package/binman.html
> +
>  endif
> 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 0ffcb8235f..8f86e0fb07 100644
> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -60,6 +60,20 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
>  	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
>  	HOSTLDFLAGS="$(HOST_LDFLAGS)"
>  
> +ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN),y)
> +# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt
> +TI_K3_R5_LOADER_DEPENDENCIES += \
> +	host-python-jsonschema \
> +	host-python-pyyaml
> +# Make sure that all binman requirements are build before ti-k3-r5-loader.
> +TI_K3_R5_LOADER_DEPENDENCIES += \
> +	host-python3 \
> +	host-python-setuptools \
> +	host-python-pylibfdt \
> +	host-python-pyelftools
> +TI_K3_R5_LOADER_MAKE_OPTS += BINMAN_INDIRS=$(BINARIES_DIR)
> +endif
> +
>  define TI_K3_R5_LOADER_BUILD_CMDS
>  	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
>  endef

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 11/21] boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to BINARIES_DIR
  2024-02-13 17:28 ` [Buildroot] [PATCH 11/21] boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to BINARIES_DIR Romain Naour
@ 2024-02-14 10:58   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 10:58 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> U-boot for k3 r5 core (ti-k3-r5-loader) can install different target
> image (tiboot3*.bin) depending on the k3 SoC variant using different
> boot flow [1]:
> 
> - Split binary with a combined firmware: (eg: AM65)
> - Combined binary with a combined firmware: (eg: AM64)
> - Split binary with a split firmware: (eg: J721E)
> - Combined binary with a split firmware: (eg: AM62)
> 
> K3 SoC using Split Binary Boot Flow also requires sysfw-*.itb file
> to boot (eg: am65, j721e). Only tiboot3*.bin is needed for other
> boot flow.
> 
> From [1]:
> "It's important to rename the generated tiboot3.bin and sysfw.itb
> to match exactly tiboot3.bin and sysfw.itb as ROM and the wakeup
> UBoot SPL will only look for and load the files with these names."
> 
> So boards using HS (High Secure) K3 SoC variant must update the
> tiboot3.bin (and sysfw.itb) in their post-build script.
> 
> ti-k3-r5-loader must install any tiboot3*.bin (and sysfw*.itb)
> to BINARIES_DIR let the user which one should be used in a
> post-build script.
> 
> See the list of all tiboot3*.bin and sysfw*.itb file variant found in meta-ti:


[]

> [1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/doc/board/ti/k3.rst
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 9 +++++++++
>  1 file changed, 9 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 8f86e0fb07..b3c756dc47 100644
> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -78,8 +78,17 @@ define TI_K3_R5_LOADER_BUILD_CMDS
>  	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
>  endef
>  
> +# sysfw*.itb are only generated for Split binary based Boot Flow (eg: am65, j721e)
>  define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
>  	cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> +	for f in $(@D)/tiboot3*.bin ; do \
> +		$(INSTALL) -D -m 0644 $$f $(BINARIES_DIR)/`basename $$f` || exit 1; \
> +	done
> +	for f in $(@D)/sysfw*.itb ; do \
> +		if test -e $$f ; then \
> +			$(INSTALL) -D -m 0644 $$f $(BINARIES_DIR)/`basename $$f` || exit 1; \
> +		fi ; \
> +	done
>  endef
>  
>  $(eval $(kconfig-package))

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 16/21] boot/uboot: enable TI K3 Device Manager (DM) for j721e
  2024-02-13 17:28 ` [Buildroot] [PATCH 16/21] boot/uboot: enable TI K3 Device Manager (DM) for j721e Romain Naour
@ 2024-02-14 10:58   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 10:58 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> The TI K3 Device Manager (DM) support for J721E is needed to boot
> DRA829/TDA4VM SoC.
> 
> https://www.ti.com/product/TDA4VM (SoC)
> https://www.ti.com/tool/PROCESSOR-SDK-J721E (TI SDK)
> https://www.ti.com/tool/SK-TDA4VM (TDA4VM processor starter kit)
> https://beagleboard.org/ai-64 (BeagleBone AI-64 SBC)
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  boot/uboot/Config.in | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index 7586f24c90..837f1605b7 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -245,7 +245,8 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
>  	# We use the SoC selection defined for the ti-k3-boot-firmware
>  	# package
>  	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE
> -	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX || BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
> +	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX || BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X \
> +		|| BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>  	help
>  	  Some TI K3 devices need the Device Manager (DM) firmware to
>  	  be available for the U-Boot build.

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-13 17:28 ` [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package Romain Naour
  2024-02-13 19:05   ` Alexander Sverdlin
@ 2024-02-14 10:58   ` Alexander Sverdlin
  2024-02-15 10:20   ` Alexander Sverdlin
  2 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 10:58 UTC (permalink / raw)
  To: Romain Naour, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> ti-k3-image-gen tool is deprecated an replaced by binman [1].
> 
> All defconfig that was using it have been updated to use U-boot
> binman tool instead.
> 
> So, we can safely remove ti-k3-image-gen package.
> 
> [1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
> 
> Cc: Anand Gadiyar <gadiyar@ti.com>
> Cc: Xuanhao Shi <X15000177@gmail.com>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  Config.in.legacy                          |  7 ++
>  DEVELOPERS                                |  2 -
>  boot/Config.in                            |  1 -
>  boot/ti-k3-image-gen/Config.in            | 81 -----------------------
>  boot/ti-k3-image-gen/ti-k3-image-gen.hash |  3 -
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 54 ---------------
>  6 files changed, 7 insertions(+), 141 deletions(-)
>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 19/21] configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman tool
  2024-02-13 17:28 ` [Buildroot] [PATCH 19/21] configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman tool Romain Naour
@ 2024-02-14 10:59   ` Alexander Sverdlin
  2024-02-14 15:24     ` Romain Naour
  0 siblings, 1 reply; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 10:59 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> Update u-boot for a53 and r5 core to 2024.01 and enable binman support
> in order to remove BR2_TARGET_TI_K3_IMAGE_GEN.
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Looks good to me in principle, so
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

But maybe you could add a word into commit message about updated ATF
if you'll re-spin.

> ---
>  configs/ti_am62x_sk_defconfig | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
> index c3ad555a81..f725734551 100644
> --- a/configs/ti_am62x_sk_defconfig
> +++ b/configs/ti_am62x_sk_defconfig
> @@ -16,25 +16,29 @@ BR2_TARGET_ROOTFS_EXT2_4=y
>  BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
> -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.10"
>  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-am62x"
> -BR2_TARGET_TI_K3_IMAGE_GEN=y
> -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
> +BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
> +BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X=y
>  BR2_TARGET_TI_K3_R5_LOADER=y
> +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
> +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
>  BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5"
> +BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN=y
>  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_OPENSSL=y
>  BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
>  BR2_TARGET_UBOOT_NEEDS_TI_K3_DM=y
> +BR2_TARGET_UBOOT_USE_BINMAN=y
>  # BR2_TARGET_UBOOT_FORMAT_BIN is not set
>  BR2_TARGET_UBOOT_FORMAT_IMG=y
>  BR2_TARGET_UBOOT_SPL=y

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 20/21] configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman tool
  2024-02-13 17:28 ` [Buildroot] [PATCH 20/21] configs/ti_am64x_sk_defconfig: " Romain Naour
@ 2024-02-14 11:05   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 11:05 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

looks good to me, maybe ATF update is worth a word in the commit message
in case you'll re-spin.

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> Update u-boot for a53 and r5 core to 2024.01 and enable binman support
> in order to remove BR2_TARGET_TI_K3_IMAGE_GEN.
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  configs/ti_am64x_sk_defconfig | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
> index 097175bd8f..bcef16777e 100644
> --- a/configs/ti_am64x_sk_defconfig
> +++ b/configs/ti_am64x_sk_defconfig
> @@ -16,24 +16,28 @@ BR2_TARGET_ROOTFS_EXT2_4=y
>  BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
> -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.10"
>  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-am64x"
> -BR2_TARGET_TI_K3_IMAGE_GEN=y
> -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
> +BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
> +BR2_TARGET_TI_K3_BOOT_FIRMWARE_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="2024.01"
>  BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5"
> +BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN=y
>  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="am64x_evm_a53"
>  BR2_TARGET_UBOOT_NEEDS_DTC=y
>  BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
>  BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
> +BR2_TARGET_UBOOT_USE_BINMAN=y
>  # BR2_TARGET_UBOOT_FORMAT_BIN is not set
>  BR2_TARGET_UBOOT_FORMAT_IMG=y
>  BR2_TARGET_UBOOT_SPL=y

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 12/21] boot/ti-k3-boot-firmware: introduce BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX, AM62X, AM64X, AM65X}
  2024-02-13 17:28 ` [Buildroot] [PATCH 12/21] boot/ti-k3-boot-firmware: introduce BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX, AM62X, AM64X, AM65X} Romain Naour
@ 2024-02-14 11:20   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 11:20 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> ti-k3-image-gen tool is deprecated an replaced by binman [1].
> 
> But BR2_TARGET_TI_K3_IMAGE_GEN_SOC_{AM62AX,AM62X} is used by u-boot
> package to select which Device Manager (DM) firmware to use for the
> U-Boot build.
> 
> In order to remove ti-k3-image-gen package, introduce
> BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X} to
> replace BR2_TARGET_TI_K3_IMAGE_GEN_SOC_{AM62AX,AM62X,AM64X,AM65X}.
> 
> In order to avoid breaking existing defconfig still using
> ti-k3-image-gen tool (ti_am62x_sk_defconfig, ti_am64x_sk_defconfig)
> select BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC symbol from ti-k3-image-gen
> package.
> 
> While at it, only install required firmware to BINARIES_DIR based
> on the selected TI K3 SoC variant.
> 
> This requires two intall step:
>   - ti-sysfw installation based on the SoC variant.
>   - ti-dm installation only for SoC using split firmware boot flow
>     (eg: am62, j721e)
> 
> [1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  boot/ti-k3-boot-firmware/Config.in            | 34 +++++++++++++++++++
>  .../ti-k3-boot-firmware.mk                    | 12 +++++--
>  boot/ti-k3-image-gen/Config.in                |  4 +++
>  3 files changed, 48 insertions(+), 2 deletions(-)

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 17/21] boot/ti-k3-boot-firmware: bump to version 09.02.00.004
  2024-02-13 17:28 ` [Buildroot] [PATCH 17/21] boot/ti-k3-boot-firmware: bump to version 09.02.00.004 Romain Naour
@ 2024-02-14 11:25   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 11:25 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> Remove the comment about ti-k3-image-gen since this tool is
> deprecated an replaced by binman.
> 
> ti-k3-image-gen has been removed from meta-ti [1].
> 
> [1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash | 2 +-
>  boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk   | 4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
> index 95131180ef..939bd0794a 100644
> --- a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
> +++ b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.hash
> @@ -1,3 +1,3 @@
>  # Locally calculated
>  sha256  ab20ffbe7bba7e94be246b3417d33a914b3f07c16c47ef5a7f7602349a666a61  LICENSE.ti
> -sha256  6032a258ce731d987576115f5de44c677a6b0cf8bddcd61a9a2852928bdfff92  ti-linux-firmware-08.06.00.006.tar.xz
> +sha256  701d400ac33b2885ec35d73f0d66e5186e3c2f71ef28679508b58ef986804d35  ti-linux-firmware-09.02.00.004.tar.xz
> diff --git a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
> index c7c5eb0818..fb28d8ac41 100644
> --- a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
> +++ b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
> @@ -4,9 +4,7 @@
>  #
>  ################################################################################
>  
> -# The hash 340194800a581baf976360386dfc7b5acab8d948 defined in the
> -# Makefile of ti-k3-image-gen corresponds to the tag 08.06.00.006.
> -TI_K3_BOOT_FIRMWARE_VERSION = 08.06.00.006
> +TI_K3_BOOT_FIRMWARE_VERSION = 09.02.00.004
>  TI_K3_BOOT_FIRMWARE_SITE = https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/snapshot
>  TI_K3_BOOT_FIRMWARE_SOURCE = ti-linux-firmware-$(TI_K3_BOOT_FIRMWARE_VERSION).tar.xz
>  TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES = YES

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 13/21] boot/uboot: use DM firmware name defined by ti-k3-boot-firmware package
  2024-02-13 17:28 ` [Buildroot] [PATCH 13/21] boot/uboot: use DM firmware name defined by ti-k3-boot-firmware package Romain Naour
@ 2024-02-14 11:29   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 11:29 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> The DM firmware name is now defined by ti-k3-boot-frimware package by
> BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM, so BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME
> can be removed to avoid duplication in Kconfig.
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  boot/uboot/Config.in | 9 ---------
>  boot/uboot/uboot.mk  | 2 +-
>  2 files changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index e6e7956adc..63359266c6 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -250,15 +250,6 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
>  	  Some TI K3 devices need the Device Manager (DM) firmware to
>  	  be available for the U-Boot build.
>  
> -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
> -
> -endif
> -
>  config BR2_TARGET_UBOOT_NEEDS_OPENSBI
>  	bool "U-Boot needs OpenSBI"
>  	depends on BR2_TARGET_OPENSBI
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index 0714522550..aa2ca99bdd 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -187,7 +187,7 @@ UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
>  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 = $(call qstrip,$(BR2_TARGET_TI_K3_BOOT_FIRMWARE_DM))
>  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
>  endif

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 15/21] boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
  2024-02-13 17:28 ` [Buildroot] [PATCH 15/21] boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options Romain Naour
@ 2024-02-14 11:37   ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 11:37 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> ti-k3-image-gen tool is deprecated an replaced by binman [1].
> 
> Use the newly introduced BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X}.
> 
> [1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  boot/uboot/Config.in | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index 63359266c6..7586f24c90 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -242,10 +242,10 @@ config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE
>  
>  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
> +	# We use the SoC selection defined for the ti-k3-boot-firmware
>  	# package
> -	depends on BR2_TARGET_TI_K3_IMAGE_GEN
> -	depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
> +	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE
> +	depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62AX || BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X
>  	help
>  	  Some TI K3 devices need the Device Manager (DM) firmware to
>  	  be available for the U-Boot build.

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig
  2024-02-13 17:28 ` [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig Romain Naour
@ 2024-02-14 12:06   ` Alexander Sverdlin
  2024-02-16  1:19   ` Alexander Sverdlin
  2024-02-16  1:44   ` Alexander Sverdlin
  2 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-14 12:06 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> Adds support for TI's SK-TDA4VM board by introducing the
> ti_j721e_sk_defconfig file and related support files.
> 
> Retrieve BSP settings from meta-ti (may be useful for other TI boards):
> 
> - Don't set BR2_TARGET_TI_K3_IMAGE_GEN since this tool is deprecated
>   [1] and must be replaced by u-boot binman (upstream).
>   See FOSDEM 2024 talk by TI folks about Binman and how it simplify the
>   overall boot-loader build flow [2].
> 
> - Set BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD = "generic"
> 
>   meta-ti]$ git grep TFA_BOARD
>   meta-ti-bsp/conf/machine/beagleplay.conf:TFA_BOARD = "lite"
>   meta-ti-bsp/conf/machine/include/am62axx.inc:TFA_BOARD = "lite"
>   meta-ti-bsp/conf/machine/include/am62pxx.inc:TFA_BOARD = "lite"
>   meta-ti-bsp/conf/machine/include/am62xx.inc:TFA_BOARD = "lite"
>   meta-ti-bsp/conf/machine/include/am64xx.inc:TFA_BOARD = "lite"
>   meta-ti-bsp/conf/machine/include/am65xx.inc:TFA_BOARD = "generic"
>   meta-ti-bsp/conf/machine/include/j7200.inc:TFA_BOARD = "generic"
>   meta-ti-bsp/conf/machine/include/j721e.inc:TFA_BOARD = "generic"
>   meta-ti-bsp/conf/machine/include/j721s2.inc:TFA_BOARD = "generic"
>   meta-ti-bsp/conf/machine/include/j722s.inc:TFA_BOARD = "lite"
>   meta-ti-bsp/conf/machine/include/j784s4.inc:TFA_BOARD = "j784s4"
> 
> - Set BR2_TARGET_UBOOT_NEEDS_ATF_BL31 to provide BL31 variable pointing
>   to ATF bl31.bin to the U-Boot build process [3].
> 
> - Set BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE to OP-TEE as BL32
>   secure payload. meta-ti set "SPD=opteed" to build ATF [4].
> 
> - Set BR2_TARGET_OPTEE_OS_PLATFORM to "k3-j721e".
>   meta-ti uses the OPTEEMACHINE to set optee-os platform [5].
>   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"
> 
> - Set BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME since u-boot is looking at /boot/dtb/ti
>   for devicetree. (Yocto uses KERNEL_DTBDEST)
>   Create a symlink to make sure /boot/dtb/ti exist.
>   (We want to keep the u-boot environment provided by upstream as is).
> 
> [1] https://git.yoctoproject.org/meta-ti/commit/?id=835811cf8586926cf78a961d090f4e6150432235
> [2] https://fosdem.org/2024/schedule/event/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/
> [3] https://git.yoctoproject.org/meta-ti/commit/?id=e74b9a1746d4d04757c87c1920a0f743e55ff096
> [4] https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc?h=09.02.00.004#n7
> [5] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23
> 
> More information about the board can be found at:
> https://www.ti.com/tool/SK-TDA4VM
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

looks good to me,

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  DEVELOPERS                      |  2 ++
>  board/ti/j721e-sk/genimage.cfg  | 28 ++++++++++++++++++
>  board/ti/j721e-sk/post-build.sh | 16 +++++++++++
>  board/ti/j721e-sk/readme.txt    | 34 ++++++++++++++++++++++
>  configs/ti_j721e_sk_defconfig   | 51 +++++++++++++++++++++++++++++++++
>  5 files changed, 131 insertions(+)
>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>  create mode 100755 board/ti/j721e-sk/post-build.sh
>  create mode 100644 board/ti/j721e-sk/readme.txt
>  create mode 100644 configs/ti_j721e_sk_defconfig
> 

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 19/21] configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman tool
  2024-02-14 10:59   ` Alexander Sverdlin
@ 2024-02-14 15:24     ` Romain Naour
  0 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-14 15:24 UTC (permalink / raw)
  To: Alexander Sverdlin, buildroot

Hi Alexander,

Le 14/02/2024 à 11:59, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
>> Update u-boot for a53 and r5 core to 2024.01 and enable binman support
>> in order to remove BR2_TARGET_TI_K3_IMAGE_GEN.
>>
>> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> 
> Looks good to me in principle, so
> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> 
> But maybe you could add a word into commit message about updated ATF
> if you'll re-spin.

Ok.

I'll wait before re-spin if someone can do a runtime test.

Thanks for the review!

Best regards,
Romain


> 
>> ---
>>  configs/ti_am62x_sk_defconfig | 12 ++++++++----
>>  1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
>> index c3ad555a81..f725734551 100644
>> --- a/configs/ti_am62x_sk_defconfig
>> +++ b/configs/ti_am62x_sk_defconfig
>> @@ -16,25 +16,29 @@ BR2_TARGET_ROOTFS_EXT2_4=y
>>  BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
>>  BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
>>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
>> -BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
>> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.10"
>>  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-am62x"
>> -BR2_TARGET_TI_K3_IMAGE_GEN=y
>> -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
>> +BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
>> +BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_AM62X=y
>>  BR2_TARGET_TI_K3_R5_LOADER=y
>> +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
>> +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
>>  BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5"
>> +BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN=y
>>  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_OPENSSL=y
>>  BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
>>  BR2_TARGET_UBOOT_NEEDS_TI_K3_DM=y
>> +BR2_TARGET_UBOOT_USE_BINMAN=y
>>  # BR2_TARGET_UBOOT_FORMAT_BIN is not set
>>  BR2_TARGET_UBOOT_FORMAT_IMG=y
>>  BR2_TARGET_UBOOT_SPL=y
> 

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

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (20 preceding siblings ...)
  2024-02-13 17:28 ` [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package Romain Naour
@ 2024-02-15 10:13 ` Alexander Sverdlin
  2024-02-15 11:23   ` Romain Naour
  2024-02-16 20:19 ` Andreas Dannenberg via buildroot
  22 siblings, 1 reply; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-15 10:13 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
> > This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> > 
> > This series start by adding U-boot binman support already submitted in the
> > preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> > [1], with small improvements.
> > See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > 
> > With binman support, we can add the TI K3 j721e SoC support by
> > providing all required firmware generated by the build.
> > 
> > Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> > boot the board (serial debug and ethernet working).
> > 
> > Thanks to binman support, we can remove the ti-k3-image-gen tool from
> > Buildroot. To do that, we have to update existing defconfig (am62, am64).
> > 
> > Followup commits can improve TI K3 HS-FS devices based on binman instead
> > of legacy core-secdev-k3 tool.
> > 
> > [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> > [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> > 
> > Best regards,
> > Romain

I have mixed feelings after testing the patchset on SK-AM62B...
It doesn't quite boot, refer to the boot log [1].
Seems that U-Boot env is missing, maybe I'm missing some installation
step, but I do not see it mentioned in the documetation (for instance
of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").

I'm not sure if this is a result of U-Boot update or if the current
master is broken as well. I'll be retesting it today and will get back to
you.

Fortunately this patchset is actually about building the images differently
and this part actually went smoothly, which is good.

> > Dario Binacchi (5):
> >   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
> > 
> > Romain Naour (16):
> >   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
> >   configs/ti_am62x_sk_defconfig: fix optee-os plateform
> >   configs/ti_am64x_sk_defconfig: fix optee-os plateform
> >   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
> >   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> >   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
> >     BINARIES_DIR
> >   boot/ti-k3-boot-firmware: introduce
> >     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
> >   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
> >     package
> >   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
> >   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
> >   boot/uboot: enable TI K3 Device Manager (DM) for j721e
> >   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
> >   configs/ti_j721e_sk_defconfig: new defconfig
> >   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
> >     tool
> >   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
> >     tool
> >   boot/ti-k3-image-gen: remove package
> > 
> >  Config.in.legacy                              |  7 ++
> >  DEVELOPERS                                    |  6 +-
> >  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
> >  board/ti/j721e-sk/post-build.sh               | 16 ++++
> >  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
> >  boot/Config.in                                |  1 -
> >  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
> >  .../ti-k3-boot-firmware.hash                  |  2 +-
> >  .../ti-k3-boot-firmware.mk                    | 16 ++--
> >  boot/ti-k3-image-gen/Config.in                | 77 -------------------
> >  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
> >  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
> >  boot/ti-k3-r5-loader/Config.in                |  8 ++
> >  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
> >  boot/uboot/Config.in                          | 27 ++++---
> >  boot/uboot/uboot.mk                           | 10 ++-
> >  configs/ti_am62x_sk_defconfig                 | 14 ++--
> >  configs/ti_am64x_sk_defconfig                 | 14 ++--
> >  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
> >  package/python-attrs/python-attrs.mk          |  6 ++
> >  .../python-jsonschema-specifications.mk       | 10 +++
> >  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
> >  .../python-referencing/python-referencing.mk  | 11 +++
> >  package/python-rpds-py/python-rpds-py.mk      |  1 +
> >  24 files changed, 275 insertions(+), 180 deletions(-)
> >  create mode 100644 board/ti/j721e-sk/genimage.cfg
> >  create mode 100755 board/ti/j721e-sk/post-build.sh
> >  create mode 100644 board/ti/j721e-sk/readme.txt
> >  delete mode 100644 boot/ti-k3-image-gen/Config.in
> >  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
> >  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> >  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> > 
> > --
> > 2.43.0
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot

1. Boot log:

U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
SPL initial stack usage: 13400 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.10.0  (release):v2.10
NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
I/TC: 
I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
I/TC: HUK Initialized
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
SPL initial stack usage: 1872 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed


U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
DRAM:  2 GiB
Core:  56 devices, 23 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'uEnv.txt'
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev 'mmc@fa00000.bootdev':
Scanning bootdev 'mmc@fa10000.bootdev':
Unknown uclass 'usb' in label
link up on port 1, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again



-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-13 17:28 ` [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package Romain Naour
  2024-02-13 19:05   ` Alexander Sverdlin
  2024-02-14 10:58   ` Alexander Sverdlin
@ 2024-02-15 10:20   ` Alexander Sverdlin
  2024-02-15 11:26     ` Romain Naour
  2024-02-16 20:06     ` Andreas Dannenberg via buildroot
  2 siblings, 2 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-15 10:20 UTC (permalink / raw)
  To: Romain Naour, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> -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

another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
was the default, which didn't boot on my HS-FS SoC.

You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
default for AM62x. I'm not sure if this is a problem, though.

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-15 10:13 ` [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Alexander Sverdlin
@ 2024-02-15 11:23   ` Romain Naour
  2024-02-15 21:14     ` Alexander Sverdlin
  2024-02-16 20:13     ` Andreas Dannenberg via buildroot
  0 siblings, 2 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-15 11:23 UTC (permalink / raw)
  To: Alexander Sverdlin, buildroot

Hi Alexander,

Le 15/02/2024 à 11:13, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
>>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
>>>
>>> This series start by adding U-boot binman support already submitted in the
>>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
>>> [1], with small improvements.
>>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
>>>
>>> With binman support, we can add the TI K3 j721e SoC support by
>>> providing all required firmware generated by the build.
>>>
>>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
>>> boot the board (serial debug and ethernet working).
>>>
>>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
>>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
>>>
>>> Followup commits can improve TI K3 HS-FS devices based on binman instead
>>> of legacy core-secdev-k3 tool.
>>>
>>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
>>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
>>>
>>> Best regards,
>>> Romain
> 
> I have mixed feelings after testing the patchset on SK-AM62B...
> It doesn't quite boot, refer to the boot log [1].
> Seems that U-Boot env is missing, maybe I'm missing some installation
> step, but I do not see it mentioned in the documetation (for instance
> of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").
> 
> I'm not sure if this is a result of U-Boot update or if the current
> master is broken as well. I'll be retesting it today and will get back to
> you.

It seems you are testing on a HS-FS device "AM62X SR1.0 HS-FS" while I only
runtime tested this series on a SK-TDA4VM (GP: general pupose).

Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
customize the image generated in a post-build script?

Maybe you have to replace the tiboot3.bin binary included by genimage with the
one for the HS-FS variant ?

for j721e:
    285449 13 févr. 17:27 tiboot3.bin
    285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
    286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
    286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin

for am62x:
    tiboot3.bin << should be the gp variant by default
    tiboot3-am62x-gp-evm.bin
    tiboot3-am62x-hs-fs-evm.bin

Also, did you have the ti-k3-core-secdev package locally, it seems it's required
for HS-FS SoC but the package is currently missing:

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

Is ti-k3-core-secdev really required fllowing the switch to binman?
(binman should sign all firmware binaries itself).

> 
> Fortunately this patchset is actually about building the images differently
> and this part actually went smoothly, which is good.

Thank you for testing, it help a lot!

Maybe something is missing in this series to handle HS-FS device properly.

> 
>>> Dario Binacchi (5):
>>>   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
>>>
>>> Romain Naour (16):
>>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>>>     BINARIES_DIR
>>>   boot/ti-k3-boot-firmware: introduce
>>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>>>     package
>>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>>>   configs/ti_j721e_sk_defconfig: new defconfig
>>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>>>     tool
>>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>>>     tool
>>>   boot/ti-k3-image-gen: remove package
>>>
>>>  Config.in.legacy                              |  7 ++
>>>  DEVELOPERS                                    |  6 +-
>>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>>>  boot/Config.in                                |  1 -
>>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>>>  .../ti-k3-boot-firmware.hash                  |  2 +-
>>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>>>  boot/uboot/Config.in                          | 27 ++++---
>>>  boot/uboot/uboot.mk                           | 10 ++-
>>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>>>  package/python-attrs/python-attrs.mk          |  6 ++
>>>  .../python-jsonschema-specifications.mk       | 10 +++
>>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>>>  .../python-referencing/python-referencing.mk  | 11 +++
>>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>>>  24 files changed, 275 insertions(+), 180 deletions(-)
>>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>>>  create mode 100755 board/ti/j721e-sk/post-build.sh
>>>  create mode 100644 board/ti/j721e-sk/readme.txt
>>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
>>>
>>> --
>>> 2.43.0
>>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot@buildroot.org
>>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
> 1. Boot log:
> 
> U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> SPL initial stack usage: 13400 bytes
> Trying to boot from MMC2
> Authentication passed
> Authentication passed
> Authentication passed
> Authentication passed
> Authentication passed
> Starting ATF on ARM64 core...
> 
> NOTICE:  BL31: v2.10.0  (release):v2.10
> NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
> I/TC: 
> I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
> I/TC: WARNING: This OP-TEE configuration might be insecure!
> I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
> I/TC: Primary CPU initializing
> I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> I/TC: HUK Initialized
> I/TC: Activated SA2UL device
> I/TC: Enabled firewalls for SA2UL TRNG device
> I/TC: SA2UL TRNG initialized
> I/TC: SA2UL Drivers initialized
> I/TC: Primary CPU switching to normal world boot
> 
> U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> SPL initial stack usage: 1872 bytes
> Trying to boot from MMC2
> Authentication passed
> Authentication passed
> 
> 
> U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> 
> SoC:   AM62X SR1.0 HS-FS
> Model: Texas Instruments AM625 SK
> DRAM:  2 GiB
> Core:  56 devices, 23 uclasses, devicetree: separate
> MMC:   mmc@fa10000: 0, mmc@fa00000: 1
> Loading Environment from nowhere... OK
> In:    serial@2800000
> Out:   serial@2800000
> Err:   serial@2800000
> Net:   eth0: ethernet@8000000port@1
> Hit any key to stop autoboot:  0 
> switch to partitions #0, OK
> mmc1 is current device
> SD/MMC found on device 1
> Failed to load 'uEnv.txt'

Can you access to the mmc1 content manually ?
I had to create a symlink due to "dtb" subdirectory expected by u-boot
u-boot is looking at /boot/dtb/ti for devicetree.

Best regards,
Romain


> Scanning for bootflows in all bootdevs
> Seq  Method       State   Uclass    Part  Name                      Filename
> ---  -----------  ------  --------  ----  ------------------------  ----------------
> Scanning global bootmeth 'efi_mgr':
> No EFI system partition
> No EFI system partition
> Failed to persist EFI variables
> Scanning bootdev 'mmc@fa00000.bootdev':
> Scanning bootdev 'mmc@fa10000.bootdev':
> Unknown uclass 'usb' in label
> link up on port 1, speed 100, full duplex
> BOOTP broadcast 1
> BOOTP broadcast 2
> BOOTP broadcast 3
> BOOTP broadcast 4
> BOOTP broadcast 5
> BOOTP broadcast 6
> BOOTP broadcast 7
> BOOTP broadcast 8
> BOOTP broadcast 9
> BOOTP broadcast 10
> BOOTP broadcast 11
> BOOTP broadcast 12
> BOOTP broadcast 13
> BOOTP broadcast 14
> BOOTP broadcast 15
> BOOTP broadcast 16
> BOOTP broadcast 17
> 
> Retry time exceeded; starting again
> 
> 
> 

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-15 10:20   ` Alexander Sverdlin
@ 2024-02-15 11:26     ` Romain Naour
  2024-02-15 18:50       ` Alexander Sverdlin
  2024-02-16 20:06     ` Andreas Dannenberg via buildroot
  1 sibling, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-15 11:26 UTC (permalink / raw)
  To: Alexander Sverdlin, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Alexander,

Le 15/02/2024 à 11:20, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
>> -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
> 
> another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
> was the default, which didn't boot on my HS-FS SoC.
> 
> You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
> default for AM62x. I'm not sure if this is a problem, though.
> 

I don't think so, the am62x defconfig should still be for GP SoC by default.

Ok, maybe there is something to improve in this series but I don't have any
HS/HS-FS SoC for testing...

Best regards,
Romain

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-15 11:26     ` Romain Naour
@ 2024-02-15 18:50       ` Alexander Sverdlin
  2024-02-15 22:32         ` Romain Naour
  0 siblings, 1 reply; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-15 18:50 UTC (permalink / raw)
  To: Romain Naour, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Romain,

On Thu, 2024-02-15 at 12:26 +0100, Romain Naour wrote:
> > On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> > > -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
> > 
> > another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
> > was the default, which didn't boot on my HS-FS SoC.
> > 
> > You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
> > default for AM62x. I'm not sure if this is a problem, though.
> > 
> 
> I don't think so, the am62x defconfig should still be for GP SoC by default.

I'm pretty sure it's HS-FS by default, because GP (as of todays "master")

>>> ti-k3-image-gen 08.06.00.007 Extracting
gzip -d -c /home/alex/remote/buildroot/dl/ti-k3-image-gen/k3-image-gen-08.06.00.007.tar.gz | /home/alex/remote/buildroot/output/host/bin/tar --strip-components=1 -C
/home/alex/remote/buildroot/output/build/ti-k3-image-gen-08.06.00.007   -xf -
>>> ti-k3-image-gen 08.06.00.007 Patching
>>> ti-k3-image-gen 08.06.00.007 Configuring
cp /home/alex/remote/buildroot/output/images/ti-sysfw/ti-fs-firmware-am62x-hs-fs.bin /home/alex/remote/buildroot/output/build/ti-k3-image-gen-08.06.00.007
cp: cannot stat '/home/alex/remote/buildroot/output/images/ti-sysfw/ti-fs-firmware-am62x-hs-fs.bin': No such file or directory
make: *** [package/pkg-generic.mk:273: /home/alex/remote/buildroot/output/build/ti-k3-image-gen-08.06.00.007/.stamp_configured] Error 1

So overall, for HS-FS it doesn't look as a regression with you patchset,
but rather as improvement, even though it doesn't boot, but it builds
at least...

I can try to look what could be the problem with U-Boot environment...

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-15 11:23   ` Romain Naour
@ 2024-02-15 21:14     ` Alexander Sverdlin
  2024-02-15 22:13       ` Romain Naour
  2024-02-16 20:13     ` Andreas Dannenberg via buildroot
  1 sibling, 1 reply; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-15 21:14 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Thu, 2024-02-15 at 12:23 +0100, Romain Naour wrote:
> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
> customize the image generated in a post-build script?
> 
> Maybe you have to replace the tiboot3.bin binary included by genimage with the
> one for the HS-FS variant ?
> 
> for j721e:
>     285449 13 févr. 17:27 tiboot3.bin
>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
> 
> for am62x:
>     tiboot3.bin << should be the gp variant by default
>     tiboot3-am62x-gp-evm.bin
>     tiboot3-am62x-hs-fs-evm.bin

That's not the case any more, after
make clean; make ti_am62x_sk_defconfig; make

I get:

 images]$ ls -l
...
-rw-r--r-- 1 ...    282545 Feb 15 21:24 tiboot3-am62x-gp-evm.bin
-rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-evm.bin
-rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-fs-evm.bin
-rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3.bin

But, well, this seems to be an upstream change in U-Boot.

However, there seems to be no alternative to

BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE, after removal of 
boot/ti-k3-image-gen package. People with SK-AM62 will find
their boards silently broken (GP variants).

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-15 21:14     ` Alexander Sverdlin
@ 2024-02-15 22:13       ` Romain Naour
  2024-02-15 22:22         ` Alexander Sverdlin
  0 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-15 22:13 UTC (permalink / raw)
  To: Alexander Sverdlin, buildroot

Hello Alexander,

Le 15/02/2024 à 22:14, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Thu, 2024-02-15 at 12:23 +0100, Romain Naour wrote:
>> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
>> customize the image generated in a post-build script?
>>
>> Maybe you have to replace the tiboot3.bin binary included by genimage with the
>> one for the HS-FS variant ?
>>
>> for j721e:
>>     285449 13 févr. 17:27 tiboot3.bin
>>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
>>
>> for am62x:
>>     tiboot3.bin << should be the gp variant by default
>>     tiboot3-am62x-gp-evm.bin
>>     tiboot3-am62x-hs-fs-evm.bin
> 
> That's not the case any more, after
> make clean; make ti_am62x_sk_defconfig; make
> 
> I get:
> 
>  images]$ ls -l
> ...
> -rw-r--r-- 1 ...    282545 Feb 15 21:24 tiboot3-am62x-gp-evm.bin
> -rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-evm.bin
> -rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-fs-evm.bin
> -rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3.bin
> 
> But, well, this seems to be an upstream change in U-Boot.

Good catch!

Indeed, there is an inconsistency between K3 SoC support in binman, the j721e by
default is GP while other are hs-fs.

It seems related to *-binman.dtsi file (notice were is placed the property
symlink = "tiboot3.bin";)

&binman {
	tiboot3-am62x-hs-fs-evm.bin {
		filename = "tiboot3-am62x-hs-fs-evm.bin";
		symlink = "tiboot3.bin";

https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/arch/arm/dts/k3-am625-sk-binman.dtsi?ref_type=tags#L58

&binman {
	tiboot3-am64x_sr2-hs-fs-evm.bin {
		filename = "tiboot3-am64x_sr2-hs-fs-evm.bin";
		symlink = "tiboot3.bin";


https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/arch/arm/dts/k3-am64x-binman.dtsi?ref_type=tags#L50

&binman {
	tiboot3-j721e-gp-evm.bin {
		filename = "tiboot3-j721e-gp-evm.bin";
		symlink = "tiboot3.bin";

https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/arch/arm/dts/k3-j721e-binman.dtsi?ref_type=tags#L210

Maybe it would be a good idea to ignore the symlink created by uboot and create
the symlink ourself in BINARIES_DIR.

> 
> However, there seems to be no alternative to
> 
> BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE, after removal of 
> boot/ti-k3-image-gen package. People with SK-AM62 will find
> their boards silently broken (GP variants).
> 

What about BR2_TARGET_TI_K3_R5_LOADER_SECTYPE option to select the default
tiboot3.bin (and sysfw.itb if any)?

Best regards,
Romain


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

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-15 22:13       ` Romain Naour
@ 2024-02-15 22:22         ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-15 22:22 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Thu, 2024-02-15 at 23:13 +0100, Romain Naour wrote:
> Maybe it would be a good idea to ignore the symlink created by uboot and create
> the symlink ourself in BINARIES_DIR.
> 
> > 
> > However, there seems to be no alternative to
> > 
> > BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE, after removal of 
> > boot/ti-k3-image-gen package. People with SK-AM62 will find
> > their boards silently broken (GP variants).
> > 
> 
> What about BR2_TARGET_TI_K3_R5_LOADER_SECTYPE option to select the default
> tiboot3.bin (and sysfw.itb if any)?

Makes sense to me.

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-15 18:50       ` Alexander Sverdlin
@ 2024-02-15 22:32         ` Romain Naour
  2024-02-15 22:36           ` Alexander Sverdlin
  0 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-15 22:32 UTC (permalink / raw)
  To: Alexander Sverdlin, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Alexander,

Le 15/02/2024 à 19:50, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Thu, 2024-02-15 at 12:26 +0100, Romain Naour wrote:
>>> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
>>>> -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
>>>
>>> another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
>>> was the default, which didn't boot on my HS-FS SoC.
>>>
>>> You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
>>> default for AM62x. I'm not sure if this is a problem, though.
>>>
>>
>> I don't think so, the am62x defconfig should still be for GP SoC by default.
> 
> I'm pretty sure it's HS-FS by default, because GP (as of todays "master")
> 
>>>> ti-k3-image-gen 08.06.00.007 Extracting
> gzip -d -c /home/alex/remote/buildroot/dl/ti-k3-image-gen/k3-image-gen-08.06.00.007.tar.gz | /home/alex/remote/buildroot/output/host/bin/tar --strip-components=1 -C
> /home/alex/remote/buildroot/output/build/ti-k3-image-gen-08.06.00.007   -xf -
>>>> ti-k3-image-gen 08.06.00.007 Patching
>>>> ti-k3-image-gen 08.06.00.007 Configuring
> cp /home/alex/remote/buildroot/output/images/ti-sysfw/ti-fs-firmware-am62x-hs-fs.bin /home/alex/remote/buildroot/output/build/ti-k3-image-gen-08.06.00.007
> cp: cannot stat '/home/alex/remote/buildroot/output/images/ti-sysfw/ti-fs-firmware-am62x-hs-fs.bin': No such file or directory
> make: *** [package/pkg-generic.mk:273: /home/alex/remote/buildroot/output/build/ti-k3-image-gen-08.06.00.007/.stamp_configured] Error 1

Weird, the gitlab-ci build fine with :

BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
BR2_TARGET_TI_K3_IMAGE_GEN=y
# BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX is not set
# BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X is not set
BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
# BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X is not set
BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
# BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS is not set
# BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS is not set
BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"
BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE="ti-sci"
BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE="gp"
BR2_TARGET_TI_K3_R5_LOADER=y
BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION=y

AM64x: https://gitlab.com/buildroot.org/buildroot/-/jobs/6134305650

Same for AM62x: https://gitlab.com/buildroot.org/buildroot/-/jobs/6134305619

> 
> So overall, for HS-FS it doesn't look as a regression with you patchset,
> but rather as improvement, even though it doesn't boot, but it builds
> at least...
> 
> I can try to look what could be the problem with U-Boot environment...
> 
Yes please.

Best regards,
Romain

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-15 22:32         ` Romain Naour
@ 2024-02-15 22:36           ` Alexander Sverdlin
  0 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-15 22:36 UTC (permalink / raw)
  To: Romain Naour, buildroot; +Cc: Xuanhao Shi, Anand Gadiyar

Hi Romain,

On Thu, 2024-02-15 at 23:32 +0100, Romain Naour wrote:
> Weird, the gitlab-ci build fine with :
> 
> BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
> BR2_TARGET_TI_K3_IMAGE_GEN=y
> # BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX is not set
> # BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X is not set
> BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
> # BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X is not set
> BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
> # BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS is not set

right, I had to change from BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
to BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS for my HW, so
the latter seems to be broken in "master".

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig
  2024-02-13 17:28 ` [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig Romain Naour
  2024-02-14 12:06   ` Alexander Sverdlin
@ 2024-02-16  1:19   ` Alexander Sverdlin
  2024-02-16  1:44   ` Alexander Sverdlin
  2 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-16  1:19 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> --- /dev/null
> +++ b/board/ti/j721e-sk/post-build.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +BOARD_DIR="$(dirname $0)"

Unused variable?

> +
> +# u-boot is looking at /boot/dtb/ti for devicetree in the rootfs
> +# partition while Buildroot install the kernel and its devicetree
> +# in /boot (BR2_LINUX_KERNEL_INSTALL_TARGET enabled).
> +# Enabling BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME allows to keep the
> +# "ti" subdirectory but "dts" is still missing.
> +# Make sure /boot/dtb/ti exist by creating a symlink in
> +# ${TARGET_DIR}/boot
> +# https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc?h=09.02.00.004#n13
> +# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/include/env/ti/mmc.env?ref_type=tags#L18
> +if [ -L ${TARGET_DIR}/boot/dtb ]; then
> +    rm ${TARGET_DIR}/boot/dtb
> +    ln -sf . ${TARGET_DIR}/boot/dtb
> +fi

The above only re-creates a link if there was already a link, but doesn't
if it's a clean build. Should "ln -sf . ${TARGET_DIR}/boot/dtb" be outside
the "if"?

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig
  2024-02-13 17:28 ` [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig Romain Naour
  2024-02-14 12:06   ` Alexander Sverdlin
  2024-02-16  1:19   ` Alexander Sverdlin
@ 2024-02-16  1:44   ` Alexander Sverdlin
  2 siblings, 0 replies; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-16  1:44 UTC (permalink / raw)
  To: Romain Naour, buildroot

Hi Romain,

On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> --- /dev/null
> +++ b/board/ti/j721e-sk/post-build.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +BOARD_DIR="$(dirname $0)"
> +
> +# u-boot is looking at /boot/dtb/ti for devicetree in the rootfs
> +# partition while Buildroot install the kernel and its devicetree
> +# in /boot (BR2_LINUX_KERNEL_INSTALL_TARGET enabled).
> +# Enabling BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME allows to keep the
> +# "ti" subdirectory but "dts" is still missing.
> +# Make sure /boot/dtb/ti exist by creating a symlink in
> +# ${TARGET_DIR}/boot
> +# https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc?h=09.02.00.004#n13
> +# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/include/env/ti/mmc.env?ref_type=tags#L18
> +if [ -L ${TARGET_DIR}/boot/dtb ]; then
> +    rm ${TARGET_DIR}/boot/dtb
> +    ln -sf . ${TARGET_DIR}/boot/dtb
> +fi

the above script (with corrections) and...

> --- /dev/null
> +++ b/configs/ti_j721e_sk_defconfig
> @@ -0,0 +1,51 @@
> +BR2_aarch64=y
> +BR2_cortex_a72=y
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/j721e-sk/post-build.sh"

... the hook in config and

BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y

seem to be necessary for all boardswhere you update U-Boot to >=v2023.10,
because of U-Boot commits

014e013e784f ("environment: ti: Make get_fdt_mmc common") and
d8ea68da6bf1 ("environment: ti: Prefix ARM64 DTB names with directory"),

which lead to /boot/dts/ti requirement for all TI boards.

But it's unfortunately still not enough and SK-AM62B still falls back
to BOOTP instead of MMC boot...

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-15 10:20   ` Alexander Sverdlin
  2024-02-15 11:26     ` Romain Naour
@ 2024-02-16 20:06     ` Andreas Dannenberg via buildroot
  2024-02-16 21:38       ` Romain Naour
  1 sibling, 1 reply; 63+ messages in thread
From: Andreas Dannenberg via buildroot @ 2024-02-16 20:06 UTC (permalink / raw)
  To: Alexander Sverdlin; +Cc: Xuanhao Shi, Romain Naour, Anand Gadiyar, buildroot

On Thu, Feb 15, 2024 at 11:20:50AM +0100, Alexander Sverdlin wrote:
> Hi Romain,
> 
> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> > -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
> 
> another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
> was the default, which didn't boot on my HS-FS SoC.
> 
> You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
> default for AM62x. I'm not sure if this is a problem, though.

HS-FS should be the default for all TI AM6x devices. This is our
"production silicon" and what's used for (almost) all projects,
especially new projects. This being said having support for GP device
variants still is desirable for existing boards/projects, such as the
current BeaglePlay boards (amongst earlier version of TI starter kit
EVMs for AM6x).

--
Andreas Dannenberg
Texas Instruments Inc


> 
> -- 
> Alexander Sverdlin.
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-15 11:23   ` Romain Naour
  2024-02-15 21:14     ` Alexander Sverdlin
@ 2024-02-16 20:13     ` Andreas Dannenberg via buildroot
  2024-02-16 21:17       ` Romain Naour
  1 sibling, 1 reply; 63+ messages in thread
From: Andreas Dannenberg via buildroot @ 2024-02-16 20:13 UTC (permalink / raw)
  To: Romain Naour; +Cc: Alexander Sverdlin, buildroot

On Thu, Feb 15, 2024 at 12:23:21PM +0100, Romain Naour wrote:
> Hi Alexander,
> 
> Le 15/02/2024 à 11:13, Alexander Sverdlin a écrit :
> > Hi Romain,
> > 
> > On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
> >>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> >>>
> >>> This series start by adding U-boot binman support already submitted in the
> >>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> >>> [1], with small improvements.
> >>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> >>>
> >>> With binman support, we can add the TI K3 j721e SoC support by
> >>> providing all required firmware generated by the build.
> >>>
> >>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> >>> boot the board (serial debug and ethernet working).
> >>>
> >>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
> >>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
> >>>
> >>> Followup commits can improve TI K3 HS-FS devices based on binman instead
> >>> of legacy core-secdev-k3 tool.
> >>>
> >>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> >>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> >>>
> >>> Best regards,
> >>> Romain
> > 
> > I have mixed feelings after testing the patchset on SK-AM62B...
> > It doesn't quite boot, refer to the boot log [1].
> > Seems that U-Boot env is missing, maybe I'm missing some installation
> > step, but I do not see it mentioned in the documetation (for instance
> > of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").
> > 
> > I'm not sure if this is a result of U-Boot update or if the current
> > master is broken as well. I'll be retesting it today and will get back to
> > you.
> 
> It seems you are testing on a HS-FS device "AM62X SR1.0 HS-FS" while I only
> runtime tested this series on a SK-TDA4VM (GP: general pupose).
> 
> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
> customize the image generated in a post-build script?
> 
> Maybe you have to replace the tiboot3.bin binary included by genimage with the
> one for the HS-FS variant ?
> 
> for j721e:
>     285449 13 févr. 17:27 tiboot3.bin
>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
> 
> for am62x:
>     tiboot3.bin << should be the gp variant by default
>     tiboot3-am62x-gp-evm.bin
>     tiboot3-am62x-hs-fs-evm.bin
> 
> Also, did you have the ti-k3-core-secdev package locally, it seems it's required
> for HS-FS SoC but the package is currently missing:
> 
> http://lists.busybox.net/pipermail/buildroot/2024-February/685383.html
> 
> Is ti-k3-core-secdev really required fllowing the switch to binman?
> (binman should sign all firmware binaries itself).

We should see that we can remove/obsolete the ti-k3-core-secdev package
alongside the ti-k3-image-gen package, those are no longer needed since
we started using binman for the building the initial boot stage.

--
Andreas Dannenberg
Texas Instruments Inc

> 
> > 
> > Fortunately this patchset is actually about building the images differently
> > and this part actually went smoothly, which is good.
> 
> Thank you for testing, it help a lot!
> 
> Maybe something is missing in this series to handle HS-FS device properly.
> 
> > 
> >>> Dario Binacchi (5):
> >>>   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
> >>>
> >>> Romain Naour (16):
> >>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
> >>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
> >>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
> >>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
> >>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> >>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
> >>>     BINARIES_DIR
> >>>   boot/ti-k3-boot-firmware: introduce
> >>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
> >>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
> >>>     package
> >>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
> >>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
> >>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
> >>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
> >>>   configs/ti_j721e_sk_defconfig: new defconfig
> >>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
> >>>     tool
> >>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
> >>>     tool
> >>>   boot/ti-k3-image-gen: remove package
> >>>
> >>>  Config.in.legacy                              |  7 ++
> >>>  DEVELOPERS                                    |  6 +-
> >>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
> >>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
> >>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
> >>>  boot/Config.in                                |  1 -
> >>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
> >>>  .../ti-k3-boot-firmware.hash                  |  2 +-
> >>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
> >>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
> >>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
> >>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
> >>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
> >>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
> >>>  boot/uboot/Config.in                          | 27 ++++---
> >>>  boot/uboot/uboot.mk                           | 10 ++-
> >>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
> >>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
> >>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
> >>>  package/python-attrs/python-attrs.mk          |  6 ++
> >>>  .../python-jsonschema-specifications.mk       | 10 +++
> >>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
> >>>  .../python-referencing/python-referencing.mk  | 11 +++
> >>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
> >>>  24 files changed, 275 insertions(+), 180 deletions(-)
> >>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
> >>>  create mode 100755 board/ti/j721e-sk/post-build.sh
> >>>  create mode 100644 board/ti/j721e-sk/readme.txt
> >>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
> >>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
> >>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> >>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> >>>
> >>> --
> >>> 2.43.0
> >>>
> >>> _______________________________________________
> >>> buildroot mailing list
> >>> buildroot@buildroot.org
> >>> https://lists.buildroot.org/mailman/listinfo/buildroot
> > 
> > 1. Boot log:
> > 
> > U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
> > SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> > SPL initial stack usage: 13400 bytes
> > Trying to boot from MMC2
> > Authentication passed
> > Authentication passed
> > Authentication passed
> > Authentication passed
> > Authentication passed
> > Starting ATF on ARM64 core...
> > 
> > NOTICE:  BL31: v2.10.0  (release):v2.10
> > NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
> > I/TC: 
> > I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
> > I/TC: WARNING: This OP-TEE configuration might be insecure!
> > I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
> > I/TC: Primary CPU initializing
> > I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> > I/TC: HUK Initialized
> > I/TC: Activated SA2UL device
> > I/TC: Enabled firewalls for SA2UL TRNG device
> > I/TC: SA2UL TRNG initialized
> > I/TC: SA2UL Drivers initialized
> > I/TC: Primary CPU switching to normal world boot
> > 
> > U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> > SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> > SPL initial stack usage: 1872 bytes
> > Trying to boot from MMC2
> > Authentication passed
> > Authentication passed
> > 
> > 
> > U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> > 
> > SoC:   AM62X SR1.0 HS-FS
> > Model: Texas Instruments AM625 SK
> > DRAM:  2 GiB
> > Core:  56 devices, 23 uclasses, devicetree: separate
> > MMC:   mmc@fa10000: 0, mmc@fa00000: 1
> > Loading Environment from nowhere... OK
> > In:    serial@2800000
> > Out:   serial@2800000
> > Err:   serial@2800000
> > Net:   eth0: ethernet@8000000port@1
> > Hit any key to stop autoboot:  0 
> > switch to partitions #0, OK
> > mmc1 is current device
> > SD/MMC found on device 1
> > Failed to load 'uEnv.txt'
> 
> Can you access to the mmc1 content manually ?
> I had to create a symlink due to "dtb" subdirectory expected by u-boot
> u-boot is looking at /boot/dtb/ti for devicetree.
> 
> Best regards,
> Romain
> 
> 
> > Scanning for bootflows in all bootdevs
> > Seq  Method       State   Uclass    Part  Name                      Filename
> > ---  -----------  ------  --------  ----  ------------------------  ----------------
> > Scanning global bootmeth 'efi_mgr':
> > No EFI system partition
> > No EFI system partition
> > Failed to persist EFI variables
> > Scanning bootdev 'mmc@fa00000.bootdev':
> > Scanning bootdev 'mmc@fa10000.bootdev':
> > Unknown uclass 'usb' in label
> > link up on port 1, speed 100, full duplex
> > BOOTP broadcast 1
> > BOOTP broadcast 2
> > BOOTP broadcast 3
> > BOOTP broadcast 4
> > BOOTP broadcast 5
> > BOOTP broadcast 6
> > BOOTP broadcast 7
> > BOOTP broadcast 8
> > BOOTP broadcast 9
> > BOOTP broadcast 10
> > BOOTP broadcast 11
> > BOOTP broadcast 12
> > BOOTP broadcast 13
> > BOOTP broadcast 14
> > BOOTP broadcast 15
> > BOOTP broadcast 16
> > BOOTP broadcast 17
> > 
> > Retry time exceeded; starting again
> > 
> > 
> > 
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
                   ` (21 preceding siblings ...)
  2024-02-15 10:13 ` [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Alexander Sverdlin
@ 2024-02-16 20:19 ` Andreas Dannenberg via buildroot
  2024-02-16 21:52   ` Romain Naour
  22 siblings, 1 reply; 63+ messages in thread
From: Andreas Dannenberg via buildroot @ 2024-02-16 20:19 UTC (permalink / raw)
  To: Romain Naour; +Cc: buildroot

On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> 
> This series start by adding U-boot binman support already submitted in the
> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> [1], with small improvements.
> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]

Thanks Romain and Dario for all the work on this, and submitting this.
Will be spending some time over the next few days to see how I can help
out with this effort. I can already see many great improvements since
the last time I worked on AM62x/AM64x support last year.

--
Andreas Dannenberg
Texas Instruments Inc



> 
> With binman support, we can add the TI K3 j721e SoC support by
> providing all required firmware generated by the build.
> 
> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> boot the board (serial debug and ethernet working).
> 
> Thanks to binman support, we can remove the ti-k3-image-gen tool from
> Buildroot. To do that, we have to update existing defconfig (am62, am64).
> 
> Followup commits can improve TI K3 HS-FS devices based on binman instead
> of legacy core-secdev-k3 tool.
> 
> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> 
> Best regards,
> Romain
> 
> Dario Binacchi (5):
>   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
> 
> Romain Naour (16):
>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>     BINARIES_DIR
>   boot/ti-k3-boot-firmware: introduce
>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>     package
>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>   configs/ti_j721e_sk_defconfig: new defconfig
>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>     tool
>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>     tool
>   boot/ti-k3-image-gen: remove package
> 
>  Config.in.legacy                              |  7 ++
>  DEVELOPERS                                    |  6 +-
>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>  boot/Config.in                                |  1 -
>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>  .../ti-k3-boot-firmware.hash                  |  2 +-
>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>  boot/uboot/Config.in                          | 27 ++++---
>  boot/uboot/uboot.mk                           | 10 ++-
>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>  package/python-attrs/python-attrs.mk          |  6 ++
>  .../python-jsonschema-specifications.mk       | 10 +++
>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>  .../python-referencing/python-referencing.mk  | 11 +++
>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>  24 files changed, 275 insertions(+), 180 deletions(-)
>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>  create mode 100755 board/ti/j721e-sk/post-build.sh
>  create mode 100644 board/ti/j721e-sk/readme.txt
>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> 
> --
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-16 20:13     ` Andreas Dannenberg via buildroot
@ 2024-02-16 21:17       ` Romain Naour
  0 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-16 21:17 UTC (permalink / raw)
  To: Andreas Dannenberg; +Cc: Alexander Sverdlin, buildroot

Hello Andreas,

Le 16/02/2024 à 21:13, Andreas Dannenberg a écrit :
> On Thu, Feb 15, 2024 at 12:23:21PM +0100, Romain Naour wrote:
>> Hi Alexander,
>>
>> Le 15/02/2024 à 11:13, Alexander Sverdlin a écrit :
>>> Hi Romain,
>>>
>>> On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
>>>>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
>>>>>
>>>>> This series start by adding U-boot binman support already submitted in the
>>>>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
>>>>> [1], with small improvements.
>>>>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
>>>>>
>>>>> With binman support, we can add the TI K3 j721e SoC support by
>>>>> providing all required firmware generated by the build.
>>>>>
>>>>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
>>>>> boot the board (serial debug and ethernet working).
>>>>>
>>>>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
>>>>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
>>>>>
>>>>> Followup commits can improve TI K3 HS-FS devices based on binman instead
>>>>> of legacy core-secdev-k3 tool.
>>>>>
>>>>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
>>>>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
>>>>>
>>>>> Best regards,
>>>>> Romain
>>>
>>> I have mixed feelings after testing the patchset on SK-AM62B...
>>> It doesn't quite boot, refer to the boot log [1].
>>> Seems that U-Boot env is missing, maybe I'm missing some installation
>>> step, but I do not see it mentioned in the documetation (for instance
>>> of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").
>>>
>>> I'm not sure if this is a result of U-Boot update or if the current
>>> master is broken as well. I'll be retesting it today and will get back to
>>> you.
>>
>> It seems you are testing on a HS-FS device "AM62X SR1.0 HS-FS" while I only
>> runtime tested this series on a SK-TDA4VM (GP: general pupose).
>>
>> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
>> customize the image generated in a post-build script?
>>
>> Maybe you have to replace the tiboot3.bin binary included by genimage with the
>> one for the HS-FS variant ?
>>
>> for j721e:
>>     285449 13 févr. 17:27 tiboot3.bin
>>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
>>
>> for am62x:
>>     tiboot3.bin << should be the gp variant by default
>>     tiboot3-am62x-gp-evm.bin
>>     tiboot3-am62x-hs-fs-evm.bin
>>
>> Also, did you have the ti-k3-core-secdev package locally, it seems it's required
>> for HS-FS SoC but the package is currently missing:
>>
>> http://lists.busybox.net/pipermail/buildroot/2024-February/685383.html
>>
>> Is ti-k3-core-secdev really required fllowing the switch to binman?
>> (binman should sign all firmware binaries itself).
> 
> We should see that we can remove/obsolete the ti-k3-core-secdev package
> alongside the ti-k3-image-gen package, those are no longer needed since
> we started using binman for the building the initial boot stage.

Thank you for the clarification.

Best regards,
Romain


> 
> --
> Andreas Dannenberg
> Texas Instruments Inc
> 
>>
>>>
>>> Fortunately this patchset is actually about building the images differently
>>> and this part actually went smoothly, which is good.
>>
>> Thank you for testing, it help a lot!
>>
>> Maybe something is missing in this series to handle HS-FS device properly.
>>
>>>
>>>>> Dario Binacchi (5):
>>>>>   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
>>>>>
>>>>> Romain Naour (16):
>>>>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>>>>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>>>>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>>>>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>>>>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>>>>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>>>>>     BINARIES_DIR
>>>>>   boot/ti-k3-boot-firmware: introduce
>>>>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>>>>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>>>>>     package
>>>>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>>>>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>>>>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>>>>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>>>>>   configs/ti_j721e_sk_defconfig: new defconfig
>>>>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>>>>>     tool
>>>>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>>>>>     tool
>>>>>   boot/ti-k3-image-gen: remove package
>>>>>
>>>>>  Config.in.legacy                              |  7 ++
>>>>>  DEVELOPERS                                    |  6 +-
>>>>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>>>>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>>>>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>>>>>  boot/Config.in                                |  1 -
>>>>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>>>>>  .../ti-k3-boot-firmware.hash                  |  2 +-
>>>>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>>>>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>>>>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>>>>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>>>>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>>>>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>>>>>  boot/uboot/Config.in                          | 27 ++++---
>>>>>  boot/uboot/uboot.mk                           | 10 ++-
>>>>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>>>>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>>>>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>>>>>  package/python-attrs/python-attrs.mk          |  6 ++
>>>>>  .../python-jsonschema-specifications.mk       | 10 +++
>>>>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>>>>>  .../python-referencing/python-referencing.mk  | 11 +++
>>>>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>>>>>  24 files changed, 275 insertions(+), 180 deletions(-)
>>>>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>>>>>  create mode 100755 board/ti/j721e-sk/post-build.sh
>>>>>  create mode 100644 board/ti/j721e-sk/readme.txt
>>>>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>>>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>>>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>>>>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
>>>>>
>>>>> --
>>>>> 2.43.0
>>>>>
>>>>> _______________________________________________
>>>>> buildroot mailing list
>>>>> buildroot@buildroot.org
>>>>> https://lists.buildroot.org/mailman/listinfo/buildroot
>>>
>>> 1. Boot log:
>>>
>>> U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
>>> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
>>> SPL initial stack usage: 13400 bytes
>>> Trying to boot from MMC2
>>> Authentication passed
>>> Authentication passed
>>> Authentication passed
>>> Authentication passed
>>> Authentication passed
>>> Starting ATF on ARM64 core...
>>>
>>> NOTICE:  BL31: v2.10.0  (release):v2.10
>>> NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
>>> I/TC: 
>>> I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
>>> I/TC: WARNING: This OP-TEE configuration might be insecure!
>>> I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
>>> I/TC: Primary CPU initializing
>>> I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
>>> I/TC: HUK Initialized
>>> I/TC: Activated SA2UL device
>>> I/TC: Enabled firewalls for SA2UL TRNG device
>>> I/TC: SA2UL TRNG initialized
>>> I/TC: SA2UL Drivers initialized
>>> I/TC: Primary CPU switching to normal world boot
>>>
>>> U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
>>> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
>>> SPL initial stack usage: 1872 bytes
>>> Trying to boot from MMC2
>>> Authentication passed
>>> Authentication passed
>>>
>>>
>>> U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)
>>>
>>> SoC:   AM62X SR1.0 HS-FS
>>> Model: Texas Instruments AM625 SK
>>> DRAM:  2 GiB
>>> Core:  56 devices, 23 uclasses, devicetree: separate
>>> MMC:   mmc@fa10000: 0, mmc@fa00000: 1
>>> Loading Environment from nowhere... OK
>>> In:    serial@2800000
>>> Out:   serial@2800000
>>> Err:   serial@2800000
>>> Net:   eth0: ethernet@8000000port@1
>>> Hit any key to stop autoboot:  0 
>>> switch to partitions #0, OK
>>> mmc1 is current device
>>> SD/MMC found on device 1
>>> Failed to load 'uEnv.txt'
>>
>> Can you access to the mmc1 content manually ?
>> I had to create a symlink due to "dtb" subdirectory expected by u-boot
>> u-boot is looking at /boot/dtb/ti for devicetree.
>>
>> Best regards,
>> Romain
>>
>>
>>> Scanning for bootflows in all bootdevs
>>> Seq  Method       State   Uclass    Part  Name                      Filename
>>> ---  -----------  ------  --------  ----  ------------------------  ----------------
>>> Scanning global bootmeth 'efi_mgr':
>>> No EFI system partition
>>> No EFI system partition
>>> Failed to persist EFI variables
>>> Scanning bootdev 'mmc@fa00000.bootdev':
>>> Scanning bootdev 'mmc@fa10000.bootdev':
>>> Unknown uclass 'usb' in label
>>> link up on port 1, speed 100, full duplex
>>> BOOTP broadcast 1
>>> BOOTP broadcast 2
>>> BOOTP broadcast 3
>>> BOOTP broadcast 4
>>> BOOTP broadcast 5
>>> BOOTP broadcast 6
>>> BOOTP broadcast 7
>>> BOOTP broadcast 8
>>> BOOTP broadcast 9
>>> BOOTP broadcast 10
>>> BOOTP broadcast 11
>>> BOOTP broadcast 12
>>> BOOTP broadcast 13
>>> BOOTP broadcast 14
>>> BOOTP broadcast 15
>>> BOOTP broadcast 16
>>> BOOTP broadcast 17
>>>
>>> Retry time exceeded; starting again
>>>
>>>
>>>
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-16 20:06     ` Andreas Dannenberg via buildroot
@ 2024-02-16 21:38       ` Romain Naour
  2024-02-19 19:42         ` Andreas Dannenberg via buildroot
  0 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-16 21:38 UTC (permalink / raw)
  To: Andreas Dannenberg, Alexander Sverdlin
  Cc: Xuanhao Shi, Anand Gadiyar, buildroot

Hello Andreas,

Le 16/02/2024 à 21:06, Andreas Dannenberg a écrit :
> On Thu, Feb 15, 2024 at 11:20:50AM +0100, Alexander Sverdlin wrote:
>> Hi Romain,
>>
>> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
>>> -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
>>
>> another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
>> was the default, which didn't boot on my HS-FS SoC.
>>
>> You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
>> default for AM62x. I'm not sure if this is a problem, though.
> 
> HS-FS should be the default for all TI AM6x devices. This is our
> "production silicon" and what's used for (almost) all projects,
> especially new projects. This being said having support for GP device
> variants still is desirable for existing boards/projects, such as the
> current BeaglePlay boards (amongst earlier version of TI starter kit
> EVMs for AM6x).

Thank you, I was not aware of this.

I found your post in the TI forum about the recent switch from GP to HS-FS
device in Yocto [1].

Currently existing am64/am62 defconfigs are still targeting GP devices but we
should add additional commits to do the switch to HS-FS.

What about other SoC of the K3 architecture?
Is the DRA829/J721e device will also switch to HS-FS by default?

From the u-boot k3 documentation, it's not clear witch device type is used by
default across all k3 SoC. By default I was expecting the GP type for all the k3
family (I was wrong).

[1]
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1210443/faq-am625-generating-sitara-am62x-am62ax-am64x-gp-device-bootable-mmc-sd-card-images-using-sdk-v8-6-and-yocto

[2]
https://source.denx.de/u-boot/u-boot/-/blob/master/doc/board/ti/k3.rst?ref_type=heads&plain=1#L108

Best regards,
Romain

> 
> --
> Andreas Dannenberg
> Texas Instruments Inc
> 
> 
>>
>> -- 
>> Alexander Sverdlin.
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot

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

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-16 20:19 ` Andreas Dannenberg via buildroot
@ 2024-02-16 21:52   ` Romain Naour
  2024-02-16 22:20     ` Andreas Dannenberg via buildroot
  0 siblings, 1 reply; 63+ messages in thread
From: Romain Naour @ 2024-02-16 21:52 UTC (permalink / raw)
  To: Andreas Dannenberg; +Cc: Alexander Sverdlin, buildroot

Hello Andreas,

Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
>>
>> This series start by adding U-boot binman support already submitted in the
>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
>> [1], with small improvements.
>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> 
> Thanks Romain and Dario for all the work on this, and submitting this.
> Will be spending some time over the next few days to see how I can help
> out with this effort. I can already see many great improvements since
> the last time I worked on AM62x/AM64x support last year.

Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
helped on AM62x.

Maybe if you can also test on AM64x just to be sure the defconfig is working.

For now, I need to rework AM64x/AM62x support since Alexander reported that his
board doesn't boot the kernel.

Best regards,
Romain


> 
> --
> Andreas Dannenberg
> Texas Instruments Inc
> 
> 
> 
>>
>> With binman support, we can add the TI K3 j721e SoC support by
>> providing all required firmware generated by the build.
>>
>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
>> boot the board (serial debug and ethernet working).
>>
>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
>>
>> Followup commits can improve TI K3 HS-FS devices based on binman instead
>> of legacy core-secdev-k3 tool.
>>
>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
>>
>> Best regards,
>> Romain
>>
>> Dario Binacchi (5):
>>   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
>>
>> Romain Naour (16):
>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>>     BINARIES_DIR
>>   boot/ti-k3-boot-firmware: introduce
>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>>     package
>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>>   configs/ti_j721e_sk_defconfig: new defconfig
>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>>     tool
>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>>     tool
>>   boot/ti-k3-image-gen: remove package
>>
>>  Config.in.legacy                              |  7 ++
>>  DEVELOPERS                                    |  6 +-
>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>>  boot/Config.in                                |  1 -
>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>>  .../ti-k3-boot-firmware.hash                  |  2 +-
>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>>  boot/uboot/Config.in                          | 27 ++++---
>>  boot/uboot/uboot.mk                           | 10 ++-
>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>>  package/python-attrs/python-attrs.mk          |  6 ++
>>  .../python-jsonschema-specifications.mk       | 10 +++
>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>>  .../python-referencing/python-referencing.mk  | 11 +++
>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>>  24 files changed, 275 insertions(+), 180 deletions(-)
>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>>  create mode 100755 board/ti/j721e-sk/post-build.sh
>>  create mode 100644 board/ti/j721e-sk/readme.txt
>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
>>
>> --
>> 2.43.0
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot

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

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-16 21:52   ` Romain Naour
@ 2024-02-16 22:20     ` Andreas Dannenberg via buildroot
  2024-02-17  3:13       ` Alexander Sverdlin
  0 siblings, 1 reply; 63+ messages in thread
From: Andreas Dannenberg via buildroot @ 2024-02-16 22:20 UTC (permalink / raw)
  To: Romain Naour; +Cc: Alexander Sverdlin, buildroot

On Fri, Feb 16, 2024 at 10:52:21PM +0100, Romain Naour wrote:
> Hello Andreas,
> 
> Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> > On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> >> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> >>
> >> This series start by adding U-boot binman support already submitted in the
> >> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> >> [1], with small improvements.
> >> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > 
> > Thanks Romain and Dario for all the work on this, and submitting this.
> > Will be spending some time over the next few days to see how I can help
> > out with this effort. I can already see many great improvements since
> > the last time I worked on AM62x/AM64x support last year.
> 
> Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
> helped on AM62x.
> 
> Maybe if you can also test on AM64x just to be sure the defconfig is working.

I'm planning on testing the entire series here pretty soon and will
provide feedback (I have access to any and all boards:)

One of the things I'm trying to assess is what's still missing vs. the
previous attempt I made upstreaming this. For example, AM62x graphics
isn't there yet (ti-rogue-km / ti-rogue-um).


--
Andreas Dannenberg
Texas Instruments Inc


> 
> For now, I need to rework AM64x/AM62x support since Alexander reported that his
> board doesn't boot the kernel.
> 
> Best regards,
> Romain
> 
> 
> > 
> > --
> > Andreas Dannenberg
> > Texas Instruments Inc
> > 
> > 
> > 
> >>
> >> With binman support, we can add the TI K3 j721e SoC support by
> >> providing all required firmware generated by the build.
> >>
> >> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> >> boot the board (serial debug and ethernet working).
> >>
> >> Thanks to binman support, we can remove the ti-k3-image-gen tool from
> >> Buildroot. To do that, we have to update existing defconfig (am62, am64).
> >>
> >> Followup commits can improve TI K3 HS-FS devices based on binman instead
> >> of legacy core-secdev-k3 tool.
> >>
> >> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> >> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> >>
> >> Best regards,
> >> Romain
> >>
> >> Dario Binacchi (5):
> >>   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
> >>
> >> Romain Naour (16):
> >>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
> >>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
> >>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
> >>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
> >>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> >>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
> >>     BINARIES_DIR
> >>   boot/ti-k3-boot-firmware: introduce
> >>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
> >>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
> >>     package
> >>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
> >>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
> >>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
> >>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
> >>   configs/ti_j721e_sk_defconfig: new defconfig
> >>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
> >>     tool
> >>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
> >>     tool
> >>   boot/ti-k3-image-gen: remove package
> >>
> >>  Config.in.legacy                              |  7 ++
> >>  DEVELOPERS                                    |  6 +-
> >>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
> >>  board/ti/j721e-sk/post-build.sh               | 16 ++++
> >>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
> >>  boot/Config.in                                |  1 -
> >>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
> >>  .../ti-k3-boot-firmware.hash                  |  2 +-
> >>  .../ti-k3-boot-firmware.mk                    | 16 ++--
> >>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
> >>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
> >>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
> >>  boot/ti-k3-r5-loader/Config.in                |  8 ++
> >>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
> >>  boot/uboot/Config.in                          | 27 ++++---
> >>  boot/uboot/uboot.mk                           | 10 ++-
> >>  configs/ti_am62x_sk_defconfig                 | 14 ++--
> >>  configs/ti_am64x_sk_defconfig                 | 14 ++--
> >>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
> >>  package/python-attrs/python-attrs.mk          |  6 ++
> >>  .../python-jsonschema-specifications.mk       | 10 +++
> >>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
> >>  .../python-referencing/python-referencing.mk  | 11 +++
> >>  package/python-rpds-py/python-rpds-py.mk      |  1 +
> >>  24 files changed, 275 insertions(+), 180 deletions(-)
> >>  create mode 100644 board/ti/j721e-sk/genimage.cfg
> >>  create mode 100755 board/ti/j721e-sk/post-build.sh
> >>  create mode 100644 board/ti/j721e-sk/readme.txt
> >>  delete mode 100644 boot/ti-k3-image-gen/Config.in
> >>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
> >>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> >>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> >>
> >> --
> >> 2.43.0
> >>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot@buildroot.org
> >> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-16 22:20     ` Andreas Dannenberg via buildroot
@ 2024-02-17  3:13       ` Alexander Sverdlin
  2024-02-19 19:59         ` Andreas Dannenberg via buildroot
  0 siblings, 1 reply; 63+ messages in thread
From: Alexander Sverdlin @ 2024-02-17  3:13 UTC (permalink / raw)
  To: Andreas Dannenberg, Romain Naour; +Cc: buildroot

Hello Andreas,

On Fri, 2024-02-16 at 16:20 -0600, Andreas Dannenberg wrote:
> On Fri, Feb 16, 2024 at 10:52:21PM +0100, Romain Naour wrote:
> > Hello Andreas,
> > 
> > Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> > > On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> > > > This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> > > > 
> > > > This series start by adding U-boot binman support already submitted in the
> > > > preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> > > > [1], with small improvements.
> > > > See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > > 
> > > Thanks Romain and Dario for all the work on this, and submitting this.
> > > Will be spending some time over the next few days to see how I can help
> > > out with this effort. I can already see many great improvements since
> > > the last time I worked on AM62x/AM64x support last year.
> > 
> > Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
> > helped on AM62x.
> > 
> > Maybe if you can also test on AM64x just to be sure the defconfig is working.
> 
> I'm planning on testing the entire series here pretty soon and will
> provide feedback (I have access to any and all boards:)
> 
> One of the things I'm trying to assess is what's still missing vs. the
> previous attempt I made upstreaming this. For example, AM62x graphics
> isn't there yet (ti-rogue-km / ti-rogue-um).

maybe you could shed some light onto the AM62x situation. My conclusion
is that since your initial buildroot BSP U-Boot has been switched
to standard boot (CONFIG_BOOTSTD), refer to (U-Boot repo):

commit 355c0afcd4b7c8c442c4d03e07649c24194b8e06
Author: Nishanth Menon <nm@ti.com>
Date:   Fri Aug 25 13:02:52 2023 -0500

    configs: am62x_evm_a53_defconfig: Switch to bootstd

and

commit ab54d9b28d8578cc43b214d39009e7b1def797e4
Author: Roger Quadros <rogerq@kernel.org>
Date:   Thu Oct 5 16:06:41 2023 +0300

    board: ti: am62x: am62x.env: Fix boot_targets
    
    ti_mmc is not a valid boot_target for standard boot flow so

I suppose TI's BSP still uses older U-Boot and is still not affected.
Do we need uEnv.txt now? Do you have an idea which distro Nishanth may
have tested with BOOTSTD change?

-- 
Alexander Sverdlin.

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

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-16 21:38       ` Romain Naour
@ 2024-02-19 19:42         ` Andreas Dannenberg via buildroot
  2024-02-19 22:27           ` Romain Naour
  0 siblings, 1 reply; 63+ messages in thread
From: Andreas Dannenberg via buildroot @ 2024-02-19 19:42 UTC (permalink / raw)
  To: Romain Naour; +Cc: Xuanhao Shi, Anand Gadiyar, Alexander Sverdlin, buildroot

Hi Romain,

On Fri, Feb 16, 2024 at 10:38:42PM +0100, Romain Naour wrote:
> Hello Andreas,
> 
> Le 16/02/2024 à 21:06, Andreas Dannenberg a écrit :
> > On Thu, Feb 15, 2024 at 11:20:50AM +0100, Alexander Sverdlin wrote:
> >> Hi Romain,
> >>
> >> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
> >>> -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
> >>
> >> another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
> >> was the default, which didn't boot on my HS-FS SoC.
> >>
> >> You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
> >> default for AM62x. I'm not sure if this is a problem, though.
> > 
> > HS-FS should be the default for all TI AM6x devices. This is our
> > "production silicon" and what's used for (almost) all projects,
> > especially new projects. This being said having support for GP device
> > variants still is desirable for existing boards/projects, such as the
> > current BeaglePlay boards (amongst earlier version of TI starter kit
> > EVMs for AM6x).
> 
> Thank you, I was not aware of this.
> 
> I found your post in the TI forum about the recent switch from GP to HS-FS
> device in Yocto [1].
> 
> Currently existing am64/am62 defconfigs are still targeting GP devices but we
> should add additional commits to do the switch to HS-FS.
> 
> What about other SoC of the K3 architecture?
> Is the DRA829/J721e device will also switch to HS-FS by default?

I needed to double-check with the team, since I'm only intimately
involved with AM62/AM64/AM65 type devices. All the others are managed by
a different group in TI.

So based on what I found out here's the full context accross TI's K3
platform of devices and their associated TI EVMs / Starter Kits:

* All "Sitara"-brand SoCs (AM62x, AM64, AM65x) are HS-FS first
* All "Jacinto"-brand industrial SoCs (AM68, AM69 and AM67) are also HS-FS first
* All new "Jacinto"-brand automotive/other SoCs (J7AEN onwards) are HS-FS first
* All existing "Jacinto"-brand SoCs (TDA4, J721E, J7200, J721S2 and J784S4) are GP by default

So while there are still boards out there with GP silicon (last bullet)
those are probably not the typical target platforms for Buildroot, being
very complex and high-end multi-core SoCs, mostly used in automotive
applications. The one exception here that has more weight in my oppinion
is the current BeaglePlay board (AM62x-based), those also have GP devices
on those boards.

All this being being said, I stand by my previous comment that HS-FS
should be the default. As for the BeaglePlay board (which is a very nice
community board) and potentially selected Jacinto-based boards this
could potentially be handled with a dedicated defconfig or some other
Kconfig magic to enable a seamless and easy out of box experience.


--
Andreas Dannenberg
Texas Instruments Inc







> 
> From the u-boot k3 documentation, it's not clear witch device type is used by
> default across all k3 SoC. By default I was expecting the GP type for all the k3
> family (I was wrong).
> 
> [1]
> https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1210443/faq-am625-generating-sitara-am62x-am62ax-am64x-gp-device-bootable-mmc-sd-card-images-using-sdk-v8-6-and-yocto
> 
> [2]
> https://source.denx.de/u-boot/u-boot/-/blob/master/doc/board/ti/k3.rst?ref_type=heads&plain=1#L108
> 
> Best regards,
> Romain
> 
> > 
> > --
> > Andreas Dannenberg
> > Texas Instruments Inc
> > 
> > 
> >>
> >> -- 
> >> Alexander Sverdlin.
> >>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot@buildroot.org
> >> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig
  2024-02-17  3:13       ` Alexander Sverdlin
@ 2024-02-19 19:59         ` Andreas Dannenberg via buildroot
  0 siblings, 0 replies; 63+ messages in thread
From: Andreas Dannenberg via buildroot @ 2024-02-19 19:59 UTC (permalink / raw)
  To: Alexander Sverdlin; +Cc: Romain Naour, buildroot

Hi Alexander,

On Sat, Feb 17, 2024 at 04:13:16AM +0100, Alexander Sverdlin wrote:
> Hello Andreas,
> 
> On Fri, 2024-02-16 at 16:20 -0600, Andreas Dannenberg wrote:
> > On Fri, Feb 16, 2024 at 10:52:21PM +0100, Romain Naour wrote:
> > > Hello Andreas,
> > > 
> > > Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> > > > On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> > > > > This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> > > > > 
> > > > > This series start by adding U-boot binman support already submitted in the
> > > > > preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> > > > > [1], with small improvements.
> > > > > See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > > > 
> > > > Thanks Romain and Dario for all the work on this, and submitting this.
> > > > Will be spending some time over the next few days to see how I can help
> > > > out with this effort. I can already see many great improvements since
> > > > the last time I worked on AM62x/AM64x support last year.
> > > 
> > > Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
> > > helped on AM62x.
> > > 
> > > Maybe if you can also test on AM64x just to be sure the defconfig is working.
> > 
> > I'm planning on testing the entire series here pretty soon and will
> > provide feedback (I have access to any and all boards:)
> > 
> > One of the things I'm trying to assess is what's still missing vs. the
> > previous attempt I made upstreaming this. For example, AM62x graphics
> > isn't there yet (ti-rogue-km / ti-rogue-um).
> 
> maybe you could shed some light onto the AM62x situation. My conclusion
> is that since your initial buildroot BSP U-Boot has been switched
> to standard boot (CONFIG_BOOTSTD), refer to (U-Boot repo):
> 
> commit 355c0afcd4b7c8c442c4d03e07649c24194b8e06
> Author: Nishanth Menon <nm@ti.com>
> Date:   Fri Aug 25 13:02:52 2023 -0500
> 
>     configs: am62x_evm_a53_defconfig: Switch to bootstd
> 
> and
> 
> commit ab54d9b28d8578cc43b214d39009e7b1def797e4
> Author: Roger Quadros <rogerq@kernel.org>
> Date:   Thu Oct 5 16:06:41 2023 +0300
> 
>     board: ti: am62x: am62x.env: Fix boot_targets
>     
>     ti_mmc is not a valid boot_target for standard boot flow so
> 
> I suppose TI's BSP still uses older U-Boot and is still not affected.
> Do we need uEnv.txt now? Do you have an idea which distro Nishanth may
> have tested with BOOTSTD change?

I wasn't aware of those changes but I just looked at some of them. Looks
like most of the effort was targeted around the BeaglePlay board.

And this was tested with Debian. You can find one of Nishanth's boot
logs here [1]. It was referenced in the cover letter [2] of the U-Boot
series that introduced the 'Switch to bootstd' change you pointed out.

If this indeed causes some widespread breakage including Buildroot we
need to understand and think about how to best resolve this. Will dig
into this some more as I'm trying to get back into helping with the
Buildroot effort here.

Thanks, Andreas



[1] https://gist.github.com/nmenon/c74acb3a895053e05623e886df77c8fe
[2] https://lore.kernel.org/all/20230824031101.3460411-1-nm@ti.com/



> 
> -- 
> Alexander Sverdlin.
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package
  2024-02-19 19:42         ` Andreas Dannenberg via buildroot
@ 2024-02-19 22:27           ` Romain Naour
  0 siblings, 0 replies; 63+ messages in thread
From: Romain Naour @ 2024-02-19 22:27 UTC (permalink / raw)
  To: Andreas Dannenberg
  Cc: Xuanhao Shi, Anand Gadiyar, Alexander Sverdlin, buildroot

Hi Andreas,

Le 19/02/2024 à 20:42, Andreas Dannenberg a écrit :
> Hi Romain,
> 
> On Fri, Feb 16, 2024 at 10:38:42PM +0100, Romain Naour wrote:
>> Hello Andreas,
>>
>> Le 16/02/2024 à 21:06, Andreas Dannenberg a écrit :
>>> On Thu, Feb 15, 2024 at 11:20:50AM +0100, Alexander Sverdlin wrote:
>>>> Hi Romain,
>>>>
>>>> On Tue, 2024-02-13 at 18:28 +0100, Romain Naour wrote:
>>>>> -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
>>>>
>>>> another observation I made just now: previously BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP=y
>>>> was the default, which didn't boot on my HS-FS SoC.
>>>>
>>>> You patchset started out-of-the-box, which, I conclude, means, HS-FS is now the
>>>> default for AM62x. I'm not sure if this is a problem, though.
>>>
>>> HS-FS should be the default for all TI AM6x devices. This is our
>>> "production silicon" and what's used for (almost) all projects,
>>> especially new projects. This being said having support for GP device
>>> variants still is desirable for existing boards/projects, such as the
>>> current BeaglePlay boards (amongst earlier version of TI starter kit
>>> EVMs for AM6x).
>>
>> Thank you, I was not aware of this.
>>
>> I found your post in the TI forum about the recent switch from GP to HS-FS
>> device in Yocto [1].
>>
>> Currently existing am64/am62 defconfigs are still targeting GP devices but we
>> should add additional commits to do the switch to HS-FS.
>>
>> What about other SoC of the K3 architecture?
>> Is the DRA829/J721e device will also switch to HS-FS by default?
> 
> I needed to double-check with the team, since I'm only intimately
> involved with AM62/AM64/AM65 type devices. All the others are managed by
> a different group in TI.
> 
> So based on what I found out here's the full context accross TI's K3
> platform of devices and their associated TI EVMs / Starter Kits:
> 
> * All "Sitara"-brand SoCs (AM62x, AM64, AM65x) are HS-FS first
> * All "Jacinto"-brand industrial SoCs (AM68, AM69 and AM67) are also HS-FS first
> * All new "Jacinto"-brand automotive/other SoCs (J7AEN onwards) are HS-FS first
> * All existing "Jacinto"-brand SoCs (TDA4, J721E, J7200, J721S2 and J784S4) are GP by default
> 
> So while there are still boards out there with GP silicon (last bullet)
> those are probably not the typical target platforms for Buildroot, being
> very complex and high-end multi-core SoCs, mostly used in automotive
> applications. The one exception here that has more weight in my oppinion
> is the current BeaglePlay board (AM62x-based), those also have GP devices
> on those boards.

I'm curently working on a j721e SoC based custom board bringup involving IPC
communication with one DSP (C66x).

While it was possible to build the DSP firmware within Yocto (dunfell), it
required to package the TI-PDK to provide headers and libraries for the DSP
project. We endup by building the DSP firmware outside of Yocto (it would be the
same with Buildroot).

If the SoC is available and can run Linux, the the rootfs can be build by Buildroot.

And what about the Beagleboard-AI64 (J721e) ?

https://beagleboard.org/ai-64

> 
> All this being being said, I stand by my previous comment that HS-FS
> should be the default. As for the BeaglePlay board (which is a very nice
> community board) and potentially selected Jacinto-based boards this
> could potentially be handled with a dedicated defconfig or some other
> Kconfig magic to enable a seamless and easy out of box experience.

Patch welcome then :)

I don't have one but it would go hand in hand with my (old) beagleboard rev C2
(omap3530)!

Best regards,
Romain


> 
> 
> --
> Andreas Dannenberg
> Texas Instruments Inc
> 
> 
> 
> 
> 
> 
> 
>>
>> From the u-boot k3 documentation, it's not clear witch device type is used by
>> default across all k3 SoC. By default I was expecting the GP type for all the k3
>> family (I was wrong).
>>
>> [1]
>> https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1210443/faq-am625-generating-sitara-am62x-am62ax-am64x-gp-device-bootable-mmc-sd-card-images-using-sdk-v8-6-and-yocto
>>
>> [2]
>> https://source.denx.de/u-boot/u-boot/-/blob/master/doc/board/ti/k3.rst?ref_type=heads&plain=1#L108
>>
>> Best regards,
>> Romain
>>
>>>
>>> --
>>> Andreas Dannenberg
>>> Texas Instruments Inc
>>>
>>>
>>>>
>>>> -- 
>>>> Alexander Sverdlin.
>>>>
>>>> _______________________________________________
>>>> buildroot mailing list
>>>> buildroot@buildroot.org
>>>> https://lists.buildroot.org/mailman/listinfo/buildroot
>>

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

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

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

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 17:27 [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Romain Naour
2024-02-13 17:27 ` [Buildroot] [PATCH 01/21] DEVELOPERS: add Romain Naour for am574x_idk_defconfig Romain Naour
2024-02-13 17:27 ` [Buildroot] [PATCH 02/21] configs/ti_am62x_sk_defconfig: fix optee-os plateform Romain Naour
2024-02-13 18:45   ` Alexander Sverdlin
2024-02-13 17:27 ` [Buildroot] [PATCH 03/21] configs/ti_am64x_sk_defconfig: " Romain Naour
2024-02-13 18:56   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 04/21] package/python-attrs: add host variant Romain Naour
2024-02-13 17:28 ` [Buildroot] [PATCH 05/21] package/python-rpds-py: " Romain Naour
2024-02-13 17:28 ` [Buildroot] [PATCH 06/21] package/python-referencing: " Romain Naour
2024-02-13 17:28 ` [Buildroot] [PATCH 07/21] package/python-jsonschema-specifications: " Romain Naour
2024-02-13 17:28 ` [Buildroot] [PATCH 08/21] package/python-jsonschema: " Romain Naour
2024-02-13 17:28 ` [Buildroot] [PATCH 09/21] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Romain Naour
2024-02-14 10:58   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 10/21] boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option Romain Naour
2024-02-14 10:58   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 11/21] boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to BINARIES_DIR Romain Naour
2024-02-14 10:58   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 12/21] boot/ti-k3-boot-firmware: introduce BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX, AM62X, AM64X, AM65X} Romain Naour
2024-02-14 11:20   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 13/21] boot/uboot: use DM firmware name defined by ti-k3-boot-firmware package Romain Naour
2024-02-14 11:29   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 14/21] boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E Romain Naour
2024-02-13 20:23   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 15/21] boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options Romain Naour
2024-02-14 11:37   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 16/21] boot/uboot: enable TI K3 Device Manager (DM) for j721e Romain Naour
2024-02-14 10:58   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 17/21] boot/ti-k3-boot-firmware: bump to version 09.02.00.004 Romain Naour
2024-02-14 11:25   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 18/21] configs/ti_j721e_sk_defconfig: new defconfig Romain Naour
2024-02-14 12:06   ` Alexander Sverdlin
2024-02-16  1:19   ` Alexander Sverdlin
2024-02-16  1:44   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 19/21] configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman tool Romain Naour
2024-02-14 10:59   ` Alexander Sverdlin
2024-02-14 15:24     ` Romain Naour
2024-02-13 17:28 ` [Buildroot] [PATCH 20/21] configs/ti_am64x_sk_defconfig: " Romain Naour
2024-02-14 11:05   ` Alexander Sverdlin
2024-02-13 17:28 ` [Buildroot] [PATCH 21/21] boot/ti-k3-image-gen: remove package Romain Naour
2024-02-13 19:05   ` Alexander Sverdlin
2024-02-13 21:35     ` Romain Naour
2024-02-14 10:58   ` Alexander Sverdlin
2024-02-15 10:20   ` Alexander Sverdlin
2024-02-15 11:26     ` Romain Naour
2024-02-15 18:50       ` Alexander Sverdlin
2024-02-15 22:32         ` Romain Naour
2024-02-15 22:36           ` Alexander Sverdlin
2024-02-16 20:06     ` Andreas Dannenberg via buildroot
2024-02-16 21:38       ` Romain Naour
2024-02-19 19:42         ` Andreas Dannenberg via buildroot
2024-02-19 22:27           ` Romain Naour
2024-02-15 10:13 ` [Buildroot] [PATCH 00/21] Add ti_j721e_sk_defconfig Alexander Sverdlin
2024-02-15 11:23   ` Romain Naour
2024-02-15 21:14     ` Alexander Sverdlin
2024-02-15 22:13       ` Romain Naour
2024-02-15 22:22         ` Alexander Sverdlin
2024-02-16 20:13     ` Andreas Dannenberg via buildroot
2024-02-16 21:17       ` Romain Naour
2024-02-16 20:19 ` Andreas Dannenberg via buildroot
2024-02-16 21:52   ` Romain Naour
2024-02-16 22:20     ` Andreas Dannenberg via buildroot
2024-02-17  3:13       ` Alexander Sverdlin
2024-02-19 19:59         ` Andreas Dannenberg via buildroot

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.