All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices
@ 2024-03-30 16:02 Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 01/12] boot/ti-k3-r5-loader: drop hash for version 2022.10 Dario Binacchi
                   ` (14 more replies)
  0 siblings, 15 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

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

Furthermore, this version complete the series by updating the
ti_am64x_sk_defconfig as requested by Romain Naour:
https://patchwork.ozlabs.org/project/buildroot/patch/20240224205654.1546744-17-dario.binacchi@amarulasolutions.com/
I have successfully executed compilation tests for all possible combinations of platform and security type:
am62x -> GP, HS, HS-FS
am64x -> GP, HS, HS-FS

The AM62x HS-FS configuration has also been tested on the SK-AM62B-P1 board.

Version 9 has merged the first 10 patches into the mainline. This version
therefore contains the remaining patches to which the patch suggested by
Yann E. Morin has been added ("boot/ti-k3-r5-loader: drop hash for version
2022.10" [1]), and has removed the patch "boot/ti-k3-image-gen: remove
package", which is not strictly required by the series and does not cause
regressions.

[1] https://patchwork.ozlabs.org/project/buildroot/patch/20240304153253.732708-6-dario.binacchi@amarulasolutions.com

Dario Binacchi (12):
  boot/ti-k3-r5-loader: drop hash for version 2022.10
  boot/ti-k3-r5-loader: set binman environment
  boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
  package/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope
  package/ti-k3: disable HS-FS for AM65 SOC
  boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01
  configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18
  board/ti/am62x-sk: generalize post-build.sh
  board/ti/am62x-sk: move post-{build,image}.sh to board/ti/common/am6xx
  configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01
  configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18

 board/ti/am62x-sk/genimage.cfg            |  7 ++-
 board/ti/am64x-sk/genimage.cfg            |  7 ++-
 board/ti/common/am6xx/post-build.sh       | 58 +++++++++++++++++++++
 board/ti/common/am6xx/post-image.sh       | 11 ++++
 boot/ti-k3-image-gen/Config.in            | 61 ++---------------------
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   |  4 +-
 boot/ti-k3-r5-loader/Config.in            |  1 +
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  1 -
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 12 ++++-
 boot/uboot/Config.in                      | 23 +++++----
 boot/uboot/uboot.mk                       | 12 ++++-
 configs/ti_am62x_sk_defconfig             | 20 ++++----
 configs/ti_am64x_sk_defconfig             | 20 ++++----
 package/Config.in                         |  1 +
 package/ti-k3/Config.in                   | 61 +++++++++++++++++++++++
 package/ti-k3/ti-k3.mk                    |  7 +++
 16 files changed, 213 insertions(+), 93 deletions(-)
 create mode 100755 board/ti/common/am6xx/post-build.sh
 create mode 100755 board/ti/common/am6xx/post-image.sh
 create mode 100644 package/ti-k3/Config.in
 create mode 100644 package/ti-k3/ti-k3.mk

-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 01/12] boot/ti-k3-r5-loader: drop hash for version 2022.10
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 02/12] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

The patch removes the hash for version 2022.10 of ti-k3-r5-loader
(i. e. U-Boot), still allowing the ti_am6{2,4]x_sk_defconfig configurations
to properly validate the downloaded package with the appropriate hash.

Link: https://patchwork.ozlabs.org/project/buildroot/patch/20240304153253.732708-6-dario.binacchi@amarulasolutions.com
Suggested-by: Yann E. Morin <yann.morin.1998@free.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Added in v10

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash | 2 ++
 board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash | 2 ++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash                      | 1 -
 configs/ti_am62x_sk_defconfig                                  | 1 +
 configs/ti_am64x_sk_defconfig                                  | 1 +
 5 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100644 board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
 create mode 100644 board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash

diff --git a/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash b/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
new file mode 100644
index 000000000000..2a5c99c459f2
--- /dev/null
+++ b/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8  u-boot-2022.10.tar.bz2
diff --git a/board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash b/board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
new file mode 100644
index 000000000000..2a5c99c459f2
--- /dev/null
+++ b/board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8  u-boot-2022.10.tar.bz2
diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
index 279cb7763afd..fbe5d215409d 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
@@ -1,4 +1,3 @@
 # Locally computed:
-sha256  50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8  u-boot-2022.10.tar.bz2
 sha256  b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3  u-boot-2024.01.tar.bz2
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Licenses/gpl-2.0.txt
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index a129e216d25b..37df7a93f77a 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -1,5 +1,6 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
+BR2_GLOBAL_PATCH_DIR="board/ti/am62x-sk/patches"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg"
 BR2_LINUX_KERNEL=y
diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index 26195194c7d6..1ebdec68ac01 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -1,5 +1,6 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
+BR2_GLOBAL_PATCH_DIR="board/ti/am64x-sk/patches"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am64x-sk/genimage.cfg"
 BR2_LINUX_KERNEL=y
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 02/12] boot/ti-k3-r5-loader: set binman environment
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 01/12] boot/ti-k3-r5-loader: drop hash for version 2022.10 Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 03/12] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Dario Binacchi
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

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

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

The dependency of binman is not really easy to follow. First we have the
packages list from binman.rst [1] then we have to install additional python
modules [2]. Maybe in the future it will be necessary to add host-lzma and
host-lz4 in the dependencies list.

[1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/binman/binman.rst?plain=1#L377
[2] https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v6:
- Update the commit message adding the links of requirements.

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

Changes in v4:
- Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option

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

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 boot/ti-k3-r5-loader/Config.in          | 1 +
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

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

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

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

* [Buildroot] [PATCH v10 03/12] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 01/12] boot/ti-k3-r5-loader: drop hash for version 2022.10 Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 02/12] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 04/12] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

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

This 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].

Furthermore, the use of Binman no longer makes it necessary to set
`UBOOT_MAKE_OPTS += DM=...'. We had the explanation from [2]:

BINMAN_INDIRS is used to fetch the DM binary from <path to
ti-linux-firmware>/ti-dm/ and SYSFW binaries from <path to
ti-linux-firmware>/ti-sysfw/.

[1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot
[2] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html
Co-developed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v7:
- Replace ifneq ($(BR2_TARGET_UBOOT_USE_BINMAN),y) with
  ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),).
- Update the commit message

Changes in v6:
- BR2_TARGET_UBOOT_USE_BINMAN
- Binman tool is not specific to TI K3 platform, so add an option to specify
  the use of Binman in U-Boot.
- Add runtime dependencies
- Update commit message
- Add SOB and COB tags of Romain Naour

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

no changes since v1:

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 boot/uboot/Config.in | 11 +++++++++++
 boot/uboot/uboot.mk  | 12 +++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index beafb38930db..e6e7956adccb 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 dda606a88059..35a41d96a12d 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -187,10 +187,12 @@ 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_DEPENDENCIES += ti-k3-boot-firmware
+ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),)
+UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))
 UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
 endif
+endif
 
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
 UBOOT_DEPENDENCIES += opensbi
@@ -269,6 +271,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] 23+ messages in thread

* [Buildroot] [PATCH v10 04/12] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (2 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 03/12] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 05/12] package/ti-k3: disable HS-FS for AM65 SOC Dario Binacchi
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

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

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

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

---

Changes in v7:
- Revert change disabling BR2_PACKAGE_TI_K3_SECTYPE_HS_FS for
  BR2_PACKAGE_TI_K3_SOC_AM65X. The change is moved in a separate patch.

Changes in v6:
- Move BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME to ti-k3 (BR2_PACKAGE_TI_K3_DM).
- Disable BR2_PACKAGE_TI_K3_SECTYPE_HS_FS for BR2_PACKAGE_TI_K3_SOC_AM65X

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

Added in v4

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 boot/ti-k3-image-gen/Config.in          | 61 ++-----------------------
 boot/ti-k3-image-gen/ti-k3-image-gen.mk |  4 +-
 boot/uboot/Config.in                    | 12 +----
 boot/uboot/uboot.mk                     |  2 +-
 configs/ti_am62x_sk_defconfig           |  3 +-
 configs/ti_am64x_sk_defconfig           |  3 +-
 package/Config.in                       |  1 +
 package/ti-k3/Config.in                 | 59 ++++++++++++++++++++++++
 package/ti-k3/ti-k3.mk                  |  7 +++
 9 files changed, 79 insertions(+), 73 deletions(-)
 create mode 100644 package/ti-k3/Config.in
 create mode 100644 package/ti-k3/ti-k3.mk

diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in
index d76cef82e911..a57319f4be6d 100644
--- a/boot/ti-k3-image-gen/Config.in
+++ b/boot/ti-k3-image-gen/Config.in
@@ -13,65 +13,12 @@ config BR2_TARGET_TI_K3_IMAGE_GEN
 	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
 
 if BR2_TARGET_TI_K3_IMAGE_GEN
-choice
-	prompt "SoC family"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	bool "am62ax"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	bool "am62x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	bool "am64x"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-	bool "am65x"
-
-endchoice
-
-choice
-	prompt "Security type"
-	help
-	  The target SoC security type option for image gen.  Valid
-	  options are "gp" for General Purpose devices, "hs-fs" for
-	  High Security - Field Securable devices, or "hs" for High
-	  Security - Security Enforcing devices.  Note for all High
-	  Security device variants the TI_SECURE_DEV_PKG environmental
-	  variable must be defined at build time pointing to a valid
-	  core-secdev-k3 folder location, otherwise the build will
-	  fail, see
-	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	bool "gp"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	bool "hs-fs"
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
-	bool "hs"
-
-endchoice
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
-	string
-	default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "am62x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "am64x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "am65x"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
 
 config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
 	string
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
-	default "ti-fs"  if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
-	default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
-
-config BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE
-	string
-	default "gp"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_GP
-	default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS
-	default "hs"    if BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS
+	default "ti-fs"  if BR2_PACKAGE_TI_K3_SOC_AM62AX
+	default "ti-fs"  if BR2_PACKAGE_TI_K3_SOC_AM62X
+	default "ti-sci" if BR2_PACKAGE_TI_K3_SOC_AM64X
+	default "ti-sci" if BR2_PACKAGE_TI_K3_SOC_AM65X
 
 endif
diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
index 64be9a18f2c4..aca29bcf1bd4 100644
--- a/boot/ti-k3-image-gen/ti-k3-image-gen.mk
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
@@ -26,8 +26,8 @@ TI_K3_IMAGE_GEN_DEPENDENCIES = \
 	$(BR2_MAKE_HOST_DEPENDENCY)
 
 TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
+TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
 
 TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
 
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index e6e7956adccb..821854d08acc 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -244,21 +244,11 @@ config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
 	bool "U-Boot needs TI K3 Device Manager (DM)"
 	# We use the SoC selection defined for the ti-k3-image-gen
 	# package
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN
-	depends on BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX || BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
+	depends on BR2_PACKAGE_TI_K3_SOC_AM62AX || BR2_PACKAGE_TI_K3_SOC_AM62X
 	help
 	  Some TI K3 devices need the Device Manager (DM) firmware to
 	  be available for the U-Boot build.
 
-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 35a41d96a12d..7cd4636aa292 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -189,7 +189,7 @@ endif
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 UBOOT_DEPENDENCIES += ti-k3-boot-firmware
 ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),)
-UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME))
+UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_PACKAGE_TI_K3_DM_SOCNAME))
 UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f
 endif
 endif
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index 37df7a93f77a..19f7a7bd771a 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -12,6 +12,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_PACKAGE_TI_K3=y
+BR2_PACKAGE_TI_K3_SOC_AM62X=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
@@ -24,7 +26,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index 1ebdec68ac01..a19cf6f85572 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -12,6 +12,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_PACKAGE_TI_K3=y
+BR2_PACKAGE_TI_K3_SOC_AM64X=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
@@ -24,7 +26,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
diff --git a/package/Config.in b/package/Config.in
index 410fe0f4935a..15ee978b6aba 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -630,6 +630,7 @@ endmenu
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
+	source "package/ti-k3/Config.in"
 	source "package/ti-sgx-demos/Config.in"
 	source "package/ti-sgx-km/Config.in"
 	source "package/ti-sgx-um/Config.in"
diff --git a/package/ti-k3/Config.in b/package/ti-k3/Config.in
new file mode 100644
index 000000000000..2a51b1531487
--- /dev/null
+++ b/package/ti-k3/Config.in
@@ -0,0 +1,59 @@
+config BR2_PACKAGE_TI_K3
+	bool "TI K3"
+	help
+	  The TI K3 SOC specific selections.
+
+if BR2_PACKAGE_TI_K3
+
+choice
+	prompt "SoC family"
+
+config BR2_PACKAGE_TI_K3_SOC_AM62AX
+	bool "am62ax"
+
+config BR2_PACKAGE_TI_K3_SOC_AM62X
+	bool "am62x"
+
+config BR2_PACKAGE_TI_K3_SOC_AM64X
+	bool "am64x"
+
+config BR2_PACKAGE_TI_K3_SOC_AM65X
+	bool "am65x"
+
+endchoice
+
+choice
+	prompt "Security type"
+	help
+	  The target SoC security type option.
+
+config BR2_PACKAGE_TI_K3_SECTYPE_GP
+	bool "gp"
+
+config BR2_PACKAGE_TI_K3_SECTYPE_HS_FS
+	bool "hs-fs"
+
+config BR2_PACKAGE_TI_K3_SECTYPE_HS
+	bool "hs"
+
+endchoice
+
+config BR2_PACKAGE_TI_K3_SOC
+	string
+	default "am62ax" if BR2_PACKAGE_TI_K3_SOC_AM62AX
+	default "am62x"  if BR2_PACKAGE_TI_K3_SOC_AM62X
+	default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X
+	default "am65x"  if BR2_PACKAGE_TI_K3_SOC_AM65X
+
+config BR2_PACKAGE_TI_K3_SECTYPE
+	string
+	default "gp"    if BR2_PACKAGE_TI_K3_SECTYPE_GP
+	default "hs-fs" if BR2_PACKAGE_TI_K3_SECTYPE_HS_FS
+	default "hs"    if BR2_PACKAGE_TI_K3_SECTYPE_HS
+
+config BR2_PACKAGE_TI_K3_DM_SOCNAME
+	string
+	default "am62axx" if BR2_PACKAGE_TI_K3_SOC_AM62AX
+	default "am62xx"  if BR2_PACKAGE_TI_K3_SOC_AM62X
+
+endif
diff --git a/package/ti-k3/ti-k3.mk b/package/ti-k3/ti-k3.mk
new file mode 100644
index 000000000000..a2da29f5148c
--- /dev/null
+++ b/package/ti-k3/ti-k3.mk
@@ -0,0 +1,7 @@
+################################################################################
+#
+# ti-k3
+#
+################################################################################
+
+include $(sort $(wildcard package/ti-k3/*/*.mk))
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 05/12] package/ti-k3: disable HS-FS for AM65 SOC
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (3 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 04/12] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

It seems that some TI K3 SoC variant doesn't provide all SECTYPE.

For example: AM65 provide only GP or HS, there is no HS-FS.

This can be checked in meta-ti:

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

So BR2_PACKAGE_TI_K3_SECTYPE_HS_FS must not be selected if
BR2_PACKAGE_TI_K3_SOC_AM65X is used.

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

---

Added in v7

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 package/ti-k3/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/ti-k3/Config.in b/package/ti-k3/Config.in
index 2a51b1531487..b8545b7bca62 100644
--- a/package/ti-k3/Config.in
+++ b/package/ti-k3/Config.in
@@ -32,6 +32,7 @@ config BR2_PACKAGE_TI_K3_SECTYPE_GP
 
 config BR2_PACKAGE_TI_K3_SECTYPE_HS_FS
 	bool "hs-fs"
+	depends on !BR2_PACKAGE_TI_K3_SOC_AM65X
 
 config BR2_PACKAGE_TI_K3_SECTYPE_HS
 	bool "hs"
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (4 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 05/12] package/ti-k3: disable HS-FS for AM65 SOC Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-04-03 13:05   ` Michael Walle
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 07/12] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

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

The use of `find' command is justified by the need to use a regex
expression to select the correct file. This is not possible with a
simple `cp' command.

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

---

Changes in v8:
- Use the `find' command in pipe with the `cp' command.

Changes in v6:
- Replace `find' command with `cp' one.

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

Added in v4

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
index fdb058f3b72a..9a05d005067a 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -70,8 +70,12 @@ define TI_K3_R5_LOADER_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
 
+TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
+TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
+
 define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
 	cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+	cd $(@D); find ./ -type f -regex "\.\/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-[^-]*..bin" -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
 endef
 
 $(eval $(kconfig-package))
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 07/12] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (5 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 08/12] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

The 2024.01 version of U-Boot for the am62x-sk board has introduced two
major changes:
- The device tree k3-am625-sk.dtb is no longer searched in /boot, but in
  /boot/dtb/ti. Hence, the disabling of BR2_LINUX_KERNEL_INSTALL_TARGET
  and the use of extlinux.conf for the proper loading of the device tree.
  Furthermore, the parameter BR2_ROOTFS_POST_SCRIPT_ARGS was used to
  auto-generate the extlinux.conf file so that developers can change the
  kernel loading options by modifying the .config.
- U-Boot is capable of building tiboot3.bin using Binman. So it's no longer
  necessary to use custom tools like ti-k3-image-gen.

Tested on SK-AM62B-P1.

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

---

Changes in v7:
- Add devicetree k3-am625-sk.dtb to extlinux.conf
- Improve error messages in post-build.sh script

Changes in v6:
- Enable BR2_TARGET_UBOOT_USE_BINMAN option

Changes in v5:
- Update commit message.

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

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

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 board/ti/am62x-sk/genimage.cfg                |  7 ++-
 .../ti-k3-r5-loader/ti-k3-r5-loader.hash      |  2 -
 board/ti/am62x-sk/post-build.sh               | 54 +++++++++++++++++++
 board/ti/am62x-sk/post-image.sh               |  5 ++
 configs/ti_am62x_sk_defconfig                 | 14 ++---
 5 files changed, 72 insertions(+), 10 deletions(-)
 delete mode 100644 board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
 create mode 100755 board/ti/am62x-sk/post-build.sh
 create mode 100755 board/ti/am62x-sk/post-image.sh

diff --git a/board/ti/am62x-sk/genimage.cfg b/board/ti/am62x-sk/genimage.cfg
index 26304fe98f99..398209f4d831 100644
--- a/board/ti/am62x-sk/genimage.cfg
+++ b/board/ti/am62x-sk/genimage.cfg
@@ -4,10 +4,15 @@ image boot.vfat {
 			"tiboot3.bin",
 			"tispl.bin",
 			"u-boot.img",
+			"k3-am625-sk.dtb",
+			"Image"
+		}
+		file extlinux/extlinux.conf {
+			image = extlinux.conf
 		}
 	}
 
-	size = 16M
+	size = 64M
 }
 
 image sdcard.img {
diff --git a/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash b/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
deleted file mode 100644
index 2a5c99c459f2..000000000000
--- a/board/ti/am62x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
+++ /dev/null
@@ -1,2 +0,0 @@
-# Locally computed:
-sha256  50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8  u-boot-2022.10.tar.bz2
diff --git a/board/ti/am62x-sk/post-build.sh b/board/ti/am62x-sk/post-build.sh
new file mode 100755
index 000000000000..4f19f4d6cf91
--- /dev/null
+++ b/board/ti/am62x-sk/post-build.sh
@@ -0,0 +1,54 @@
+#!/bin/sh -x
+
+# genimage will need to find the extlinux.conf
+# in the binaries directory
+
+die() {
+  cat <<EOF >&2
+Error: $@
+
+Usage: ${0} -c <console> -r <root> [-x <extra-args>]
+EOF
+  exit 1
+}
+
+o='c:d:r:x:'
+O='console:,devicetree:,root:,extra-args:'
+opts="$(getopt -n "${0##*/}" -o "${o}" -l "${O}" -- "${@}")"
+eval set -- "${opts}"
+while [ ${#} -gt 0 ]; do
+    case "${1}" in
+    (-c|--console)
+        CONSOLE="${2}"; shift 2
+        ;;
+    (-d|--devicetree)
+        DEVICETREE="${2}"; shift 2
+        ;;
+    (-r|--root)
+        ROOT="${2}"; shift 2
+        ;;
+    (-x|--extra-args)
+        EXTRA_ARGS="${2}"; shift 2
+        ;;
+    (--)
+        shift 1; break
+        ;;
+    esac
+done
+
+[ -n "${CONSOLE}" ] || die "Missing \`console' argument"
+[ -n "${DEVICETREE}" ] || die "Missing \`devicetree' argument"
+[ -n "${ROOT}" ] || die "Missing \`root' argument"
+append="console=${CONSOLE} root=${ROOT} rw rootfstype=ext4 rootwait"
+if [ -n "${EXTRA_ARGS}" ]; then
+    append="${append} ${EXTRA_ARGS}"
+fi
+
+mkdir -p "${BINARIES_DIR}"
+cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
+	label am62x-sk-buildroot
+	  kernel /Image
+	  fdtdir /
+	  devicetree /${DEVICETREE}
+	  append ${append}
+	__HEADER_EOF
diff --git a/board/ti/am62x-sk/post-image.sh b/board/ti/am62x-sk/post-image.sh
new file mode 100755
index 000000000000..34f732c091ad
--- /dev/null
+++ b/board/ti/am62x-sk/post-image.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -x
+
+BOARD_DIR="$(dirname "$0")"
+
+support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index 19f7a7bd771a..7d9912024a16 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -1,15 +1,14 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
-BR2_GLOBAL_PATCH_DIR="board/ti/am62x-sk/patches"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
-BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
 BR2_PACKAGE_TI_K3=y
@@ -25,20 +24,21 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
 BR2_TARGET_OPTEE_OS=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"
-BR2_TARGET_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_BOOT_FIRMWARE=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
-BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
 BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_evm_a53"
 BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_NEEDS_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] 23+ messages in thread

* [Buildroot] [PATCH v10 08/12] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (6 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 07/12] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 09/12] board/ti/am62x-sk: generalize post-build.sh Dario Binacchi
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

Tested on SK-AM62B-P1.

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

---

Changes in v8
- Bump to 6.6.18 from 6.6.17
- Update commit message

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

Changes in v4
- Add BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6 to ti_am62x_sk_defconfig.

no changes since v1

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 configs/ti_am62x_sk_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index 7d9912024a16..877f88899af9 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -1,11 +1,11 @@
 BR2_aarch64=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.18"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 09/12] board/ti/am62x-sk: generalize post-build.sh
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (7 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 08/12] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 10/12] board/ti/am62x-sk: move post-{build, image}.sh to board/ti/common/am6xx Dario Binacchi
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

Removing any explicit reference to the ti_am62x_sk_defconfig
configuration, the script can also be used by other configurations or at
least by ti_am64x_sk_defconfig.

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

---

Added in v8

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 board/ti/am62x-sk/post-build.sh | 10 +++++++---
 configs/ti_am62x_sk_defconfig   |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/ti/am62x-sk/post-build.sh b/board/ti/am62x-sk/post-build.sh
index 4f19f4d6cf91..d066e28fd0d5 100755
--- a/board/ti/am62x-sk/post-build.sh
+++ b/board/ti/am62x-sk/post-build.sh
@@ -12,8 +12,8 @@ EOF
   exit 1
 }
 
-o='c:d:r:x:'
-O='console:,devicetree:,root:,extra-args:'
+o='c:d:l:r:x:'
+O='console:,devicetree:,label:,root:,extra-args:'
 opts="$(getopt -n "${0##*/}" -o "${o}" -l "${O}" -- "${@}")"
 eval set -- "${opts}"
 while [ ${#} -gt 0 ]; do
@@ -24,6 +24,9 @@ while [ ${#} -gt 0 ]; do
     (-d|--devicetree)
         DEVICETREE="${2}"; shift 2
         ;;
+    (-l|--label)
+        LABEL="${2}"; shift 2
+        ;;
     (-r|--root)
         ROOT="${2}"; shift 2
         ;;
@@ -38,6 +41,7 @@ done
 
 [ -n "${CONSOLE}" ] || die "Missing \`console' argument"
 [ -n "${DEVICETREE}" ] || die "Missing \`devicetree' argument"
+[ -n "${LABEL}" ] || die "Missing \`label' argument"
 [ -n "${ROOT}" ] || die "Missing \`root' argument"
 append="console=${CONSOLE} root=${ROOT} rw rootfstype=ext4 rootwait"
 if [ -n "${EXTRA_ARGS}" ]; then
@@ -46,7 +50,7 @@ fi
 
 mkdir -p "${BINARIES_DIR}"
 cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
-	label am62x-sk-buildroot
+	label ${LABEL}
 	  kernel /Image
 	  fdtdir /
 	  devicetree /${DEVICETREE}
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index 877f88899af9..bd294bb712ee 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -2,7 +2,7 @@ BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -l am62x-sk-buildroot -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.18"
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 10/12] board/ti/am62x-sk: move post-{build, image}.sh to board/ti/common/am6xx
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (8 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 09/12] board/ti/am62x-sk: generalize post-build.sh Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 11/12] configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

The patch makes it clear that the moved scripts can be used by the
am6{2,4}x platforms.

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

---

Added in v8

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 board/ti/am62x-sk/post-image.sh                   |  5 -----
 board/ti/{am62x-sk => common/am6xx}/post-build.sh |  0
 board/ti/common/am6xx/post-image.sh               | 11 +++++++++++
 configs/ti_am62x_sk_defconfig                     |  4 ++--
 4 files changed, 13 insertions(+), 7 deletions(-)
 delete mode 100755 board/ti/am62x-sk/post-image.sh
 rename board/ti/{am62x-sk => common/am6xx}/post-build.sh (100%)
 create mode 100755 board/ti/common/am6xx/post-image.sh

diff --git a/board/ti/am62x-sk/post-image.sh b/board/ti/am62x-sk/post-image.sh
deleted file mode 100755
index 34f732c091ad..000000000000
--- a/board/ti/am62x-sk/post-image.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh -x
-
-BOARD_DIR="$(dirname "$0")"
-
-support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
diff --git a/board/ti/am62x-sk/post-build.sh b/board/ti/common/am6xx/post-build.sh
similarity index 100%
rename from board/ti/am62x-sk/post-build.sh
rename to board/ti/common/am6xx/post-build.sh
diff --git a/board/ti/common/am6xx/post-image.sh b/board/ti/common/am6xx/post-image.sh
new file mode 100755
index 000000000000..917ca238aa78
--- /dev/null
+++ b/board/ti/common/am6xx/post-image.sh
@@ -0,0 +1,11 @@
+#!/bin/sh -x
+
+board_dir() {
+    if grep -Eq "^BR2_DEFCONFIG=.*/ti_am64x_sk_defconfig\"$" "${BR2_CONFIG}"; then
+        echo "am64x-sk"
+    else
+        echo "am62x-sk"
+    fi
+}
+
+support/scripts/genimage.sh -c "board/ti/$(board_dir)/genimage.cfg"
diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig
index bd294bb712ee..310ba6fb6453 100644
--- a/configs/ti_am62x_sk_defconfig
+++ b/configs/ti_am62x_sk_defconfig
@@ -1,7 +1,7 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/common/am6xx/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/common/am6xx/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -l am62x-sk-buildroot -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 11/12] configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (9 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 10/12] board/ti/am62x-sk: move post-{build, image}.sh to board/ti/common/am6xx Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 12/12] configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

The 2024.01 version of U-Boot for the am64x-sk board has introduced two
major changes:
- The device tree k3-am642-sk.dtb is no longer searched in /boot, but in
  /boot/dtb/ti. Hence, the disabling of BR2_LINUX_KERNEL_INSTALL_TARGET
  and the use of extlinux.conf for the proper loading of the device tree.
  Furthermore, the parameter BR2_ROOTFS_POST_SCRIPT_ARGS was used to
  auto-generate the extlinux.conf file so that developers can change the
  kernel loading options by modifying the .config.
- U-Boot is capable of building tiboot3.bin using Binman. So it's no longer
  necessary to use custom tools like ti-k3-image-gen.

Furthermore, ti-k3-r5-loader creates the following tiboot3.bin files:
- GP    -> tiboot3_am64x-gp-evm.bin
- HS    -> tiboot3_am64x_sr2-hs-evm.bin
- HS_FS -> tiboot3_am64x_sr2-hs-fs-evm.bin

The patch also allows you to identify the correct file based on the
SEC_TYPE option.

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

---

Changes in v9:
- squashed with patch [v8,20/23] "package/ti-k3: fix BR2_PACKAGE_TI_K3_SOC
  setting for am64x SOC"
- Update the commit message

Added in v8

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 board/ti/am64x-sk/genimage.cfg                     |  7 ++++++-
 .../patches/ti-k3-r5-loader/ti-k3-r5-loader.hash   |  2 --
 configs/ti_am64x_sk_defconfig                      | 14 +++++++-------
 package/ti-k3/Config.in                            |  3 ++-
 4 files changed, 15 insertions(+), 11 deletions(-)
 delete mode 100644 board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash

diff --git a/board/ti/am64x-sk/genimage.cfg b/board/ti/am64x-sk/genimage.cfg
index 26304fe98f99..88dff8fe23dc 100644
--- a/board/ti/am64x-sk/genimage.cfg
+++ b/board/ti/am64x-sk/genimage.cfg
@@ -4,10 +4,15 @@ image boot.vfat {
 			"tiboot3.bin",
 			"tispl.bin",
 			"u-boot.img",
+			"k3-am642-sk.dtb",
+			"Image"
+		}
+		file extlinux/extlinux.conf {
+			image = extlinux.conf
 		}
 	}
 
-	size = 16M
+	size = 64M
 }
 
 image sdcard.img {
diff --git a/board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash b/board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
deleted file mode 100644
index 2a5c99c459f2..000000000000
--- a/board/ti/am64x-sk/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash
+++ /dev/null
@@ -1,2 +0,0 @@
-# Locally computed:
-sha256  50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8  u-boot-2022.10.tar.bz2
diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index a19cf6f85572..9b92b645dd21 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -1,15 +1,14 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
-BR2_GLOBAL_PATCH_DIR="board/ti/am64x-sk/patches"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am64x-sk/genimage.cfg"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/common/am6xx/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/common/am6xx/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am642-sk.dtb -l am64x-sk-buildroot -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
-BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_PACKAGE_LINUX_FIRMWARE=y
 BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
 BR2_PACKAGE_TI_K3=y
@@ -25,19 +24,20 @@ 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_BOOT_FIRMWARE=y
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
-BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.01"
 BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="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
diff --git a/package/ti-k3/Config.in b/package/ti-k3/Config.in
index b8545b7bca62..9c61f8880a15 100644
--- a/package/ti-k3/Config.in
+++ b/package/ti-k3/Config.in
@@ -43,7 +43,8 @@ config BR2_PACKAGE_TI_K3_SOC
 	string
 	default "am62ax" if BR2_PACKAGE_TI_K3_SOC_AM62AX
 	default "am62x"  if BR2_PACKAGE_TI_K3_SOC_AM62X
-	default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X
+	default "am64x"  if BR2_PACKAGE_TI_K3_SOC_AM64X && BR2_PACKAGE_TI_K3_SECTYPE_GP
+	default "am64x_sr2"  if BR2_PACKAGE_TI_K3_SOC_AM64X && !BR2_PACKAGE_TI_K3_SECTYPE_GP
 	default "am65x"  if BR2_PACKAGE_TI_K3_SOC_AM65X
 
 config BR2_PACKAGE_TI_K3_SECTYPE
-- 
2.43.0

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

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

* [Buildroot] [PATCH v10 12/12] configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (10 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 11/12] configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
@ 2024-03-30 16:02 ` Dario Binacchi
  2024-04-02 14:50 ` [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Gero Schwäricke via buildroot
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 23+ messages in thread
From: Dario Binacchi @ 2024-03-30 16:02 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, michael, linux-amarula, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, Romain Naour,
	Andreas Dannenberg, Alexander Sverdlin, Yann E . Morin, bryce,
	Anand Gadiyar

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

---

Added in v8

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 configs/ti_am64x_sk_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configs/ti_am64x_sk_defconfig b/configs/ti_am64x_sk_defconfig
index 9b92b645dd21..6c1b5d824a7d 100644
--- a/configs/ti_am64x_sk_defconfig
+++ b/configs/ti_am64x_sk_defconfig
@@ -1,11 +1,11 @@
 BR2_aarch64=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/common/am6xx/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/common/am6xx/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am642-sk.dtb -l am64x-sk-buildroot -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.18"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
-- 
2.43.0

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

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

* Re: [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (11 preceding siblings ...)
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 12/12] configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
@ 2024-04-02 14:50 ` Gero Schwäricke via buildroot
  2024-04-02 16:20   ` Michael Nazzareno Trimarchi
  2024-04-02 21:03 ` Bryan Brattlof via buildroot
  2024-04-03  9:17 ` Romain Naour
  14 siblings, 1 reply; 23+ messages in thread
From: Gero Schwäricke via buildroot @ 2024-04-02 14:50 UTC (permalink / raw)
  To: buildroot

Tests performed:

* compiled ti_am62x_sk_defconfig
  * success
* booted on AM62x SK EVM (E3)
  * success
  * no obvious errors in dmesg

Tested-by: Gero Schwäricke <gero.schwaericke@grandcentrix.net>


-- 



–––


grandcentrix GmbH | A Vodafone Company · Holzmarkt 1 · 50676 
*Cologne* | Phoenixseestrasse 18 · 44263 *Dortmund* · Germany
| in 
<https://www.linkedin.com/company/grandcentrix> | phone: +49-221-677-860-0 
| email: hello@grandcentrix.net <mailto:hello@grandcentrix.net>


grandcentrix cares about privacy 
<https://grandcentrix.net/de/pages/privacymail/>

Amtsgericht Köln | HRB  
70119 | Geschäftsführer: M. Krömer,  R. Hänel | USt.-IdNr.: DE266333969

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

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

* Re: [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices
  2024-04-02 14:50 ` [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Gero Schwäricke via buildroot
@ 2024-04-02 16:20   ` Michael Nazzareno Trimarchi
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Nazzareno Trimarchi @ 2024-04-02 16:20 UTC (permalink / raw)
  To: Gero Schwäricke, buildroot, Dario Binacchi
  Cc: Romain Naour, Alexander Sverdlin, Yann E. MORIN,
	Andreas Dannenberg

Hi

On Tue, Apr 2, 2024 at 4:50 PM Gero Schwäricke via buildroot
<buildroot@buildroot.org> wrote:
>
> Tests performed:
>
> * compiled ti_am62x_sk_defconfig
>   * success
> * booted on AM62x SK EVM (E3)
>   * success
>   * no obvious errors in dmesg
>
> Tested-by: Gero Schwäricke <gero.schwaericke@grandcentrix.net>
>

Thank you to test them and for all the other people that are working
to get those patches in

Michael

>
> --
>
>
>
> –––
>
>
> grandcentrix GmbH | A Vodafone Company · Holzmarkt 1 · 50676
> *Cologne* | Phoenixseestrasse 18 · 44263 *Dortmund* · Germany
> | in
> <https://www.linkedin.com/company/grandcentrix> | phone: +49-221-677-860-0
> | email: hello@grandcentrix.net <mailto:hello@grandcentrix.net>
>
>
> grandcentrix cares about privacy
> <https://grandcentrix.net/de/pages/privacymail/>
>
> Amtsgericht Köln | HRB
> 70119 | Geschäftsführer: M. Krömer,  R. Hänel | USt.-IdNr.: DE266333969
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (12 preceding siblings ...)
  2024-04-02 14:50 ` [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Gero Schwäricke via buildroot
@ 2024-04-02 21:03 ` Bryan Brattlof via buildroot
  2024-04-03  9:17 ` Romain Naour
  14 siblings, 0 replies; 23+ messages in thread
From: Bryan Brattlof via buildroot @ 2024-04-02 21:03 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: Alexander Sverdlin, Anand Gadiyar, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, buildroot, Romain Naour,
	michael, linux-amarula, Yann E . Morin, bryce, Andreas Dannenberg

On March 30, 2024 thus sayeth Dario Binacchi:
> The SK-AM62B-P1 is the newest version of SK-AM62 which includes
> high-security field-securable (HS-FS) silicon to optionally customize keys
> and encryption for security applications.
> This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option,
> which, however, was buggy. This series fixes the errors and bumps the Linux
> kernel and U-Boot required for such a new device.
> 
> Furthermore, this version complete the series by updating the
> ti_am64x_sk_defconfig as requested by Romain Naour:
> https://patchwork.ozlabs.org/project/buildroot/patch/20240224205654.1546744-17-dario.binacchi@amarulasolutions.com/
> I have successfully executed compilation tests for all possible combinations of platform and security type:
> am62x -> GP, HS, HS-FS
> am64x -> GP, HS, HS-FS
> 
> The AM62x HS-FS configuration has also been tested on the SK-AM62B-P1 board.
> 
> Version 9 has merged the first 10 patches into the mainline. This version
> therefore contains the remaining patches to which the patch suggested by
> Yann E. Morin has been added ("boot/ti-k3-r5-loader: drop hash for version
> 2022.10" [1]), and has removed the patch "boot/ti-k3-image-gen: remove
> package", which is not strictly required by the series and does not cause
> regressions.
> 
> [1] https://patchwork.ozlabs.org/project/buildroot/patch/20240304153253.732708-6-dario.binacchi@amarulasolutions.com
> 
> Dario Binacchi (12):
>   boot/ti-k3-r5-loader: drop hash for version 2022.10
>   boot/ti-k3-r5-loader: set binman environment
>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>   package/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope
>   package/ti-k3: disable HS-FS for AM65 SOC
>   boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
>   configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01
>   configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18
>   board/ti/am62x-sk: generalize post-build.sh
>   board/ti/am62x-sk: move post-{build,image}.sh to board/ti/common/am6xx
>   configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01
>   configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18

Tested-by: Bryan Brattlof <bb@ti.com>

I built and tested these on the HS-FS and GP variants of AM62x as well 
as the GP variant of the AM64x

These look great to me. Thanks for the dedication getting these merged.

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

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

* Re: [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices
  2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
                   ` (13 preceding siblings ...)
  2024-04-02 21:03 ` Bryan Brattlof via buildroot
@ 2024-04-03  9:17 ` Romain Naour
  2024-04-03 12:52   ` Michael Walle via buildroot
  14 siblings, 1 reply; 23+ messages in thread
From: Romain Naour @ 2024-04-03  9:17 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: michael, linux-amarula, Asaf Kahlon, Xuanhao Shi, James Hilliard,
	Thomas Petazzoni, Andreas Dannenberg, Alexander Sverdlin,
	Yann E . Morin, bryce, Anand Gadiyar

Hello Dario, All,

Le 30/03/2024 à 17:02, Dario Binacchi a écrit :
> The SK-AM62B-P1 is the newest version of SK-AM62 which includes
> high-security field-securable (HS-FS) silicon to optionally customize keys
> and encryption for security applications.
> This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option,
> which, however, was buggy. This series fixes the errors and bumps the Linux
> kernel and U-Boot required for such a new device.
> 
> Furthermore, this version complete the series by updating the
> ti_am64x_sk_defconfig as requested by Romain Naour:
> https://patchwork.ozlabs.org/project/buildroot/patch/20240224205654.1546744-17-dario.binacchi@amarulasolutions.com/
> I have successfully executed compilation tests for all possible combinations of platform and security type:
> am62x -> GP, HS, HS-FS
> am64x -> GP, HS, HS-FS
> 
> The AM62x HS-FS configuration has also been tested on the SK-AM62B-P1 board.
> 
> Version 9 has merged the first 10 patches into the mainline. This version
> therefore contains the remaining patches to which the patch suggested by
> Yann E. Morin has been added ("boot/ti-k3-r5-loader: drop hash for version
> 2022.10" [1]), and has removed the patch "boot/ti-k3-image-gen: remove
> package", which is not strictly required by the series and does not cause
> regressions.

Thanks for this new iteration (and thanks to all tester).

I would like to rework this series to improve and complete the TI K3 SoC support
post a V11.

We are confident that the BSP (ti-k3-boot-firmware, u-boot 2024.01 with binman
and kernel 6.1.18) is working well on AM62, AM64 and even j721e (with another
series on top).

Best regards,
Romain

> 
> [1] https://patchwork.ozlabs.org/project/buildroot/patch/20240304153253.732708-6-dario.binacchi@amarulasolutions.com
> 
> Dario Binacchi (12):
>   boot/ti-k3-r5-loader: drop hash for version 2022.10
>   boot/ti-k3-r5-loader: set binman environment
>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>   package/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope
>   package/ti-k3: disable HS-FS for AM65 SOC
>   boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
>   configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01
>   configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18
>   board/ti/am62x-sk: generalize post-build.sh
>   board/ti/am62x-sk: move post-{build,image}.sh to board/ti/common/am6xx
>   configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01
>   configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18
> 
>  board/ti/am62x-sk/genimage.cfg            |  7 ++-
>  board/ti/am64x-sk/genimage.cfg            |  7 ++-
>  board/ti/common/am6xx/post-build.sh       | 58 +++++++++++++++++++++
>  board/ti/common/am6xx/post-image.sh       | 11 ++++
>  boot/ti-k3-image-gen/Config.in            | 61 ++---------------------
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk   |  4 +-
>  boot/ti-k3-r5-loader/Config.in            |  1 +
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  1 -
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 12 ++++-
>  boot/uboot/Config.in                      | 23 +++++----
>  boot/uboot/uboot.mk                       | 12 ++++-
>  configs/ti_am62x_sk_defconfig             | 20 ++++----
>  configs/ti_am64x_sk_defconfig             | 20 ++++----
>  package/Config.in                         |  1 +
>  package/ti-k3/Config.in                   | 61 +++++++++++++++++++++++
>  package/ti-k3/ti-k3.mk                    |  7 +++
>  16 files changed, 213 insertions(+), 93 deletions(-)
>  create mode 100755 board/ti/common/am6xx/post-build.sh
>  create mode 100755 board/ti/common/am6xx/post-image.sh
>  create mode 100644 package/ti-k3/Config.in
>  create mode 100644 package/ti-k3/ti-k3.mk
> 

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

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

* Re: [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices
  2024-04-03  9:17 ` Romain Naour
@ 2024-04-03 12:52   ` Michael Walle via buildroot
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Walle via buildroot @ 2024-04-03 12:52 UTC (permalink / raw)
  To: Romain Naour, Dario Binacchi, buildroot
  Cc: Alexander Sverdlin, Anand Gadiyar, Asaf Kahlon, Xuanhao Shi,
	James Hilliard, Thomas Petazzoni, michael, linux-amarula,
	Yann E . Morin, bryce, Andreas Dannenberg


[-- Attachment #1.1: Type: text/plain, Size: 2186 bytes --]

Hi Romain and all,

On Wed Apr 3, 2024 at 11:17 AM CEST, Romain Naour wrote:
> Le 30/03/2024 à 17:02, Dario Binacchi a écrit :
> > The SK-AM62B-P1 is the newest version of SK-AM62 which includes
> > high-security field-securable (HS-FS) silicon to optionally customize keys
> > and encryption for security applications.
> > This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option,
> > which, however, was buggy. This series fixes the errors and bumps the Linux
> > kernel and U-Boot required for such a new device.
> > 
> > Furthermore, this version complete the series by updating the
> > ti_am64x_sk_defconfig as requested by Romain Naour:
> > https://patchwork.ozlabs.org/project/buildroot/patch/20240224205654.1546744-17-dario.binacchi@amarulasolutions.com/
> > I have successfully executed compilation tests for all possible combinations of platform and security type:
> > am62x -> GP, HS, HS-FS
> > am64x -> GP, HS, HS-FS
> > 
> > The AM62x HS-FS configuration has also been tested on the SK-AM62B-P1 board.
> > 
> > Version 9 has merged the first 10 patches into the mainline. This version
> > therefore contains the remaining patches to which the patch suggested by
> > Yann E. Morin has been added ("boot/ti-k3-r5-loader: drop hash for version
> > 2022.10" [1]), and has removed the patch "boot/ti-k3-image-gen: remove
> > package", which is not strictly required by the series and does not cause
> > regressions.
>
> Thanks for this new iteration (and thanks to all tester).
>
> I would like to rework this series to improve and complete the TI K3 SoC support
> post a V11.

Great, thanks!

> We are confident that the BSP (ti-k3-boot-firmware, u-boot 2024.01 with binman
> and kernel 6.1.18) is working well on AM62, AM64 and even j721e (with another
> series on top).

FWIW, we are currently testing this on j722s (although there is no
u-boot support in mainline yet) and it is working almost fine, with
some minor issues for now, see my previous mail on 6/12.
Of course we are using more up to date versions of all the involved
components, but that seems to be just a version bump in the future.

-michael

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

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

* Re: [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-03-30 16:02 ` [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
@ 2024-04-03 13:05   ` Michael Walle
  2024-04-03 13:15     ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Walle @ 2024-04-03 13:05 UTC (permalink / raw)
  To: Dario Binacchi, buildroot
  Cc: Alexander Sverdlin, Anand Gadiyar, heiko.thiery, Asaf Kahlon,
	Xuanhao Shi, James Hilliard, Thomas Petazzoni, Romain Naour,
	michael, linux-amarula, Yann E . Morin, bryce, Andreas Dannenberg


[-- Attachment #1.1: Type: text/plain, Size: 2495 bytes --]

[resend because mail got bounced on the ML, sorry]

Hi Dario,

On Sat Mar 30, 2024 at 5:02 PM CET, Dario Binacchi wrote:
> Recent versions of U-Boot are capable of building tiboot3.bin using
> Binman. In this case, let's copy it to the binaries directory.
>
> The use of `find' command is justified by the need to use a regex
> expression to select the correct file. This is not possible with a
> simple `cp' command.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>
> ---
>
> Changes in v8:
> - Use the `find' command in pipe with the `cp' command.
>
> Changes in v6:
> - Replace `find' command with `cp' one.
>
> Changes in v5:
> - Replace tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin with
>   tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
>
> Added in v4
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> index fdb058f3b72a..9a05d005067a 100644
> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -70,8 +70,12 @@ define TI_K3_R5_LOADER_BUILD_CMDS
>  	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
>  endef
>  
> +TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
> +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> +
>  define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
>  	cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> +	cd $(@D); find ./ -type f -regex "\.\/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-[^-]*..bin" -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;

The filename should *not* be hardcoded to look like
<soc>-<sectype>.bin. This is just an artifact how TI is naming their
files in *their* u-boot binman files. Instead this should just be a
Kconfig variable (maybe K3_R5_LOADER_FILENAME?) which can be set by
the user/board config and which defaults to "tiboot3.bin".
"tiboot3.bin" is the filename which is used by the ROM in filesystem
boot mode and for which u-boot is already creating a symlink.
So this will then just be another simple "cp".

On a side node, we also found out that the "find . -regex" is rather
fragile in the sense that it might not copy anything at all without
generating an error.

-michael

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

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

* Re: [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-04-03 13:05   ` Michael Walle
@ 2024-04-03 13:15     ` Michael Nazzareno Trimarchi
  2024-04-03 13:24       ` Michael Walle
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Nazzareno Trimarchi @ 2024-04-03 13:15 UTC (permalink / raw)
  To: Michael Walle
  Cc: Alexander Sverdlin, Anand Gadiyar, heiko.thiery, Asaf Kahlon,
	Xuanhao Shi, James Hilliard, Thomas Petazzoni, buildroot,
	Romain Naour, Dario Binacchi, linux-amarula, Yann E . Morin,
	bryce, Andreas Dannenberg

Hi Michael

On Wed, Apr 3, 2024 at 3:05 PM Michael Walle <mwalle@kernel.org> wrote:
>
> [resend because mail got bounced on the ML, sorry]
>
> Hi Dario,
>
> On Sat Mar 30, 2024 at 5:02 PM CET, Dario Binacchi wrote:
> > Recent versions of U-Boot are capable of building tiboot3.bin using
> > Binman. In this case, let's copy it to the binaries directory.
> >
> > The use of `find' command is justified by the need to use a regex
> > expression to select the correct file. This is not possible with a
> > simple `cp' command.
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> >
> > ---
> >
> > Changes in v8:
> > - Use the `find' command in pipe with the `cp' command.
> >
> > Changes in v6:
> > - Replace `find' command with `cp' one.
> >
> > Changes in v5:
> > - Replace tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin with
> >   tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
> >
> > Added in v4
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> > ---
> >  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > index fdb058f3b72a..9a05d005067a 100644
> > --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > @@ -70,8 +70,12 @@ define TI_K3_R5_LOADER_BUILD_CMDS
> >       $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
> >  endef
> >
> > +TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
> > +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> > +
> >  define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
> >       cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> > +     cd $(@D); find ./ -type f -regex "\.\/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-[^-]*..bin" -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
>
> The filename should *not* be hardcoded to look like
> <soc>-<sectype>.bin. This is just an artifact how TI is naming their
> files in *their* u-boot binman files. Instead this should just be a
> Kconfig variable (maybe K3_R5_LOADER_FILENAME?) which can be set by
> the user/board config and which defaults to "tiboot3.bin".
> "tiboot3.bin" is the filename which is used by the ROM in filesystem
> boot mode and for which u-boot is already creating a symlink.
> So this will then just be another simple "cp".
>
> On a side node, we also found out that the "find . -regex" is rather
> fragile in the sense that it might not copy anything at all without
> generating an error.
>

The idea was to merge this series based on the series topic. I would
like to remind you that
the code in buildroot was not working and we sent a first series back
in November that was suppose
to fix something that was "merged" before and unfortunately broken.
We like all the suggestions and we would of course love
to improve the series but it would be nice to limit the series to the
subject and not continue to add a more generalist approach.
This is from you the first email and thank you for adding your
contribution and welcome on board too.
I think that we should now wait for V11

Michael


> -michael



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-04-03 13:15     ` Michael Nazzareno Trimarchi
@ 2024-04-03 13:24       ` Michael Walle
  2024-04-03 13:49         ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Walle @ 2024-04-03 13:24 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi
  Cc: Alexander Sverdlin, Anand Gadiyar, heiko.thiery, Asaf Kahlon,
	Xuanhao Shi, James Hilliard, Thomas Petazzoni, buildroot,
	Romain Naour, Dario Binacchi, linux-amarula, Yann E . Morin,
	bryce, Andreas Dannenberg


[-- Attachment #1.1: Type: text/plain, Size: 2287 bytes --]

Hi Michael,

> > > +TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
> > > +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> > > +
> > >  define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
> > >       cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> > > +     cd $(@D); find ./ -type f -regex "\.\/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-[^-]*..bin" -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
> >
> > The filename should *not* be hardcoded to look like
> > <soc>-<sectype>.bin. This is just an artifact how TI is naming their
> > files in *their* u-boot binman files. Instead this should just be a
> > Kconfig variable (maybe K3_R5_LOADER_FILENAME?) which can be set by
> > the user/board config and which defaults to "tiboot3.bin".
> > "tiboot3.bin" is the filename which is used by the ROM in filesystem
> > boot mode and for which u-boot is already creating a symlink.
> > So this will then just be another simple "cp".
> >
> > On a side node, we also found out that the "find . -regex" is rather
> > fragile in the sense that it might not copy anything at all without
> > generating an error.
> >
>
> The idea was to merge this series based on the series topic. I would
> like to remind you that
> the code in buildroot was not working and we sent a first series back
> in November that was suppose
> to fix something that was "merged" before and unfortunately broken.
> We like all the suggestions and we would of course love
> to improve the series but it would be nice to limit the series to the
> subject and not continue to add a more generalist approach.
> This is from you the first email and thank you for adding your
> contribution and welcome on board too.
> I think that we should now wait for V11

Sorry, for being that late, but I don't think it is the way to go to
introduce something "broken" (for a lack of a better wording) and
then fix it afterwards, Esp. because it means touching all the bits
and defconfigs again. IOW, this is not an improvement but rather how
to do it the correct way (in my opinion, others might disagree of
course).
Also, I'm not sure if the TI_K3_R5_LOADER_{SOC,SECTYPE} is used
elsewhere or if it can be dropped altogether.

-michael

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

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

* Re: [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-04-03 13:24       ` Michael Walle
@ 2024-04-03 13:49         ` Michael Nazzareno Trimarchi
  2024-04-03 14:06           ` Michael Walle
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Nazzareno Trimarchi @ 2024-04-03 13:49 UTC (permalink / raw)
  To: Michael Walle
  Cc: Alexander Sverdlin, Anand Gadiyar, heiko.thiery, Asaf Kahlon,
	Xuanhao Shi, James Hilliard, Thomas Petazzoni, buildroot,
	Romain Naour, Dario Binacchi, linux-amarula, Yann E . Morin,
	bryce, Andreas Dannenberg

Hi Michael

On Wed, Apr 3, 2024 at 3:24 PM Michael Walle <mwalle@kernel.org> wrote:
>
> Hi Michael,
>
> > > > +TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
> > > > +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> > > > +
> > > >  define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
> > > >       cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> > > > +     cd $(@D); find ./ -type f -regex "\.\/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-[^-]*..bin" -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
> > >
> > > The filename should *not* be hardcoded to look like
> > > <soc>-<sectype>.bin. This is just an artifact how TI is naming their
> > > files in *their* u-boot binman files. Instead this should just be a
> > > Kconfig variable (maybe K3_R5_LOADER_FILENAME?) which can be set by
> > > the user/board config and which defaults to "tiboot3.bin".
> > > "tiboot3.bin" is the filename which is used by the ROM in filesystem
> > > boot mode and for which u-boot is already creating a symlink.
> > > So this will then just be another simple "cp".
> > >
> > > On a side node, we also found out that the "find . -regex" is rather
> > > fragile in the sense that it might not copy anything at all without
> > > generating an error.
> > >
> >
> > The idea was to merge this series based on the series topic. I would
> > like to remind you that
> > the code in buildroot was not working and we sent a first series back
> > in November that was suppose
> > to fix something that was "merged" before and unfortunately broken.
> > We like all the suggestions and we would of course love
> > to improve the series but it would be nice to limit the series to the
> > subject and not continue to add a more generalist approach.
> > This is from you the first email and thank you for adding your
> > contribution and welcome on board too.
> > I think that we should now wait for V11
>
> Sorry, for being that late, but I don't think it is the way to go to
> introduce something "broken" (for a lack of a better wording) and

I just said that your suggestion is welcome but the code we have
already has been broken for
months.

> then fix it afterwards, Esp. because it means touching all the bits
> and defconfigs again. IOW, this is not an improvement but rather how
> to do it the correct way (in my opinion, others might disagree of
> course).

The proposal is not broken but it's better to say not consistent with
newer boards/soc. Am I wrong?

> Also, I'm not sure if the TI_K3_R5_LOADER_{SOC,SECTYPE} is used
> elsewhere or if it can be dropped altogether.

Clear

Michael

>
> -michael



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
  2024-04-03 13:49         ` Michael Nazzareno Trimarchi
@ 2024-04-03 14:06           ` Michael Walle
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Walle @ 2024-04-03 14:06 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi
  Cc: Alexander Sverdlin, Anand Gadiyar, heiko.thiery, Asaf Kahlon,
	Xuanhao Shi, James Hilliard, Thomas Petazzoni, buildroot,
	Romain Naour, Dario Binacchi, linux-amarula, Yann E . Morin,
	bryce, Andreas Dannenberg


[-- Attachment #1.1: Type: text/plain, Size: 3174 bytes --]

Hi,

On Wed Apr 3, 2024 at 3:49 PM CEST, Michael Nazzareno Trimarchi wrote:
> > > > > +TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
> > > > > +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> > > > > +
> > > > >  define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
> > > > >       cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> > > > > +     cd $(@D); find ./ -type f -regex "\.\/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-[^-]*..bin" -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
> > > >
> > > > The filename should *not* be hardcoded to look like
> > > > <soc>-<sectype>.bin. This is just an artifact how TI is naming their
> > > > files in *their* u-boot binman files. Instead this should just be a
> > > > Kconfig variable (maybe K3_R5_LOADER_FILENAME?) which can be set by
> > > > the user/board config and which defaults to "tiboot3.bin".
> > > > "tiboot3.bin" is the filename which is used by the ROM in filesystem
> > > > boot mode and for which u-boot is already creating a symlink.
> > > > So this will then just be another simple "cp".
> > > >
> > > > On a side node, we also found out that the "find . -regex" is rather
> > > > fragile in the sense that it might not copy anything at all without
> > > > generating an error.
> > > >
> > >
> > > The idea was to merge this series based on the series topic. I would
> > > like to remind you that
> > > the code in buildroot was not working and we sent a first series back
> > > in November that was suppose
> > > to fix something that was "merged" before and unfortunately broken.
> > > We like all the suggestions and we would of course love
> > > to improve the series but it would be nice to limit the series to the
> > > subject and not continue to add a more generalist approach.
> > > This is from you the first email and thank you for adding your
> > > contribution and welcome on board too.
> > > I think that we should now wait for V11
> >
> > Sorry, for being that late, but I don't think it is the way to go to
> > introduce something "broken" (for a lack of a better wording) and
>
> I just said that your suggestion is welcome but the code we have
> already has been broken for
> months.
>
> > then fix it afterwards, Esp. because it means touching all the bits
> > and defconfigs again. IOW, this is not an improvement but rather how
> > to do it the correct way (in my opinion, others might disagree of
> > course).
>
> The proposal is not broken but it's better to say not consistent with
> newer boards/soc. Am I wrong?

I'd argue it makes wrong assumptions. The filename buildroot is
picking up here comes from the u-boot binman device tree artifact
and the author of this binman dtsi file is free to choose whatever
filename they like:
   filename = "tiboot3-am64x_sr2-hs-evm.bin";

Thus, buildroot should not assume that the filename has some kind of
structure. And also, the binman already generates a link to the
default tiboot3.bin.

Anyway, you have my feedback and there should be enough information
for everyone to form their own opinion on this topic.

-michael

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

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

end of thread, other threads:[~2024-04-03 14:07 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 01/12] boot/ti-k3-r5-loader: drop hash for version 2022.10 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 02/12] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 03/12] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 04/12] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 05/12] package/ti-k3: disable HS-FS for AM65 SOC Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
2024-04-03 13:05   ` Michael Walle
2024-04-03 13:15     ` Michael Nazzareno Trimarchi
2024-04-03 13:24       ` Michael Walle
2024-04-03 13:49         ` Michael Nazzareno Trimarchi
2024-04-03 14:06           ` Michael Walle
2024-03-30 16:02 ` [Buildroot] [PATCH v10 07/12] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 08/12] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 09/12] board/ti/am62x-sk: generalize post-build.sh Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 10/12] board/ti/am62x-sk: move post-{build, image}.sh to board/ti/common/am6xx Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 11/12] configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 12/12] configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
2024-04-02 14:50 ` [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Gero Schwäricke via buildroot
2024-04-02 16:20   ` Michael Nazzareno Trimarchi
2024-04-02 21:03 ` Bryan Brattlof via buildroot
2024-04-03  9:17 ` Romain Naour
2024-04-03 12:52   ` Michael Walle 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.