Add support for AM62x-SK HS-FS devices
v6 cover Add support for AM62x-SK HS-FS devices
The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling the BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FS option, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.
Dario Binacchi (16):
configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM
setting
configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader
version
boot/ti-k3-r5-loader: bump to version 2024.01 package/python-attrs: add host variant package/python-rpds-py: add host variant package/python-referencing: add host variant package/python-jsonschema-specifications: add host variant package/python-jsonschema: add host variant boot/ti-k3-r5-loader: set binman environment boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option package/ti-k3: move TI_K3_{SECTYPE,SOC} out of the image-gen scope boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17
board/ti/am62x-sk/genimage.cfg | 7 ++- board/ti/am62x-sk/post-build.sh | 49 +++++++++++++++ board/ti/am62x-sk/post-image.sh | 5 ++ boot/ti-k3-image-gen/Config.in | 61 ++----------------- boot/ti-k3-image-gen/ti-k3-image-gen.mk | 4 +- boot/ti-k3-r5-loader/Config.in | 5 +- boot/ti-k3-r5-loader/ti-k3-r5-loader.hash | 2 +- boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 12 +++- boot/uboot/Config.in | 23 +++---- boot/uboot/uboot.mk | 12 +++- configs/ti_am62x_sk_defconfig | 22 ++++--- configs/ti_am64x_sk_defconfig | 7 ++- package/Config.in | 1 + package/python-attrs/python-attrs.mk | 6 ++ .../python-jsonschema-specifications.mk | 10 +++ .../python-jsonschema/python-jsonschema.mk | 14 +++++ .../python-referencing/python-referencing.mk | 11 ++++ package/python-rpds-py/python-rpds-py.mk | 1 + package/ti-k3/Config.in | 60 ++++++++++++++++++ package/ti-k3/ti-k3.mk | 7 +++ 20 files changed, 232 insertions(+), 87 deletions(-) create mode 100755 board/ti/am62x-sk/post-build.sh create mode 100755 board/ti/am62x-sk/post-image.sh create mode 100644 package/ti-k3/Config.in create mode 100644 package/ti-k3/ti-k3.mk
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 1/16 configs/ti_am62x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting
Using PLATFORM=k3 can leads to a runtime boot crash on some K3 SoC (e.g. j721e) because the optee flavor is missing.
We could use BR2_TARGET_OPTEE_OS_PLATFORM=k3 and BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR=am62x but we actually can use BR2_TARGET_OPTEE_OS_PLATFORM=k3-am62x as explained in the optee-os Makefile [1]:
# If $(PLATFORM) is defined and contains a hyphen, parse it as # $(PLATFORM)-$(PLATFORM_FLAVOR) for convenience
This is how meta-ti set the optee-os platform:
meta-ti]$ git grep OPTEEMACHINE meta-ti-bsp/conf/machine/am437x-hs-evm.conf:OPTEEMACHINE = "ti-am43xx" meta-ti-bsp/conf/machine/am57xx-hs-evm.conf:OPTEEMACHINE = "ti-am57xx" meta-ti-bsp/conf/machine/beagleplay.conf:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf:OPTEEMACHINE = "ti-dra7xx" meta-ti-bsp/conf/machine/include/am62axx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am62pxx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am62xx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am64xx.inc:OPTEEMACHINE = "k3-am64x" meta-ti-bsp/conf/machine/include/am65xx.inc:OPTEEMACHINE = "k3-am65x" meta-ti-bsp/conf/machine/include/j7200.inc:OPTEEMACHINE = "k3-j721e" meta-ti-bsp/conf/machine/include/j721e.inc:OPTEEMACHINE = "k3-j721e" meta-ti-bsp/conf/machine/include/j721s2.inc:OPTEEMACHINE = "k3-j784s4" meta-ti-bsp/conf/machine/include/j722s.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/j784s4.inc:OPTEEMACHINE = "k3-j784s4"
meta-ti uses the OPTEEMACHINE to set optee-os platform [2].
[1] https://github.com/OP-TEE/optee_os/blob/4.0.0/Makefile#L37
[2] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23
---
Changes in v6:
- Update commit message
Changes in v5:
- Drop BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR option
Added in v4
configs/ti_am62x_sk_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/ti_am62x_sk_defconfig +1 -1
@@ -21,7 +21,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3" BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y -BR2_TARGET_OPTEE_OS_PLATFORM="k3" +BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" BR2_TARGET_TI_K3_IMAGE_GEN=y BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y BR2_TARGET_TI_K3_R5_LOADER=y
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 2/16 configs/ti_am64x_sk_defconfig: fix BR2_TARGET_OPTEE_OS_PLATFORM setting
In reply to Dario BinacchiUsing PLATFORM=k3 can leads to a runtime boot crash on some K3 SoC (e.g. j721e) because the optee flavor is missing.
We could use BR2_TARGET_OPTEE_OS_PLATFORM=k3 and BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR=am64x but we actually can use BR2_TARGET_OPTEE_OS_PLATFORM=k3-am64x as explained in the optee-os Makefile [1]:
# If $(PLATFORM) is defined and contains a hyphen, parse it as # $(PLATFORM)-$(PLATFORM_FLAVOR) for convenience
This is how meta-ti set the optee-os platform:
meta-ti]$ git grep OPTEEMACHINE meta-ti-bsp/conf/machine/am437x-hs-evm.conf:OPTEEMACHINE = "ti-am43xx" meta-ti-bsp/conf/machine/am57xx-hs-evm.conf:OPTEEMACHINE = "ti-am57xx" meta-ti-bsp/conf/machine/beagleplay.conf:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/dra7xx-hs-evm.conf:OPTEEMACHINE = "ti-dra7xx" meta-ti-bsp/conf/machine/include/am62axx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am62pxx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am62xx.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/am64xx.inc:OPTEEMACHINE = "k3-am64x" meta-ti-bsp/conf/machine/include/am65xx.inc:OPTEEMACHINE = "k3-am65x" meta-ti-bsp/conf/machine/include/j7200.inc:OPTEEMACHINE = "k3-j721e" meta-ti-bsp/conf/machine/include/j721e.inc:OPTEEMACHINE = "k3-j721e" meta-ti-bsp/conf/machine/include/j721s2.inc:OPTEEMACHINE = "k3-j784s4" meta-ti-bsp/conf/machine/include/j722s.inc:OPTEEMACHINE = "k3-am62x" meta-ti-bsp/conf/machine/include/j784s4.inc:OPTEEMACHINE = "k3-j784s4"
meta-ti uses the OPTEEMACHINE to set optee-os platform [2].
[1] https://github.com/OP-TEE/optee_os/blob/4.0.0/Makefile#L37
[2] https://git.yoctoproject.org/meta-arm/tree/meta-arm/recipes-security/optee/optee-os.inc?h=4.0.3#n23
---
Changes in v6:
- Update commit message
Changes in v5:
- Drop BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR option
Added in v4
configs/ti_am64x_sk_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/ti_am64x_sk_defconfig +1 -1
@@ -21,7 +21,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3" BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y -BR2_TARGET_OPTEE_OS_PLATFORM="k3" +BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x" BR2_TARGET_TI_K3_IMAGE_GEN=y BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y BR2_TARGET_TI_K3_R5_LOADER=y
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 3/16 configs/ti_am62x_sk_defconfig: explicitly set the ti-k3-r5-loader version
In reply to Dario BinacchiCommit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig") forgot to specify the ti-k3-r5-loader, so do that now.
When the defconfig was added, the default version was 2022.10, so use it.
---
no changes since v4
Added in v4
configs/ti_am62x_sk_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/ti_am62x_sk_defconfig +2 -0
@@ -25,6 +25,8 @@ BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" BR2_TARGET_TI_K3_IMAGE_GEN=y BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y BR2_TARGET_TI_K3_R5_LOADER=y +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10" BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_evm_r5" BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 4/16 configs/ti_am64x_sk_defconfig: explicitly set the ti-k3-r5-loader version
In reply to Dario BinacchiCommit 6b2329bb80 ("configs/ti_am64x_sk: new defconfig") forgot to specify the ti-k3-r5-loader, so do that now.
When the defconfig was added, the default version was 2022.10, so use it.
---
no changes since v4
Added in v4
configs/ti_am64x_sk_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/ti_am64x_sk_defconfig +2 -0
@@ -25,6 +25,8 @@ BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x" BR2_TARGET_TI_K3_IMAGE_GEN=y BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y BR2_TARGET_TI_K3_R5_LOADER=y +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y +BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10" BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5" BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 5/16 boot/ti-k3-r5-loader: bump to version 2024.01
In reply to Dario BinacchiAll in-tree configs with the ti-k3-r5 bootloader use a custom version, so this patch is mostly for the menuconfig default version
---
no changes since v4
Added in v4
boot/ti-k3-r5-loader/Config.in | 4 ++-- boot/ti-k3-r5-loader/ti-k3-r5-loader.hash | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
boot/ti-k3-r5-loader/Config.in +2 -2
@@ -16,7 +16,7 @@ choice here as it is used to build the main U-Boot package. config BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION - bool "2022.10" + bool "2024.01" config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION bool "Custom version"
@@ -60,7 +60,7 @@ endif config BR2_TARGET_TI_K3_R5_LOADER_VERSION string - default "2022.10" if BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION + default "2024.01" if BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE \ if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION default "custom" if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
boot/ti-k3-r5-loader/ti-k3-r5-loader.hash +1 -1
@@ -1,3 +1,3 @@ # Locally computed: -sha256 50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8 u-boot-2022.10.tar.bz2 +sha256 b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3 u-boot-2024.01.tar.bz2 sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Licenses/gpl-2.0.txt
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 6/16 package/python-attrs: add host variant
In reply to Dario BinacchiRecent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.
---
no changes since v3
Changes in v3:
- Drop Config.in.host
package/python-attrs/python-attrs.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/python-attrs/python-attrs.mk +6 -0
@@ -15,4 +15,10 @@ PYTHON_ATTRS_DEPENDENCIES = \ host-python-hatch-fancy-pypi-readme \ host-python-hatch-vcs +HOST_PYTHON_ATTRS_DEPENDENCIES = \ + host-python-hatchling \ + host-python-hatch-fancy-pypi-readme \ + host-python-hatch-vcs + $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 7/16 package/python-rpds-py: add host variant
In reply to Dario BinacchiRecent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman
---
no changes since v3
Changes in v3:
- Drop Config.in.host
package/python-rpds-py/python-rpds-py.mk | 1 + 1 file changed, 1 insertion(+)
package/python-rpds-py/python-rpds-py.mk +1 -0
@@ -12,3 +12,4 @@ PYTHON_RPDS_PY_LICENSE = MIT PYTHON_RPDS_PY_LICENSE_FILES = LICENSE $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 8/16 package/python-referencing: add host variant
In reply to Dario BinacchiRecent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.
---
Changes in v5:
- Add runtime dependencies
- Add SOB and COB tags of Romain Naour
no changes in v4
Changes in v3:
- Drop Config.in.host
package/python-referencing/python-referencing.mk | 11 +++++++++++ 1 file changed, 11 insertions(+)
package/python-referencing/python-referencing.mk +11 -0
@@ -14,4 +14,15 @@ PYTHON_REFERENCING_DEPENDENCIES = \ host-python-hatchling \ host-python-hatch-vcs +HOST_PYTHON_REFERENCING_DEPENDENCIES = \ + host-python-hatchling \ + host-python-hatch-vcs + +# This is a runtime dependency, but we don't have the concept of +# runtime dependencies for host packages. +HOST_PYTHON_REFERENCING_DEPENDENCIES += \ + host-python-attrs \ + host-python-rpds-py + $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 9/16 package/python-jsonschema-specifications: add host variant
In reply to Dario BinacchiRecent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.
---
Changes in v6:
- Add runtime dependencies
- Add SOB and COB tags of Romain Naour
no changes since v3
Changes in v3:
- Drop Config.in.host
package/python-jsonschema-specifications.mk | 10 ++++++++++ 1 file changed, 10 insertions(+)
package/python-jsonschema-specifications/python-jsonschema-specifications.mk +10 -0
@@ -14,4 +14,14 @@ PYTHON_JSONSCHEMA_SPECIFICATIONS_DEPENDENCIES = \ host-python-hatchling \ host-python-hatch-vcs +HOST_PYTHON_JSONSCHEMA_SPECIFICATIONS_DEPENDENCIES = \ + host-python-hatchling \ + host-python-hatch-vcs + +# This is a runtime dependency, but we don't have the concept of +# runtime dependencies for host packages. +HOST_PYTHON_JSONSCHEMA_SPECIFICATIONS_DEPENDENCIES += \ + host-python-referencing + $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 10/16 package/python-jsonschema: add host variant
In reply to Dario BinacchiRecent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This package is required by binman.
---
Changes in v5:
- Add runtime dependencies
- Add SOB and COB tags of Romain Naour
no changes in v4
Changes in v3:
- Drop Config.in.host
package/python-jsonschema/python-jsonschema.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
package/python-jsonschema/python-jsonschema.mk +14 -0
@@ -15,4 +15,18 @@ PYTHON_JSONSCHEMA_DEPENDENCIES = \ host-python-hatch-fancy-pypi-readme \ host-python-hatch-vcs +HOST_PYTHON_JSONSCHEMA_DEPENDENCIES = \ + host-python-hatchling \ + host-python-hatch-fancy-pypi-readme \ + host-python-hatch-vcs + +# This is a runtime dependency, but we don't have the concept of +# runtime dependencies for host packages. +HOST_PYTHON_JSONSCHEMA_DEPENDENCIES += \ + host-python-attrs \ + host-python-jsonschema-specifications \ + host-python-referencing \ + host-python-rpds-py + $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 11/16 boot/ti-k3-r5-loader: set binman environment
In reply to Dario BinacchiRecent 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
---
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
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(-)
boot/ti-k3-r5-loader/Config.in +1 -0
@@ -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.
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +7 -1
@@ -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
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 12/16 boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
In reply to Dario BinacchiRecent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.
This tool uses additional host python modules that must be provided by Buildroot. So introduce a new option BR2_TARGET_UBOOT_USE_BINMAN to add additional host packages in U-Boot build dependency to use binman.
The binman requirement is directly included in buildman dependency (tools/buildman/requirements.txt) since within U-Boot, binman is invoked by the build system, here buildman [1].
[1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot
---
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:
boot/uboot/Config.in | 11 +++++++++++ boot/uboot/uboot.mk | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-)
boot/uboot/Config.in +11 -0
@@ -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
boot/uboot/uboot.mk +11 -1
@@ -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 +ifneq ($(BR2_TARGET_UBOOT_USE_BINMAN),y) +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
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 12/16] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
Hello Dario,
Le 24/02/2024 à 21:56, Dario Binacchi a écrit :
Quoted 65 lines
Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts.
This tool uses additional host python modules that must be provided by Buildroot. So introduce a new option
BR2_TARGET_UBOOT_USE_BINMANto add additional host packages in U-Boot build dependency to use binman.The binman requirement is directly included in buildman dependency (
tools/buildman/requirements.txt) since within U-Boot, binman is invoked by the build system, here buildman [1].[1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot
Co-developed-by Romain Naour <[email protected]>Signed-off-by Romain Naour <[email protected]>Signed-off-by Dario Binacchi <[email protected]>---
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 NaourChanges in v5:
- Drop "DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f" fromUBOOT_MAKE_OPTS.no changes since v1:
boot/uboot/Config.in | 11 +++++++++++ boot/uboot/uboot.mk | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-)boot/uboot/Config.in +11
-0@@ -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_AISboot/uboot/uboot.mk +0
-0
boot/uboot/uboot.mk UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf · line 191
Quoted 6 lines
boot/uboot/uboot.mk +1
-1@@ -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 +ifneq ($(BR2_TARGET_UBOOT_USE_BINMAN),y)
Usually we prefer the "positive" logic: ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),)
boot/uboot/uboot.mk UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf · line 193
Quoted 2 lines
boot/uboot/uboot.mk +1
-0+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
Looking at the commit log, It's not obvious why DM= is no needed with binman.
We had the explanation from Andreas:
http://lists.busybox.net/pipermail/buildroot/2024-February/685977.html
"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/."
Best regards,
Romain
Quoted 10 lines
boot/uboot/uboot.mk +2
-0endif +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)
boot/uboot/uboot.mk ifeq ($(BR2_TARGET_UBOOT_NEEDS_XXD),y) · line 284
Quoted 10 lines
boot/uboot/uboot.mk +7
-0+# 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
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 13/16 package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope
In reply to Dario BinacchiRecent 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".
---
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
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 | 60 ++++++++++++++++++++++++ package/ti-k3/ti-k3.mk | 7 +++ 9 files changed, 80 insertions(+), 73 deletions(-) create mode 100644 package/ti-k3/Config.in create mode 100644 package/ti-k3/ti-k3.mk
boot/ti-k3-image-gen/Config.in +4 -57
@@ -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
boot/ti-k3-image-gen/ti-k3-image-gen.mk +2 -2
@@ -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
boot/uboot/Config.in +1 -11
@@ -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
boot/uboot/uboot.mk +1 -1
@@ -189,7 +189,7 @@ endif ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y) UBOOT_DEPENDENCIES += ti-k3-boot-firmware ifneq ($(BR2_TARGET_UBOOT_USE_BINMAN),y) -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
configs/ti_am62x_sk_defconfig +2 -1
@@ -11,6 +11,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y +BR2_PACKAGE_TI_K3=y +BR2_PACKAGE_TI_K3_SOC_AM62X=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
@@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" BR2_TARGET_TI_K3_IMAGE_GEN=y -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y BR2_TARGET_TI_K3_R5_LOADER=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
configs/ti_am64x_sk_defconfig +2 -1
@@ -11,6 +11,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y +BR2_PACKAGE_TI_K3=y +BR2_PACKAGE_TI_K3_SOC_AM64X=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
@@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x" BR2_TARGET_TI_K3_IMAGE_GEN=y -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y BR2_TARGET_TI_K3_R5_LOADER=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"
package/Config.in +1 -0
@@ -629,6 +629,7 @@ endmenu source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" source "package/ti-gfx/Config.in" + source "package/ti-k3/Config.in" source "package/ti-sgx-demos/Config.in" source "package/ti-sgx-km/Config.in" source "package/ti-sgx-um/Config.in"
package/ti-k3/Config.in new file +60 -0
60 lines not on this page · raw message
package/ti-k3/ti-k3.mk new file +7 -0
@@ -0,0 +1,7 @@ +################################################################################ +# +# ti-k3 +# +################################################################################ + +include $(sort $(wildcard package/ti-k3/*/*.mk))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 13/16] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope
Le 24/02/2024 à 21:56, Dario Binacchi a écrit :
Quoted 250 lines
Recent versions of U-Boot can use Binman to compile and sign the generated binaries, thus making the use of custom tools like ti-k3-image-gen no longer necessary. In ti-k3-image-gen, options such as SECTYPE and SOC were configured and used outside of it. This patch allows setting such options even if the package is not enabled.
The patch makes an exception to the Buildroot rule "no subdirectory in package directory".
Signed-off-by Dario Binacchi <[email protected]>---
Changes in v6:
- MoveBR2_TARGET_UBOOT_TI_K3_DM_SOCNAMEto ti-k3 (BR2_PACKAGE_TI_K3_DM).
- DisableBR2_PACKAGE_TI_K3_SECTYPE_HS_FSforBR2_PACKAGE_TI_K3_SOC_AM65XChanges in v5:
- Add SOB tag
- Move the new ti-k3 from boot to packageAdded in v4
boot/ti-k3-image-gen/Config.in | 61 ++----------------------- boot/ti-k3-image-gen/ti-k3-image-gen.mk | 4 +- boot/uboot/Config.in | 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 | 60 ++++++++++++++++++++++++ package/ti-k3/ti-k3.mk | 7 +++ 9 files changed, 80 insertions(+), 73 deletions(-) create mode 100644 package/ti-k3/Config.in create mode 100644 package/ti-k3/ti-k3.mkboot/ti-k3-image-gen/Config.in +4
-57@@ -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 endifboot/ti-k3-image-gen/ti-k3-image-gen.mk +2
-2@@ -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).binboot/uboot/Config.in +1
-11@@ -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_OPENSBIboot/uboot/uboot.mk +1
-1@@ -189,7 +189,7 @@ endif ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y) UBOOT_DEPENDENCIES += ti-k3-boot-firmware ifneq ($(BR2_TARGET_UBOOT_USE_BINMAN),y) -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 endifconfigs/ti_am62x_sk_defconfig +2
-1@@ -11,6 +11,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y +BR2_PACKAGE_TI_K3=y +BR2_PACKAGE_TI_K3_SOC_AM62X=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="256M"@@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x" BR2_TARGET_TI_K3_IMAGE_GEN=y -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X=y BR2_TARGET_TI_K3_R5_LOADER=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"configs/ti_am64x_sk_defconfig +2
-1@@ -11,6 +11,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y +BR2_PACKAGE_TI_K3=y +BR2_PACKAGE_TI_K3_SOC_AM64X=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"@@ -23,7 +25,6 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y BR2_TARGET_OPTEE_OS=y BR2_TARGET_OPTEE_OS_PLATFORM="k3-am64x" BR2_TARGET_TI_K3_IMAGE_GEN=y -BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X=y BR2_TARGET_TI_K3_R5_LOADER=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2022.10"package/Config.in +1
-0@@ -629,6 +629,7 @@ endmenu source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" source "package/ti-gfx/Config.in" + source "package/ti-k3/Config.in" source "package/ti-sgx-demos/Config.in" source "package/ti-sgx-km/Config.in" source "package/ti-sgx-um/Config.in"package/ti-k3/Config.in new file +25
-0@@ -0,0 +1,60 @@ +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
package/ti-k3/Config.in line 35
Quoted 10 lines
package/ti-k3/Config.in new file +10
-0+ 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" + depends on !BR2_PACKAGE_TI_K3_SOC_AM65X
This was an existing issue with ti-k3-image-gen and it should go in a separate patch. Also, add in the commit log how this infomation was retrieved.
http://lists.busybox.net/pipermail/buildroot/2024-February/686144.html
Best regards,
Romain
Quoted 31 lines
package/ti-k3/Config.in new file +25
-0+ +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 + +endifpackage/ti-k3/ti-k3.mk new file +0
-0
package/ti-k3/ti-k3.mk line 7
Quoted 7 lines
package/ti-k3/ti-k3.mk new file +7
-0@@ -0,0 +1,7 @@ +################################################################################ +# +# ti-k3 +# +################################################################################ + +include $(sort $(wildcard package/ti-k3/*/*.mk))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 14/16 boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
In reply to Dario BinacchiRecent versions of U-Boot are capable of building tiboot3.bin using Binman. In this case, let's copy it to the binaries directory.
---
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
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++ 1 file changed, 4 insertions(+)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
@@ -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 + cp $(@D)/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin $(BINARIES_DIR)/tiboot3.bin endef $(eval $(kconfig-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 15/16 configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01
In reply to Dario BinacchiThe 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.
---
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.
board/ti/am62x-sk/genimage.cfg | 7 ++++- board/ti/am62x-sk/post-build.sh | 49 +++++++++++++++++++++++++++++++++ board/ti/am62x-sk/post-image.sh | 5 ++++ configs/ti_am62x_sk_defconfig | 13 +++++---- 4 files changed, 67 insertions(+), 7 deletions(-) create mode 100755 board/ti/am62x-sk/post-build.sh create mode 100755 board/ti/am62x-sk/post-image.sh
board/ti/am62x-sk/genimage.cfg +6 -1
@@ -4,10 +4,15 @@ image boot.vfat { "tiboot3.bin", "tispl.bin", "u-boot.img", + "k3-am625-sk.dtb", + "Image" + } + file extlinux/extlinux.conf { + image = extlinux.conf } } - size = 16M + size = 64M } image sdcard.img {
board/ti/am62x-sk/post-build.sh new file +49 -0
49 lines not on this page · raw message
board/ti/am62x-sk/post-image.sh new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/sh -x + +BOARD_DIR="$(dirname "$0")" + +support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
configs/ti_am62x_sk_defconfig +7 -6
@@ -1,14 +1,14 @@ BR2_aarch64=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk" -BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y BR2_PACKAGE_TI_K3=y
@@ -24,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
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 15/16] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01
Hello Dario,
Le 24/02/2024 à 21:56, Dario Binacchi a écrit :
Quoted 8 lines
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 ofBR2_LINUX_KERNEL_INSTALL_TARGETand the use of extlinux.conf for the proper loading of the device tree. Furthermore, the parameterBR2_ROOTFS_POST_SCRIPT_ARGSwas used to auto-generate the extlinux.conf file so that developers can change the kernel loading options by modifying the .config.
The main issue here come from the mmc.env used on TI platform [1], indded it requires to install the dtb into a subdirectory in /boot. This is handled by meta-ti with KERNEL_DTBDEST [2] but Buildroot doesn't support such feature.
# Tell the kernel class to install the DTBs in the same directory structure as
# the kernel.
KERNEL_DTBDEST = "${KERNEL_IMAGEDEST}/dtb"Instead, we can create a symblink "ln -sf . ${TARGET_DIR}/boot/dtb", see [3].
But I'm fine too with the generated extlinux.conf.
[1]
https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/include/env/ti/mmc.env?ref_type=tags#L18
[3] http://lists.busybox.net/pipermail/buildroot/2024-February/685672.html
Quoted 98 lines
- 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 <[email protected]>---
Changes in v6:
- EnableBR2_TARGET_UBOOT_USE_BINMANoptionChanges 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 theBR2_ROOTFS_POST_SCRIPT_ARGSinsided theti_am62x_sk_defconfig.Changes in v2:
- Update the commit message
- Drop Python options required by binman.
- EnableBR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN. This option automatically selects the Python modules required by binman.board/ti/am62x-sk/genimage.cfg | 7 ++++- board/ti/am62x-sk/post-build.sh | 49 +++++++++++++++++++++++++++++++++ board/ti/am62x-sk/post-image.sh | 5 ++++ configs/ti_am62x_sk_defconfig | 13 +++++---- 4 files changed, 67 insertions(+), 7 deletions(-) create mode 100755 board/ti/am62x-sk/post-build.sh create mode 100755 board/ti/am62x-sk/post-image.shboard/ti/am62x-sk/genimage.cfg +6
-1@@ -4,10 +4,15 @@ image boot.vfat { "tiboot3.bin", "tispl.bin", "u-boot.img", + "k3-am625-sk.dtb", + "Image" + } + file extlinux/extlinux.conf { + image = extlinux.conf } } - size = 16M + size = 64M } image sdcard.img {board/ti/am62x-sk/post-build.sh new file +36
-0@@ -0,0 +1,49 @@ +#!/bin/sh -x + +# genimage will need to find the extlinux.conf +# in the binaries directory + +die() { + cat <<EOF >&2 +Error: $@ + +Usage: ${0} -c <console> -r <root> [-x <extra-args>] +EOF + exit 1 +} + +o='c:r:x:' +O='console:,root:,extra-args:' +opts="$(getopt -n "${0##*/}" -o "${o}" -l "${O}" -- "${@}")" +eval set -- "${opts}" +while [ ${#} -gt 0 ]; do + case "${1}" in + (-c|--console) + CONSOLE="${2}"; shift 2 + ;; + (-r|--root) + ROOT="${2}"; shift 2 + ;; + (-x|--extra-args) + EXTRA_ARGS="${2}"; shift 2 + ;; + (--) + shift 1; break + ;; + esac +done + +[ -n "${CONSOLE}" ] || die "Missing argument"
board/ti/am62x-sk/post-build.sh line 46
Quoted 10 lines
board/ti/am62x-sk/post-build.sh new file +10
-0+[ -n "${ROOT}" ] || die "Missing argument" +append="console=${CONSOLE} root=${ROOT} rw rootfstype=ext4 rootwait" +if [ -n "${EXTRA_ARGS}" ]; then + append="${append} ${EXTRA_ARGS}" +fi + +mkdir -p "${BINARIES_DIR}" +cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf" + label am62x-sk-buildroot + kernel /Image
devicetree entry seems missing. We had an issue on another board [1] due to this.
[1]
https://gitlab.com/buildroot.org/buildroot/-/commit/d6d0f73a2eaa4904ee0842a01941b01306d97be6
Best regards,
Romain
Quoted 51 lines
board/ti/am62x-sk/post-build.sh new file +3
-0+ fdtdir / + append ${append} + __HEADER_EOFboard/ti/am62x-sk/post-image.sh new file +5
-0@@ -0,0 +1,5 @@ +#!/bin/sh -x + +BOARD_DIR="$(dirname "$0")" + +support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"configs/ti_am62x_sk_defconfig +5
-6@@ -1,14 +1,14 @@ BR2_aarch64=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk" -BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y BR2_PACKAGE_TI_K3=y@@ -24,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"
configs/ti_am62x_sk_defconfig BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" · line 44
Quoted 10 lines
configs/ti_am62x_sk_defconfig +2
-0+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_evm_a53" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_NEEDS_OPENSSL=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y BR2_TARGET_UBOOT_NEEDS_TI_K3_DM=y +BR2_TARGET_UBOOT_USE_BINMAN=y # BR2_TARGET_UBOOT_FORMAT_BIN is not set BR2_TARGET_UBOOT_FORMAT_IMG=y BR2_TARGET_UBOOT_SPL=y
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 16/16 configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17
In reply to Dario BinacchiTested on SK-AM62B-P1.
---
Changes in v5:
- Bump to 6.6.17 from 6.6.1
- Update commit message
Changes in v4:
- Add BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6 to ti_am62x_sk_defconfig.
no changes since v1
configs/ti_am62x_sk_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
configs/ti_am62x_sk_defconfig +2 -2
@@ -1,11 +1,11 @@ BR2_aarch64=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17
Hello Dario,
Le 24/02/2024 à 21:56, Dario Binacchi a écrit :
Quoted 1 line
Tested on SK-AM62B-P1.
You could complete your series by updating the ti_am64x_sk_defconfig too and remove ti-k3-image-gen.
Except for minor improvement, this series is ok for me.
Best regards,
Romain
Quoted 25 lines
Signed-off-by Dario Binacchi <[email protected]>---
Changes in v5:
- Bump to 6.6.17 from 6.6.1
- Update commit messageChanges in v4:
- AddBR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6toti_am62x_sk_defconfig.no changes since v1
configs/ti_am62x_sk_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)configs/ti_am62x_sk_defconfig +1
-1@@ -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
configs/ti_am62x_sk_defconfig line 11
Quoted 10 lines
configs/ti_am62x_sk_defconfig +1
-1BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17
Hi Romain,
Quoted 8 lines · Romain Naour
Hello Dario,
Quoted 1 line · Dario Binacchi
Tested on SK-AM62B-P1.
You could complete your series by updating the
ti_am64x_sk_defconfigtoo and remove ti-k3-image-gen.
I preferred to submit version 7 without the patches for updating the ti_am64x_sk_defconfig and the removal of the ti-k3-image-gen package. This is because I do not have the am64x_sk board to test the changes on. However, I am available to submit a separate series for applying the changes to ti_am64x_sk_defconfig if there is someone who can test the configuration for me.
Please let me know.
Thanks and regards,
Dario
Quoted 42 lines
Except for minor improvement, this series is ok for me.
Best regards,
RomainQuoted 35 lines
Signed-off-by Dario Binacchi <[email protected]>---
Changes in v5:
- Bump to 6.6.17 from 6.6.1
- Update commit messageChanges in v4:
- AddBR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6toti_am62x_sk_defconfig.no changes since v1
configs/ti_am62x_sk_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)configs/ti_am62x_sk_defconfig +2
-2@@ -1,11 +1,11 @@ BR2_aarch64=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
Signature · 21 lines
Dario Binacchi Senior Embedded Linux Developer [email protected] __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17
Hi Dario,
Le 27/02/2024 à 17:40, Dario Binacchi a écrit :
Quoted 12 lines
Hi Romain,
Quoted 8 lines · Romain Naour
Hello Dario,
Quoted 1 line · Dario Binacchi
Tested on SK-AM62B-P1.
You could complete your series by updating the
ti_am64x_sk_defconfigtoo and remove ti-k3-image-gen.
Quoted 7 lines
I preferred to submit version 7 without the patches for updating the
ti_am64x_sk_defconfigand the removal of the ti-k3-image-gen package. This is because I do not have theam64x_skboard to test the changes on. However, I am available to submit a separate series for applying the changes toti_am64x_sk_defconfigif there is someone who can test the configuration for me.
Please let me know.
Maybe you can ask to Andreas Dannenberg for the am64x_sk?
Quoted 1 line
Maybe if you can also test on AM64x just to be sure the defconfig is working.
I'm planning on testing the entire series here pretty soon and will provide feedback (I have access to any and all boards:)
http://lists.busybox.net/pipermail/buildroot/2024-February/685836.html
Best regards,
Romain
Quoted 48 lines
Thanks and regards,
DarioQuoted 42 lines
Except for minor improvement, this series is ok for me.
Best regards,
RomainQuoted 35 lines
Signed-off-by Dario Binacchi <[email protected]>---
Changes in v5:
- Bump to 6.6.17 from 6.6.1
- Update commit messageChanges in v4:
- AddBR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6toti_am62x_sk_defconfig.no changes since v1
configs/ti_am62x_sk_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)configs/ti_am62x_sk_defconfig +2
-2@@ -1,11 +1,11 @@ BR2_aarch64=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 16/16] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.17
Hi Romain,
Quoted 24 lines · Romain Naour
Hi Dario,
Quoted 12 lines · Dario Binacchi
Hi Romain,
Quoted 8 lines · Romain Naour
Hello Dario,
Quoted 1 line · Dario Binacchi
Tested on SK-AM62B-P1.
You could complete your series by updating the
ti_am64x_sk_defconfigtoo and remove ti-k3-image-gen.Quoted 7 lines
I preferred to submit version 7 without the patches for updating the
ti_am64x_sk_defconfigand the removal of the ti-k3-image-gen package. This is because I do not have theam64x_skboard to test the changes on. However, I am available to submit a separate series for applying the changes toti_am64x_sk_defconfigif there is someone who can test the configuration for me.
Please let me know.
Quoted 4 lines
Maybe you can ask to Andreas Dannenberg for the
am64x_sk?Quoted 1 line
Maybe if you can also test on AM64x just to be sure the defconfig is working.
Ok, I'll get to work and try to modify the configuration based on my experience with
am62x. The idea is to submit the changes over the weekend.
Thanks and regards,
Dario
Quoted 58 lines
I'm planning on testing the entire series here pretty soon and will provide feedback (I have access to any and all boards:)
http://lists.busybox.net/pipermail/buildroot/2024-February/685836.html
Best regards,
RomainQuoted 48 lines
Thanks and regards,
DarioQuoted 42 lines
Except for minor improvement, this series is ok for me.
Best regards,
RomainQuoted 35 lines
Signed-off-by Dario Binacchi <[email protected]>---
Changes in v5:
- Bump to 6.6.17 from 6.6.1
- Update commit messageChanges in v4:
- AddBR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6toti_am62x_sk_defconfig.no changes since v1
configs/ti_am62x_sk_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)configs/ti_am62x_sk_defconfig +2
-2@@ -1,11 +1,11 @@ BR2_aarch64=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/ti/am62x-sk/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c ttyS2,115200n8 -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.4.16" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
Signature · 21 lines
Dario Binacchi Senior Embedded Linux Developer [email protected] __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Dario,
Quoted 6 lines · Dario Binacchi
The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling theBR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FSoption, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.
in contrast to your tests and my last tests on SK-AM62B this time I've tried on GP board (SK-AM62) and the build (for GP) didn't boot out of the box.
I've briefly checked tiboo3.bin and it's the smaller one of all, so this part looks correct. Maybe we need to check if the Firmware blobs are correct in GP case...
Signature · 6 lines
Alexander Sverdlin. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Alexander,
Quoted 11 lines · Alexander Sverdlin
Hello Dario,
Quoted 6 lines · Dario Binacchi
The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling theBR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FSoption, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.
Quoted 6 lines
in contrast to your tests and my last tests on SK-AM62B this time I've tried on GP board (SK-AM62) and the build (for GP) didn't boot out of the box.
I've briefly checked tiboo3.bin and it's the smaller one of all, so this part looks correct. Maybe we need to check if the Firmware blobs are correct in GP case...
I have tested all 7 versions on SK-AM62B successfully, but I don't have a GP board.
Could it be an option for you to find out which is the latest version that also works for GP?
A sort of series bisect?
Thanks and regards,
Dario
Quoted 4 lines
--
Alexander Sverdlin.
Signature · 21 lines
Dario Binacchi Senior Embedded Linux Developer [email protected] __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 [email protected] www.amarulasolutions.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Alexander, Dario, All,
Le 27/02/2024 à 21:41, Dario Binacchi a écrit :
Quoted 21 lines
Hi Alexander,
Quoted 17 lines · Alexander Sverdlin
Hello Dario,
Quoted 6 lines · Dario Binacchi
The SK-AM62B-P1 is the newest version of SK-AM62 which includes high-security field-securable (HS-FS) silicon to optionally customize keys and encryption for security applications.
This requires enabling theBR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE_HS_FSoption, which, however, was buggy. This series fixes the errors and bumps the Linux kernel and U-Boot required for such a new device.in contrast to your tests and my last tests on SK-AM62B this time I've tried on GP board (SK-AM62) and the build (for GP) didn't boot out of the box.
I've briefly checked tiboo3.bin and it's the smaller one of all, so this part looks correct. Maybe we need to check if the Firmware blobs are correct in GP case...
I checked the tiboot3.bin between v7 and v5 of this series:
v7:
-rw-r--r--. 1 romnao romnao 282545 27 févr. 22:23 tiboot3.bin
v5
-rw-r--r--. 1 romnao romnao 282545 13 févr. 15:57 tiboot3-am62x-gp-evm.bin -rw-r--r--. 1 romnao romnao 285134 13 févr. 15:57 tiboot3-am62x-hs-evm.bin -rw-r--r--. 1 romnao romnao 285134 13 févr. 15:57 tiboot3-am62x-hs-fs-evm.bin
Note, we copy the tiboot3 firmware using the complete file name, we don't use the tiboot3.bin symlink generated by binman tool.
cp $(@D)/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
$(BINARIES_DIR)/tiboot3.bin
Verify if your AM62 device is really a GP one.
Quoted 6 lines
I have tested all 7 versions on SK-AM62B successfully, but I don't have a GP board.
Could it be an option for you to find out which is the latest version that also works for GP?
A sort of series bisect?
I don't see any obvious issue.
Please share your boot log and your defconfig.
Best regards,
Romain
Quoted 9 lines
Thanks and regards,
DarioQuoted 4 lines
--
Alexander Sverdlin.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot