Skip to contentSkip to conversation

add support for TI's AM64x and AM62x boards

PATCH In review Andreas Dannenberg via buildroot 7 participants 54 messages Jun 22, 2023 – Aug 22, 2023

lore
Share & tools
lore
#0 lore raw

v9 cover add support for TI's AM64x and AM62x boards

This series introduces support for TI's AM64x and AM62x SK boards.

This updated series introduces an additional package to abstract the signing process for TI K3 "high security" devices to enable a better out-of-box experience and has some other smaller improvements, see change log.

For more on the background and future plans of this overall effort please refer to the cover letter of PATCH v8, see [5].

Changes in v9:
- adds new ti-core-secdev-k3 package to manage they binary boot artifact signing as required on secure HS-FS and HS-SE device variants. With this the user no longer needs to provide the location of the underlying core-secdev-k3 TI tool through the TI_SECURE_DEV_PKG environmental variable using the extra step that was required in PATCH v8, enabling an easier out-of-box experience for "fresh" SK-AM62B / SK-AM64B TI boards which now all come with "HS-FS" devices. Note that once keys/certificates are programmed into an HS-FS device, effectively turning them into HS-SE devices, the user will then need to provide their private keys for signing which from our experience is best done through the TI_SECURE_DEV_PKG env variable, in analogy also with the TI Yocto-based SDK [4]. This is also the reason this package doesn't introduce any hard dependencies at this time. Thanks François Perrad and Arnout Vandecappelle for feedback/suggestions here.
- added Kconfig multiple-choice support for picking the SoC security type (GP, HS-FS, and HS-SE) for better ease-of-use
- fixed an issue with the hash check for the ti-k3-r5-loader as identified by Patrick Oppenlander
- added Tested-by: Julien Olivain tag for build/boot testing the solution on an SK-AM64B board

Changes in v8:
- extended to also include AM62 devices (somewhat similar device as AM64, but with graphics)
- added IMG Rogue graphics driver KM/UM packages supporting AM62 and other TI K3 platform devices
- uses U-Boot/Kernel/ATF/OPTEE and various device firmwares from TI's Processor SDK Linux v8.6 [2][3] to achieve a similar level of basic platform feature-completeness and quality as the official SDK
- supports SK-AM62B with AM62 HS-FS and SK-AM64B with AM64 HS-FS High Security device variants by default. The switch to HS-FS devices was made through follow-on commit to document in the Git history how this is done (also allowing somebody to unroll it for a quick test on a GP device). Note that this requires the TI_SECURE_DEV_PKG environmental variable to be defined at build time pointing to a valid core-secdev-k3 folder location, otherwise the build will fail.
- extended ti-k3-r5-loader package to allow for full build source customization
- extended the ti-k3-image-gen package to accommodate the different classes of device firmware types used on TI K3 SoC like AM62 (TIFS) vs. AM64 (TISCI). With this support any TI K3 device including AM65, AM68, AM69, J721E etc. should now be enabled by this package.
- extended the uboot package to allow building a Device Manager (DM) firmware into the U-Boot SPL image as required on certain TI K3 SoCs like AM62, AM62A, etc.
- incorporated Thomas Petazzoni's feedback into k3-image-gen. Also this package no longer downloads stuff during build (ugh!!), thanks to changes as proposed by François Perrad.
- incorporated some cleanup feedback on k3-image-gen from Julien Olivain such as missing hash on LICENSE file and a later image Generator Git tag is now used (that is matching the TISDK v8.6 baseline equivalent that is being implemented).
- improved wording/descriptions in the 'board/ti/am64x_sk: add new board' commit as suggested by Thomas Petazzoni. Did not make the change regarding explicitly specifying the Cortex-A53 core as it seems to be implied and is not emitted by 'make savedefconfig'. Also using a fixed version of OPTEE as per TI SDK v8.6 baseline addresses Thomas' the desire to build with a known-good version.

Changes in v7:
- changes per François Perrad's review comments

Changes in v6:
- rebased to latest next branch and retested
- updated u-boot and kernel to latest released versions as of today From Andrew's comments:
- added a new SOC_TYPE option for k3-image-gen, as requested by Andrew Davis in a review comment.
From Romain's comments:
- use "if" instead of "depends on" for sub-options
- move TI K3 R5 Loader defconfig selection to Kconfig
- use $(HOST_DIR) instead of $(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR)
- Retain Xuanhao's gmail ID in the MAINTAINERs file, but drop his TI email from CC list as it will be inactive till he rejoins TI
- Add a plain-text license file into the k3-image-gen repository and use it instead of the HTML manifest file. Confirmed that this is still BSD-3-Clause license.
- Add comments in the ti-k3-image-gen.mk file for a couple of options

Changes in v5:
- None (resubmission of Xuanhao's series)

Changes in v4:
- rebased to latest master and retested
- dropped OPTEE CUSTOM* options as we don't need them.

Changes in v3:
- Fix boot/ti-k3-r5-loader package's build options and dependencies.
- Fix boot/ti-k3-image-gen package's config
- Add more details in board/ti/am64x_sk's readme
- Trim configs/am64x_sk's toolchain options and
fix uboot and genimage dependencies.
- Remove board/ti/am62x_sk and configs/am62x_sk for now due to some firmware dependency problems. Will be added back in the future.

Changes in v2:
- Revert arm-gnu-toolchain back to version 10.x due to a bug. When the pre-packaged GCC was built, it could be targeting a newer x86_64 architecture than the processor being used.
- Add boot/ti-k3-r5-loader package that builds a separate U-Boot for the R5 cores on TI's K3 devices.
- Add boot/ti-k3-image-gen package that builds the full boot binary tiboot3.bin from the spl built from ti-k3-r5-loader.
- Add board/ti directory to include sdcard config and board information for AM64x_sk and AM62x_sk boards.
- Add the Buildroot defconfigs for AM64x_sk and AM62x_sk.
- Add to DEVELOPERS list.

[1] https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am64x-devices
[2] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM64X/08.06.00.42
[3] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62X/08.06.00.42
[4] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/linux/Overview_Building_the_SDK.html#build-steps
[5] https://lore.kernel.org/buildroot/20230618134308.p3ehslp5s2j36dqi@dasso/T/

Andreas Dannenberg (8):
boot/ti-k3-r5-loader: allow for full build source customization boot/uboot: add support for building the TI K3 DM into U-Boot board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources package/ti-core-secdev-k3: new package board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants package/ti-rogue-km: new package
package/ti-rogue-um: new package configs/am62x_sk_defconfig: enable IMG Rogue graphics driver

Xuanhao Shi (3):
boot/ti-k3-image-gen: new package
board/ti/am64x_sk: add new board
board/ti/am62x_sk: add new board

 DEVELOPERS                                    |   10 +
 board/ti/am62x_sk/genimage.cfg                |   27 +
 board/ti/am62x_sk/readme.txt                  |   26 +
 .../ti/am62x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am62x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 board/ti/am64x_sk/genimage.cfg                |   27 +
 board/ti/am64x_sk/readme.txt                  |   26 +
 .../ti/am64x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am64x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 boot/Config.in                                |    1 +
 boot/ti-k3-image-gen/Config.in                |   57 +
 boot/ti-k3-image-gen/ti-k3-image-gen.hash     |   17 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       |   91 +
 boot/ti-k3-r5-loader/Config.in                |   65 +-
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       |   42 +-
 boot/uboot/Config.in                          |   17 +
 boot/uboot/uboot.mk                           |   26 +
 configs/am62x_sk_defconfig                    |   56 +
 configs/am64x_sk_defconfig                    |   53 +
 package/Config.in                             |    2 +
 package/Config.in.host                        |    1 +
 package/ti-core-secdev-k3/Config.in.host      |   11 +
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |    3 +
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    |   31 +
 package/ti-rogue-km/Config.in                 |   28 +
 package/ti-rogue-km/ti-rogue-km.hash          |    3 +
 package/ti-rogue-km/ti-rogue-km.mk            |   37 +
 .../0001-all-drop-the-init-script.patch       |  832 +++++++
 package/ti-rogue-um/Config.in                 |   52 +
 package/ti-rogue-um/ti-rogue-um.hash          |    3 +
 package/ti-rogue-um/ti-rogue-um.mk            |   38 +
 31 files changed, 9348 insertions(+), 4 deletions(-)
 create mode 100644 board/ti/am62x_sk/genimage.cfg
 create mode 100644 board/ti/am62x_sk/readme.txt
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_release_defconfig
 create mode 100644 board/ti/am64x_sk/genimage.cfg
 create mode 100644 board/ti/am64x_sk/readme.txt
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_release_defconfig
 create mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
 create mode 100644 configs/am62x_sk_defconfig
 create mode 100644 configs/am64x_sk_defconfig
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
 create mode 100644 package/ti-rogue-km/Config.in
 create mode 100644 package/ti-rogue-km/ti-rogue-km.hash
 create mode 100644 package/ti-rogue-km/ti-rogue-km.mk
 create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
Signature · 6 lines
2.34.1

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

PATCH v9 1/11 boot/ti-k3-r5-loader: allow for full build source customization

The TI K3 R5 loader package essentially is a wrapper to build a special version of U-boot SPL used as part of a multi-stage boot flow on TI K3 devices, and as such needs full flexibility as to specifying the U-Boot sources used for the build. To accomodate this, add the same options as already available in the regular U-Boot package. For most use cases, the same source settings (repo URL, versions, etc.) should be used for both ti-k3-r5-loader and uboot packages.

---
 boot/ti-k3-r5-loader/Config.in          | 65 +++++++++++++++++++++++--
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 32 +++++++++++-
 2 files changed, 93 insertions(+), 4 deletions(-)
boot/ti-k3-r5-loader/Config.in +62 -3
index 10602c8df3..2419babe70 100644
@@ -1,14 +1,73 @@
 config BR2_TARGET_TI_K3_R5_LOADER
-	bool "ti-k3-r5-loader"
+	bool "TI K3 R5 Loader"
 	depends on BR2_aarch64
 	help
-	  Separate U-Boot build for R5 cores on TI's k3 boards.
+	  Separate U-Boot SPL build for R5 core on TI's K3 processors.
 	  Usually used to build tiboot3.bin with k3-image-gen.
 
 if BR2_TARGET_TI_K3_R5_LOADER
 
 choice
-	prompt "Configuration"
+	prompt "U-Boot Version"
+	help
+	  Select the specific U-Boot version you want to use to build the
+	  initial SPL running on the R5 core. Note that for most use cases
+	  you'd want to use the exact same configuration here as it is used
+	  to build the main U-Boot package.
+
+config BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION
+	bool "2022.10"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
+	bool "Custom version"
+	help
+	  This option allows to use a specific official versions
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
+	bool "Custom tarball"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT
+	bool "Custom Git repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG
+	bool "Custom Mercurial repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
+	bool "Custom Subversion repository"
+
+endchoice
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE
+	string "U-Boot version"
+	depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION
+	string "URL of custom U-Boot tarball"
+	depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
+
+if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL
+	string "URL of custom repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_VERSION
+	string "Custom repository version"
+	help
+	  Revision to use in the typical format used by
+	  Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
+
+endif
+
+config BR2_TARGET_TI_K3_R5_LOADER_VERSION
+	string
+	default "2022.10"	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
+	default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_VERSION \
+		if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
+choice
+	prompt "U-Boot Configuration"
 	default BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
 
 config BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +31 -1
index afa309aa98..341888623e 100644
@@ -2,11 +2,41 @@
 #
 # ti-k3-r5-loader
 #
+# The ti-k3-r5 loader package should really be built from the same U-Boot
+# sources as the uboot package itself, so for most users so all LOADER_SITE /
+# LOADER_SOURCE type definitions should be set the same for both packages.
+# However it still makes sense to keep the ti-k3-r5-loader package somewhat
+# separated and independent from the uboot package to allow for special use
+# cases such as Falcon boot (which would skip the uboot package completely).
+#
 ################################################################################
 
-TI_K3_R5_LOADER_VERSION = 2022.10
+TI_K3_R5_LOADER_VERSION = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_VERSION))
+
+ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL),y)
+# Handle custom U-Boot tarballs as specified by the configuration
+TI_K3_R5_LOADER_TARBALL = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION))
+TI_K3_R5_LOADER_SITE = $(patsubst %/,%,$(dir $(TI_K3_R5_LOADER_TARBALL)))
+TI_K3_R5_LOADER_SOURCE = $(notdir $(TI_K3_R5_LOADER_TARBALL))
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT),y)
+TI_K3_R5_LOADER_SITE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))
+TI_K3_R5_LOADER_SITE_METHOD = git
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG),y)
+TI_K3_R5_LOADER_SITE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))
+TI_K3_R5_LOADER_SITE_METHOD = hg
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN),y)
+TI_K3_R5_LOADER_SITE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))
+TI_K3_R5_LOADER_SITE_METHOD = svn
+else
+# Handle stable official U-Boot versions
 TI_K3_R5_LOADER_SITE = https://ftp.denx.de/pub/u-boot
 TI_K3_R5_LOADER_SOURCE = u-boot-$(TI_K3_R5_LOADER_VERSION).tar.bz2
+endif
+
+ifeq ($(BR2_TARGET_TI_K3_R5_LOADER)$(BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION),y)
+BR_NO_CHECK_HASH_FOR += $(TI_K3_R5_LOADER_SOURCE)
+endif
+
 TI_K3_R5_LOADER_LICENSE = GPL-2.0+
 TI_K3_R5_LOADER_LICENSE_FILES = Licenses/gpl-2.0.txt
 TI_K3_R5_LOADER_CPE_ID_VENDOR = denx
Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 01/11] boot/ti-k3-r5-loader: allow for full build source customization

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 7 lines

The TI K3 R5 loader package essentially is a wrapper to build a special version of U-boot SPL used as part of a multi-stage boot flow on TI K3 devices, and as such needs full flexibility as to specifying the U-Boot sources used for the build. To accomodate this, add the same options as already available in the regular U-Boot package. For most use cases, the same source settings (repo URL, versions, etc.) should be used for both ti-k3-r5-loader and uboot packages.

Currently, there is no dependency ("depends on" or "select") between uboot and ti-k3-r5-loader; yet, your phrasing seems to imply that it does not make sense to build ti-k3-r5-loader without building uboot.

Then, in the comment below, you add a note about "Falcon boot (which would skip the uboot package completely)".

So, I'm a bit curious here: what should the user do when uboot is not enabled, if we instruct it to use the same version?

Quoted 11 lines
---
 boot/ti-k3-r5-loader/Config.in          | 65 +++++++++++++++++++++++--
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 32 +++++++++++-
 2 files changed, 93 insertions(+), 4 deletions(-)
boot/ti-k3-r5-loader/Config.in +0 -0
index 10602c8df3..2419babe70 100644

boot/ti-k3-r5-loader/Config.in line 2

Quoted 3 lines
boot/ti-k3-r5-loader/Config.in +1 -1
@@ -1,14 +1,73 @@
 config BR2_TARGET_TI_K3_R5_LOADER
-	bool "ti-k3-r5-loader"
+	bool "TI K3 R5 Loader"

Our prompts always match the package name in Buildroot, i.e. the directory name. In this case, ti-k3-r5-loader is exactly that and we want to keep that.

boot/ti-k3-r5-loader/Config.in line 11

Quoted 11 lines
boot/ti-k3-r5-loader/Config.in +2 -2
 	depends on BR2_aarch64
 	help
-	  Separate U-Boot build for R5 cores on TI's k3 boards.
+	  Separate U-Boot SPL build for R5 core on TI's K3 processors.
 	  Usually used to build tiboot3.bin with k3-image-gen.
 
 if BR2_TARGET_TI_K3_R5_LOADER
 
 choice
-	prompt "Configuration"
+	prompt "U-Boot Version"

It is a bit confusing tho see "U-Boot version" in the "ti-k3-r5-loader" package. I know it is really just a uboot being compiled, but still this is confusing. I'd keep ti-k3-r5-loader in the prompts. I could be convinced for the middle ground "ti-k3-r5-loader U-Boot version" if you really want to have U-Boot there.

Since you want the defaults to be the same as uboot, you can do that:

choice
bool "U-Boot version"
default BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION if BR2_TARGET_UBOOT_LATEST_VERSION default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION if BR2_TARGET_UBOOT_CUSTOM_VERSION default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL if BR2_TARGET_UBOOT_CUSTOM_TARBALL default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT if BR2_TARGET_UBOOT_CUSTOM_GIT default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG if BR2_TARGET_UBOOT_CUSTOM_HG default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN if BR2_TARGET_UBOOT_CUSTOM_SVN default BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION # Fallback if uboot not enabled

...
endchoice

config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE
string "U-Boot version"
default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION

config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION
string "URL of custom U-Boot tarball" default BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL

... and so on, you get the gist.

[--SNIP--]

boot/ti-k3-r5-loader/Config.in line 70

Quoted 1 line
boot/ti-k3-r5-loader/Config.in +1 -0
+	prompt "U-Boot Configuration"

Same comment as for the version prompt.

[--SNIP--]

Quoted 5 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index afa309aa98..341888623e 100644

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk line 10

Quoted 9 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +6 -0
@@ -2,11 +2,41 @@
 #
 # ti-k3-r5-loader
 #
+# The ti-k3-r5 loader package should really be built from the same U-Boot
+# sources as the uboot package itself, so for most users so all LOADER_SITE /
+# LOADER_SOURCE type definitions should be set the same for both packages.
+# However it still makes sense to keep the ti-k3-r5-loader package somewhat
+# separated and independent from the uboot package to allow for special use
+# cases such as Falcon boot (which would skip the uboot package completely).

Do you mean that uboot would not be built at all, or that the uboot binary would not be loaded at runtime?

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH v9 01/11] boot/ti-k3-r5-loader: allow for full build source customization

Quoted 11 lines · Yann E. MORIN

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 7 lines

The TI K3 R5 loader package essentially is a wrapper to build a special version of U-boot SPL used as part of a multi-stage boot flow on TI K3 devices, and as such needs full flexibility as to specifying the U-Boot sources used for the build. To accomodate this, add the same options as already available in the regular U-Boot package. For most use cases, the same source settings (repo URL, versions, etc.) should be used for both ti-k3-r5-loader and uboot packages.

Quoted 3 lines

Currently, there is no dependency ("depends on" or "select") between uboot and ti-k3-r5-loader; yet, your phrasing seems to imply that it does not make sense to build ti-k3-r5-loader without building uboot.

That's not what I read in that paragraph. I think it means that the same
source should be used as U-Boot. It's just a separate package because, AFAIU, it may use a different .config.

If that is true, and I'm not missing anything else, then the situation
actually looks quite similar to barebox-aux. With the difference that for Falcon boot you want to have only "u-boot-aux" and not the full u-boot. So, if what I'm saying is true, then perhaps it's better to approach it the same way as in barebox?

At the very minimum, I think there should be a "same version as U-Boot"
option, which is the default (if U-Boot is enabled). There's a bit the unfortunate aspect that this package becomes before U-Boot in the menu, but let's assume people typically start from a defconfig.

Regards,
Arnout

Quoted 95 lines

Then, in the comment below, you add a note about "Falcon boot (which would skip the uboot package completely)".

So, I'm a bit curious here: what should the user do when uboot is not enabled, if we instruct it to use the same version?

Quoted 11 lines
---
  boot/ti-k3-r5-loader/Config.in          | 65 +++++++++++++++++++++++--
  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 32 +++++++++++-
  2 files changed, 93 insertions(+), 4 deletions(-)
boot/ti-k3-r5-loader/Config.in +0 -0
index 10602c8df3..2419babe70 100644

boot/ti-k3-r5-loader/Config.in line 2

Quoted 3 lines
boot/ti-k3-r5-loader/Config.in +1 -1
@@ -1,14 +1,73 @@
  config BR2_TARGET_TI_K3_R5_LOADER
-	bool "ti-k3-r5-loader"
+	bool "TI K3 R5 Loader"

Our prompts always match the package name in Buildroot, i.e. the directory name. In this case, ti-k3-r5-loader is exactly that and we want to keep that.

boot/ti-k3-r5-loader/Config.in line 11

Quoted 11 lines
boot/ti-k3-r5-loader/Config.in +2 -2
  	depends on BR2_aarch64
  	help
-	  Separate U-Boot build for R5 cores on TI's k3 boards.
+	  Separate U-Boot SPL build for R5 core on TI's K3 processors.
  	  Usually used to build tiboot3.bin with k3-image-gen.
 
  if BR2_TARGET_TI_K3_R5_LOADER
 
  choice
-	prompt "Configuration"
+	prompt "U-Boot Version"

It is a bit confusing tho see "U-Boot version" in the "ti-k3-r5-loader" package. I know it is really just a uboot being compiled, but still this is confusing. I'd keep ti-k3-r5-loader in the prompts. I could be convinced for the middle ground "ti-k3-r5-loader U-Boot version" if you really want to have U-Boot there.

Since you want the defaults to be the same as uboot, you can do that:

choice
bool "U-Boot version"
default BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION if BR2_TARGET_UBOOT_LATEST_VERSION default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION if BR2_TARGET_UBOOT_CUSTOM_VERSION default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL if BR2_TARGET_UBOOT_CUSTOM_TARBALL default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT if BR2_TARGET_UBOOT_CUSTOM_GIT default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG if BR2_TARGET_UBOOT_CUSTOM_HG default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN if BR2_TARGET_UBOOT_CUSTOM_SVN default BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION # Fallback if uboot not enabled

...
endchoice

config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE
string "U-Boot version"
default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION

config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION
string "URL of custom U-Boot tarball" default BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL

... and so on, you get the gist.

[--SNIP--]

boot/ti-k3-r5-loader/Config.in line 70

Quoted 1 line
boot/ti-k3-r5-loader/Config.in +1 -0
+	prompt "U-Boot Configuration"

Same comment as for the version prompt.

[--SNIP--]

Quoted 5 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index afa309aa98..341888623e 100644

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk line 10

Quoted 9 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +6 -0
@@ -2,11 +2,41 @@
  #
  # ti-k3-r5-loader
  #
+# The ti-k3-r5 loader package should really be built from the same U-Boot
+# sources as the uboot package itself, so for most users so all LOADER_SITE /
+# LOADER_SOURCE type definitions should be set the same for both packages.
+# However it still makes sense to keep the ti-k3-r5-loader package somewhat
+# separated and independent from the uboot package to allow for special use
+# cases such as Falcon boot (which would skip the uboot package completely).

Do you mean that uboot would not be built at all, or that the uboot binary would not be loaded at runtime?

Quoted 3 lines

Regards,
Yann E. MORIN.

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

#4 lore raw

Re: [Buildroot] [PATCH v9 01/11] boot/ti-k3-r5-loader: allow for full build source customization

Arnout, Andreas, All,

On 2023-06-25 15:21 +0200, Arnout Vandecappelle spake thusly:

Quoted 10 lines · Yann E. MORIN
Quoted 9 lines

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 7 lines

The TI K3 R5 loader package essentially is a wrapper to build a special version of U-boot SPL used as part of a multi-stage boot flow on TI K3 devices, and as such needs full flexibility as to specifying the U-Boot sources used for the build. To accomodate this, add the same options as already available in the regular U-Boot package. For most use cases, the same source settings (repo URL, versions, etc.) should be used for both ti-k3-r5-loader and uboot packages.

Quoted 7 lines
Quoted 3 lines

Currently, there is no dependency ("depends on" or "select") between uboot and ti-k3-r5-loader; yet, your phrasing seems to imply that it does not make sense to build ti-k3-r5-loader without building uboot.

That's not what I read in that paragraph. I think it means that the same
source should be used as U-Boot. It's just a separate package because, AFAIU, it may use a different .config.

Yeah, but I found the commit log confusing...

Quoted 5 lines

If that is true, and I'm not missing anything else, then the situation
actually looks quite similar to barebox-aux. With the difference that for Falcon boot you want to have only "u-boot-aux" and not the full u-boot. So, if what I'm saying is true, then perhaps it's better to approach it the same way as in barebox?

Or the same way as grub, where we can build, one, two, or more grubs? For uboot, probably the barebox way would be easier (not easy, just easier)...

Quoted 4 lines

At the very minimum, I think there should be a "same version as U-Boot"
option, which is the default (if U-Boot is enabled). There's a bit the unfortunate aspect that this package becomes before U-Boot in the menu, but let's assume people typically start from a defconfig.

I was thinking about that too, which would be better than what I suggested below... I had a rationale in my head that refrained me from suggesting it, but I can't remember why I thought it would not be good... Age, you'd say. Thanks. ;-]

Regards,
Yann E. MORIN.

Quoted 99 lines

Regards,
Arnout

Quoted 96 lines

Then, in the comment below, you add a note about "Falcon boot (which would skip the uboot package completely)".

So, I'm a bit curious here: what should the user do when uboot is not enabled, if we instruct it to use the same version?

Quoted 11 lines
---
 boot/ti-k3-r5-loader/Config.in          | 65 +++++++++++++++++++++++--
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 32 +++++++++++-
 2 files changed, 93 insertions(+), 4 deletions(-)
boot/ti-k3-r5-loader/Config.in +0 -0
index 10602c8df3..2419babe70 100644

boot/ti-k3-r5-loader/Config.in line 2

Quoted 3 lines
boot/ti-k3-r5-loader/Config.in +1 -1
@@ -1,14 +1,73 @@
 config BR2_TARGET_TI_K3_R5_LOADER
-	bool "ti-k3-r5-loader"
+	bool "TI K3 R5 Loader"

Our prompts always match the package name in Buildroot, i.e. the directory name. In this case, ti-k3-r5-loader is exactly that and we want to keep that.

boot/ti-k3-r5-loader/Config.in line 11

Quoted 9 lines
boot/ti-k3-r5-loader/Config.in +2 -2
 	depends on BR2_aarch64
 	help
-	  Separate U-Boot build for R5 cores on TI's k3 boards.
+	  Separate U-Boot SPL build for R5 core on TI's K3 processors.
 	  Usually used to build tiboot3.bin with k3-image-gen.
 if BR2_TARGET_TI_K3_R5_LOADER
 choice
-	prompt "Configuration"
+	prompt "U-Boot Version"

It is a bit confusing tho see "U-Boot version" in the "ti-k3-r5-loader" package. I know it is really just a uboot being compiled, but still this is confusing. I'd keep ti-k3-r5-loader in the prompts. I could be convinced for the middle ground "ti-k3-r5-loader U-Boot version" if you really want to have U-Boot there.

Since you want the defaults to be the same as uboot, you can do that:

choice
bool "U-Boot version"
default BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION if BR2_TARGET_UBOOT_LATEST_VERSION default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION if BR2_TARGET_UBOOT_CUSTOM_VERSION default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL if BR2_TARGET_UBOOT_CUSTOM_TARBALL default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT if BR2_TARGET_UBOOT_CUSTOM_GIT default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG if BR2_TARGET_UBOOT_CUSTOM_HG default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN if BR2_TARGET_UBOOT_CUSTOM_SVN default BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION # Fallback if uboot not enabled

...
endchoice

config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE
string "U-Boot version"
default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION

config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION
string "URL of custom U-Boot tarball" default BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL

... and so on, you get the gist.

[--SNIP--]

boot/ti-k3-r5-loader/Config.in line 70

Quoted 1 line
boot/ti-k3-r5-loader/Config.in +1 -0
+	prompt "U-Boot Configuration"

Same comment as for the version prompt.

[--SNIP--]

Quoted 5 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index afa309aa98..341888623e 100644

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk line 10

Quoted 9 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +6 -0
@@ -2,11 +2,41 @@
 #
 # ti-k3-r5-loader
 #
+# The ti-k3-r5 loader package should really be built from the same U-Boot
+# sources as the uboot package itself, so for most users so all LOADER_SITE /
+# LOADER_SOURCE type definitions should be set the same for both packages.
+# However it still makes sense to keep the ti-k3-r5-loader package somewhat
+# separated and independent from the uboot package to allow for special use
+# cases such as Falcon boot (which would skip the uboot package completely).

Do you mean that uboot would not be built at all, or that the uboot binary would not be loaded at runtime?

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH v9 01/11] boot/ti-k3-r5-loader: allow for full build source customization

In reply to Andreas Dannenberg via buildroot

Hi Andreas,

Quoted 13 lines · Andreas Dannenberg via buildroot

The TI K3 R5 loader package essentially is a wrapper to build a special version of U-boot SPL used as part of a multi-stage boot flow on TI K3 devices, and as such needs full flexibility as to specifying the U-Boot sources used for the build. To accomodate this, add the same options as already available in the regular U-Boot package. For most use cases, the same source settings (repo URL, versions, etc.) should be used for both ti-k3-r5-loader and uboot packages.

---
 boot/ti-k3-r5-loader/Config.in          | 65 +++++++++++++++++++++++--
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 32 +++++++++++-
 2 files changed, 93 insertions(+), 4 deletions(-)

[...]

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk line 4

Quoted 8 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +0 -0
index afa309aa98..341888623e 100644
@@ -2,11 +2,41 @@
 #
 # ti-k3-r5-loader
 #

Running the command "utils/docker-run make check-package" reports warnings here:

    boot/ti-k3-r5-loader/ti-k3-r5-loader.mk:5: should be 80 hashes 

(http://nightly.buildroot.org/#writing-rules-mk)
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk:6: should be a blank line
(http://nightly.buildroot.org/#writing-rules-mk)

To fix this warning, you should keep the first 6 original lines unchanged and move this comment just after.

Quoted 47 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -0
+# The ti-k3-r5 loader package should really be built from the same 

U-Boot
+# sources as the uboot package itself, so for most users so all LOADER_SITE /
+# LOADER_SOURCE type definitions should be set the same for both packages.
+# However it still makes sense to keep the ti-k3-r5-loader package somewhat
+# separated and independent from the uboot package to allow for special use
+# cases such as Falcon boot (which would skip the uboot package completely).
+#

################################################################################

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +1 -1
-TI_K3_R5_LOADER_VERSION = 2022.10
+TI_K3_R5_LOADER_VERSION = $(call 

qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_VERSION))

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +4 -0
+
+ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL),y)
+# Handle custom U-Boot tarballs as specified by the configuration
+TI_K3_R5_LOADER_TARBALL = $(call 

qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION)) +TI_K3_R5_LOADER_SITE = $(patsubst %/,%,$(dir $(TI_K3_R5_LOADER_TARBALL)))

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
+TI_K3_R5_LOADER_SOURCE = $(notdir $(TI_K3_R5_LOADER_TARBALL))
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT),y)
+TI_K3_R5_LOADER_SITE = $(call 

qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
+TI_K3_R5_LOADER_SITE_METHOD = git
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG),y)
+TI_K3_R5_LOADER_SITE = $(call 

qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
+TI_K3_R5_LOADER_SITE_METHOD = hg
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN),y)
+TI_K3_R5_LOADER_SITE = $(call 

qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +6 -0
+TI_K3_R5_LOADER_SITE_METHOD = svn
+else
+# Handle stable official U-Boot versions
 TI_K3_R5_LOADER_SITE = https://ftp.denx.de/pub/u-boot
 TI_K3_R5_LOADER_SOURCE = u-boot-$(TI_K3_R5_LOADER_VERSION).tar.bz2
+endif
+
+ifeq 

($(BR2_TARGET_TI_K3_R5_LOADER)$(BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION),y)

boot/ti-k3-r5-loader/ti-k3-r5-loader.mk line 42

Quoted 6 lines
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +3 -0
+BR_NO_CHECK_HASH_FOR += $(TI_K3_R5_LOADER_SOURCE)
+endif
+
 TI_K3_R5_LOADER_LICENSE = GPL-2.0+
 TI_K3_R5_LOADER_LICENSE_FILES = Licenses/gpl-2.0.txt
 TI_K3_R5_LOADER_CPE_ID_VENDOR = denx

Best regards,

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

#6 lore raw

Re: [Buildroot] [PATCH v9 01/11] boot/ti-k3-r5-loader: allow for full build source customization

In reply to Andreas Dannenberg via buildroot

Hi Andreas,

Quoted 28 lines · Andreas Dannenberg via buildroot

The TI K3 R5 loader package essentially is a wrapper to build a special version of U-boot SPL used as part of a multi-stage boot flow on TI K3 devices, and as such needs full flexibility as to specifying the U-Boot sources used for the build. To accomodate this, add the same options as already available in the regular U-Boot package. For most use cases, the same source settings (repo URL, versions, etc.) should be used for both ti-k3-r5-loader and uboot packages.

---
 boot/ti-k3-r5-loader/Config.in          | 65 +++++++++++++++++++++++--
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 32 +++++++++++-
 2 files changed, 93 insertions(+), 4 deletions(-)
boot/ti-k3-r5-loader/Config.in +2 -2
index 10602c8df3..2419babe70 100644
@@ -1,14 +1,73 @@
 config BR2_TARGET_TI_K3_R5_LOADER
-	bool "ti-k3-r5-loader"
+	bool "TI K3 R5 Loader"
 	depends on BR2_aarch64
 	help
-	  Separate U-Boot build for R5 cores on TI's k3 boards.
+	  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/Config.in line 16

Quoted 10 lines
boot/ti-k3-r5-loader/Config.in +6 -1
 if BR2_TARGET_TI_K3_R5_LOADER
 
 choice
-	prompt "Configuration"
+	prompt "U-Boot Version"
+	help
+	  Select the specific U-Boot version you want to use to build the
+	  initial SPL running on the R5 core. Note that for most use cases
+	  you'd want to use the exact same configuration here as it is used
+	  to build the main U-Boot package.

The command "utils/docker-run make check-package" reports warnings here:

    boot/ti-k3-r5-loader/Config.in:13: help text: <tab><2 spaces><62 
chars> (http://nightly.buildroot.org/#writing-rules-config-in)
    boot/ti-k3-r5-loader/Config.in:14: help text: <tab><2 spaces><62 
chars> (http://nightly.buildroot.org/#writing-rules-config-in)
    boot/ti-k3-r5-loader/Config.in:15: help text: <tab><2 spaces><62 

chars> (http://nightly.buildroot.org/#writing-rules-config-in)

To fix this issue, the help text should be reflowed as follow:

choice
prompt "U-Boot Version"
help
Select the specific U-Boot version you want to use to build the initial SPL running on the R5 core. Note that for most use cases you'd want to use the exact same configuration here as it is used to build the main U-Boot package.

Quoted 54 lines
boot/ti-k3-r5-loader/Config.in +32 -0
+
+config BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION
+	bool "2022.10"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
+	bool "Custom version"
+	help
+	  This option allows to use a specific official versions
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
+	bool "Custom tarball"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT
+	bool "Custom Git repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG
+	bool "Custom Mercurial repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
+	bool "Custom Subversion repository"
+
+endchoice
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE
+	string "U-Boot version"
+	depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION
+	string "URL of custom U-Boot tarball"
+	depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
+
+if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT || 

BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN

boot/ti-k3-r5-loader/Config.in +20 -0
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL
+	string "URL of custom repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_VERSION
+	string "Custom repository version"
+	help
+	  Revision to use in the typical format used by
+	  Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
+
+endif
+
+config BR2_TARGET_TI_K3_R5_LOADER_VERSION
+	string
+	default "2022.10"	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
+	default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_VERSION \
+		if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT || 

BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN

boot/ti-k3-r5-loader/Config.in line 73

Quoted 5 lines
boot/ti-k3-r5-loader/Config.in +2 -0
+choice
+	prompt "U-Boot Configuration"
 	default BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
 
 config BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG

[...]

Best regards,

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

#7 lore raw

PATCH v9 2/11 boot/ti-k3-image-gen: new package

In reply to Andreas Dannenberg via buildroot

From: Xuanhao Shi <[email protected]>

This is the image generator that builds the initial boot binary, tiboot3.bin, for the R5 core on TI's K3 family of devices. This requires the R5 SPL output from the ti-k3-r5-loader package.

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

---
 DEVELOPERS                                |  2 +
 boot/Config.in                            |  1 +
 boot/ti-k3-image-gen/Config.in            | 57 ++++++++++++++++
 boot/ti-k3-image-gen/ti-k3-image-gen.hash | 17 +++++
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 81 +++++++++++++++++++++++
 5 files changed, 158 insertions(+)
 create mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
DEVELOPERS +2 -0
index 694dfe0bdd..7ed9f040cc 100644
@@ -129,6 +129,7 @@ F:	package/libxmlrpc/
 F:	package/python-docopt/
 
 N:	Anand Gadiyar <[email protected]>
+F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
 
 N:	André Zwing <[email protected]>
@@ -3020,6 +3021,7 @@ N:	Wojciech Niziński <[email protected]>
 F:	package/fwup/
 
 N:	Xuanhao Shi <[email protected]>
+F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
 
 N:	Yair Ben Avraham <[email protected]>
boot/Config.in +1 -0
index 58366e035e..3c2b05438d 100644
@@ -20,6 +20,7 @@ source "boot/opensbi/Config.in"
 source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/syslinux/Config.in"
+source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
boot/ti-k3-image-gen/Config.in new file +57 -0

57 lines not on this page · raw message

boot/ti-k3-image-gen/ti-k3-image-gen.hash new file +17 -0
new file mode 100644
index 0000000000..2c73927e0b
@@ -0,0 +1,17 @@
+# Locally calculated
+sha256  f89ea4b1f5c992455b1a682fde48359221b53f3294135df4bf20feea6aea90e4  k3-image-gen-08.06.00.007.tar.gz
+sha256  f012e8d000d711d0539e5b4c812fc1d3a59c10fc1e3d6ea155556f5b78286845  LICENSE
+
+sha256  eca3d0dca65ceabdf17c7efa6b0eb651d365c6056730aa1c67700b7fea2e8bd2  ti-fs-firmware-am62x-gp.bin
+sha256  9ed6089ca7d59e9e5919b0da92effe788138edef41682e0bf7eaea25a896a4f1  ti-fs-firmware-am62x-hs-cert.bin
+sha256  655b5ded62b63f26c17b3ae2f23ac3565ae91fbd7fba1b7b0a4cb7807467523b  ti-fs-firmware-am62x-hs-enc.bin
+sha256  5efa229acd122685fa928170a3f2e39597cce0231fca10b03d9b4d519db2259f  ti-fs-firmware-am62x-hs-fs-cert.bin
+sha256  0f49da5e616a95dc8573531799d20fa7697a000f88084d09f3f6f5a665d85680  ti-fs-firmware-am62x-hs-fs-enc.bin
+
+sha256  958fdb0613a1dc3a5cb90edf35b84981b94bd70de6255cdf5f220bce2a4b10ef  ti-sci-firmware-am64x-gp.bin
+sha256  cfee8679183577392b513b317a4d9a6af47cde9a59ecbad758704e4bec38196c  ti-sci-firmware-am64x-hs-cert.bin
+sha256  8760b70cc18cd5921d634ce226122aed5a28d64857d90f6ede40f2383dabd169  ti-sci-firmware-am64x-hs-enc.bin
+sha256  1e78b106a8c7acd1641863ef86946e0d7272ad9b2d0e7ce451936d36a14e70e7  ti-sci-firmware-am64x_sr2-hs-cert.bin
+sha256  c626bacd4abfbe4de1133b72568394a2e20dbe9a1623a3e77bae9f000e743bb4  ti-sci-firmware-am64x_sr2-hs-enc.bin
+sha256  1d48d758d9ed940fe4072bd5b024ec502c72782ce2ca1c085f043f104a62ca70  ti-sci-firmware-am64x_sr2-hs-fs-cert.bin
+sha256  1b22ba9ab5b94a9942e1f9c203b81733030c8bf4543a0aefffd200876a0c66eb  ti-sci-firmware-am64x_sr2-hs-fs-enc.bin
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +81 -0

81 lines not on this page · raw message

Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 02/11] boot/ti-k3-image-gen: new package

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 17 lines

From: Xuanhao Shi <[email protected]>

This is the image generator that builds the initial boot binary, tiboot3.bin, for the R5 core on TI's K3 family of devices. This requires the R5 SPL output from the ti-k3-r5-loader package.

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

Quoted 1 line

---

[--SNIP--]

Quoted 6 lines
boot/ti-k3-image-gen/Config.in new file +0 -0
new file mode 100644
index 0000000000..910e1b99bc

boot/ti-k3-image-gen/Config.in line 8

Quoted 8 lines
boot/ti-k3-image-gen/Config.in new file +8 -0
@@ -0,0 +1,57 @@
+config BR2_TARGET_TI_K3_IMAGE_GEN
+	bool "ti-k3-image-gen"
+	depends on BR2_TARGET_TI_K3_R5_LOADER
+	help
+	  Use TI's k3-image-gen to build a separate bare metal
+	  boot binary from a separate SPL that is running on
+	  the R5 core. Currently supports version 08.06.00.007
+	  as default.

It is not "as default" as this is indeed the only version possible (i.e. there is no choice).

Also, we usualy do not reference the version in the help text, because that makes it another place to track, and it is going to get out of sync very quickly when the version is updated in the .mk.

Quoted 16 lines
boot/ti-k3-image-gen/Config.in new file +16 -0
+	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
+
+if BR2_TARGET_TI_K3_IMAGE_GEN
+choice
+	prompt "Firmware type"
+	default BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TIFS
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TIFS
+	bool "TIFS"
+	help
+	  Use firmware type TIFS for SoCs like AM62x and
+	  AM62Ax.
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TISCI
+	bool "TISCI"
+	help

boot/ti-k3-image-gen/Config.in line 35

Quoted 10 lines
boot/ti-k3-image-gen/Config.in new file +10 -0
+	  Use firmware type TISCI for SoCs like AM64x and
+	  AM65x.
+
+endchoice
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
+	string "SoC"
+	help
+	  The target SoC option for image gen.
+	  For example, "am64x" for AM64x boards.

Is there a list of SoCs? Does it make sense to restrict the option o only the existing list? Or is the list too long?

I'd use the freescale-imx packages as an example:

choice
prompt "i.MX platform"

config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK
bool "imx25-3stack"

config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS
bool "imx27ads"

config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX37_3STACK
bool "imx37-3stack"

config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX50
bool "imx50"

[snip 12 other platforms]
endchoice

config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
string
default "IMX25_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK default "IMX27ADS" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS default "IMX37_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX37_3STACK default "IMX50" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX50 [snip the other 11 platforms [0]]

If the list for the TI SoCs is short enough (I can see only eight in the source tree, under soc/), then we should make it a list:

    choice
        bool "SoC"

    config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
        bool "am62x"
        select BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TIFS

    config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62AX
        bool "am62Ax"
        select BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TIFS

    config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM64X
        bool "am64x"
        select BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TISCI

    config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM65X
        bool "am65x"
        select BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TISCI

    config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_J7200
        bool "j7200"
        select BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TIFS  # This is just for illustration!
        select BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TISCI # Adapt as fit, of course!

    endchoice

    config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
        string
        default "am62x" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
        default "am62ax" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62ax
        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_HAS_FW_TYPE_TIFS
        bool
        help
          Select this if your SoC supports TIFS firmware.

    config BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TISCI
        bool
        help
          Select this if your SoC supports TISCI firmware.

    choice
        bool "Firmware type"

    config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TIFS
        bool "TIFS"
        depends on BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TIFS

    config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TISCI
        bool "TISCI"
        depends on BR2_TARGET_TI_K3_IMAGE_GEN_HAS_FW_TYPE_TISCI

    endchoice

    config BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE
        string
        default "ti-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TIFS
        default "ti-sci" if BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TISCI
Quoted 4 lines
boot/ti-k3-image-gen/Config.in new file +4 -0
+choice
+	prompt "SoC Security type"
+	default BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_HS_FS
+

boot/ti-k3-image-gen/Config.in line 50

Quoted 10 lines
boot/ti-k3-image-gen/Config.in new file +10 -0
+config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP
+	bool "GP (General Purpose)"
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_HS_FS
+	bool "HS-FS (High Security - Field Securable)"
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_HS_SE
+	bool "HS-SE (High Security - Security Enforcing)"
+
+endchoice

Do all SoCs support all security types? Or should this be restricted like the firmware type?

Also, add a string option, it's easier than handling it in the .mk:

config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE
string
default "gp" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP default "hs-fs" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_HS_FS default "hs" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_HS_SE

boot/ti-k3-image-gen/Config.in line 57

Quoted 6 lines
boot/ti-k3-image-gen/Config.in new file +6 -0
+config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
+	string "Config type"
+	help
+	  The board config option for image gen.
+	  Usually "sk" or "evm".
+endif

Looking at the source tree, $(CONFIG) is used as a subdirectory to the SoC directory:

    soc_srcroot = $(BUILD_SRC)/soc/$(BASE_SOC)/$(CONFIG)

And of all eight SoC I could see there, they all only have "evm" as a subdirectory... So I think that we should just hard-code "evm" for now.

Quoted 35 lines
boot/ti-k3-image-gen/ti-k3-image-gen.hash new file +17 -0
new file mode 100644
index 0000000000..2c73927e0b
@@ -0,0 +1,17 @@ 
+# Locally calculated
+sha256 f89ea4b1f5c992455b1a682fde48359221b53f3294135df4bf20feea6aea90e4 k3-image-gen-08.06.00.007.tar.gz
+sha256 f012e8d000d711d0539e5b4c812fc1d3a59c10fc1e3d6ea155556f5b78286845 LICENSE
+
+sha256 eca3d0dca65ceabdf17c7efa6b0eb651d365c6056730aa1c67700b7fea2e8bd2 ti-fs-firmware-am62x-gp.bin
+sha256 9ed6089ca7d59e9e5919b0da92effe788138edef41682e0bf7eaea25a896a4f1 ti-fs-firmware-am62x-hs-cert.bin
+sha256 655b5ded62b63f26c17b3ae2f23ac3565ae91fbd7fba1b7b0a4cb7807467523b ti-fs-firmware-am62x-hs-enc.bin
+sha256 5efa229acd122685fa928170a3f2e39597cce0231fca10b03d9b4d519db2259f ti-fs-firmware-am62x-hs-fs-cert.bin
+sha256 0f49da5e616a95dc8573531799d20fa7697a000f88084d09f3f6f5a665d85680 ti-fs-firmware-am62x-hs-fs-enc.bin
+
+sha256 958fdb0613a1dc3a5cb90edf35b84981b94bd70de6255cdf5f220bce2a4b10ef ti-sci-firmware-am64x-gp.bin
+sha256 cfee8679183577392b513b317a4d9a6af47cde9a59ecbad758704e4bec38196c ti-sci-firmware-am64x-hs-cert.bin
+sha256 8760b70cc18cd5921d634ce226122aed5a28d64857d90f6ede40f2383dabd169 ti-sci-firmware-am64x-hs-enc.bin
+sha256 1e78b106a8c7acd1641863ef86946e0d7272ad9b2d0e7ce451936d36a14e70e7 ti-sci-firmware-am64x_sr2-hs-cert.bin
+sha256 c626bacd4abfbe4de1133b72568394a2e20dbe9a1623a3e77bae9f000e743bb4 ti-sci-firmware-am64x_sr2-hs-enc.bin
+sha256 1d48d758d9ed940fe4072bd5b024ec502c72782ce2ca1c085f043f104a62ca70 ti-sci-firmware-am64x_sr2-hs-fs-cert.bin
+sha256 1b22ba9ab5b94a9942e1f9c203b81733030c8bf4543a0aefffd200876a0c66eb ti-sci-firmware-am64x_sr2-hs-fs-enc.bin
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +6 -0
new file mode 100644
index 0000000000..b624f93771
@@ -0,0 +1,81 @@
+################################################################################
+#
+# ti-k3-image-gen
+#
+################################################################################
+

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 16

Quoted 10 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +10 -0
+TI_K3_IMAGE_GEN_VERSION = 08.06.00.007
+TI_K3_IMAGE_GEN_SITE = https://git.ti.com/cgit/k3-image-gen/k3-image-gen/snapshot
+TI_K3_IMAGE_GEN_SOURCE = k3-image-gen-$(TI_K3_IMAGE_GEN_VERSION).tar.gz
+TI_K3_IMAGE_GEN_LICENSE = BSD-3-Clause
+TI_K3_IMAGE_GEN_LICENSE_FILES = LICENSE
+TI_K3_IMAGE_GEN_INSTALL_IMAGES = YES
+
+# ti-k3-image-gen is used to build tiboot3.bin, using the r5-u-boot-spl.bin file
+# from the ti-k3-r5-loader package. Hence the dependency on ti-k3-r5-loader.
+TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader

There are a bunch of python scripts, so you probably also need $(BR2_PYTHON3_HOST_DEPENDENCY) as a dependency.

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 19

Quoted 2 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +2 -0
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TIFS),y)
+TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,"ti-fs")

No need to call qstrip on a constant; just use the unquoted constant to begin with:

    TI_K3_IMAGE_GEN_FW_TYPE = ti-fs

But see below...

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 23

Quoted 4 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +4 -0
+else ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TISCI),y)
+TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,"ti-sci")
+else
+$(error No TI K3 Image Gen firmware type set)

That can't be possible, as this is a choice: exactly one entry in a choice will be enabled. No less, no more.

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 23

Quoted 1 line
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +1 -0
+endif

Much simpler with the kconfig option:

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

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 36

Quoted 11 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +11 -0
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
+
+ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP),y)
+TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,"gp")
+else ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_HS_FS),y)
+TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,"hs-fs")
+else ifeq ($(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_HS_SE),y)
+TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,"hs")
+else
+$(error No TI K3 Image Gen SoC security type set)
+endif

Much simpler now with the Kconfig option:

    TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE))

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 38

Quoted 1 line
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +1 -0
+TI_K3_IMAGE_GEN_CONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))

Not needed as we're going to make it a constant [1]...

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 42

Quoted 3 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +3 -0
+# This hash comes from the Makefile in ti-k3-image-gen and corresponds to
+# FW from Git tag 08.06.00.006
+TI_K3_SYSFW_VERSION = 340194800a581baf976360386dfc7b5acab8d948

Variables must be scoped to the package name, i.e.:

    TI_K3_IMAGE_GEN_SYSFW_VERSION = 340194800a581baf976360386dfc7b5acab8d948

Why can't we use the tag? It at least seemed to work for me here...

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 52

Quoted 10 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +10 -0
+TI_K3_SYSFW_SITE = https://git.ti.com/processor-firmware/ti-linux-firmware/blobs/raw/$(TI_K3_SYSFW_VERSION)/ti-sysfw
+ifeq ($(TI_K3_IMAGE_GEN_SOC_TYPE),gp)
+TI_K3_SYSFW_SOURCE = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SOC_TYPE).bin
+else
+TI_K3_SYSFW_SOURCE = \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SOC_TYPE)-cert.bin \
+	$(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SOC_TYPE)-enc.bin
+endif
+TI_K3_IMAGE_GEN_EXTRA_DOWNLOADS = $(patsubst %,$(TI_K3_SYSFW_SITE)/%,$(TI_K3_SYSFW_SOURCE))

I do not like that we download files from another repository. Why can't we have a separate package, in package/ti-linux-firmware/, that downloads the firmware files and isntalls the needed ones in $(TARGET_DIR), which ti-k3-image-gen can then grab at will?

We have linux-firmware, rpi-firmware, ambian-firmware, wilc-firmware, and quite a few others, which sole responsibility is to idneed just git-clone or wget a firmware package and isntall blobs in $(TARGET_DIR).

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 63

Quoted 11 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +11 -0
+
+define TI_K3_SYSFW_COPY
+	$(foreach f,$(TI_K3_SYSFW_SOURCE), \
+		cp $(TI_K3_IMAGE_GEN_DL_DIR)/$(f) $(@D)$(sep))
+endef
+TI_K3_IMAGE_GEN_POST_EXTRACT_HOOKS += TI_K3_SYSFW_COPY
+
+# The ti-k3-image-gen makefiles seem to need some feature from Make v4.0,
+# similar to u-boot. Explicitly use $(BR2_MAKE) here, as the build
+# otherwise fails with some misleading error message.
+TI_K3_IMAGE_GEN_MAKE = $(BR2_MAKE)

Then you also need to add the necessary dependency:

    TI_K3_IMAGE_GEN_DEPENDENCIES = \
        host-arm-gnu-toolchain \
        ti-k3-r5-loader \
        $(BR2_PYTHON3_HOST_DEPENDENCY) \
        $(BR2_MAKE_HOST_DEPENDENCY)

But here is no need for TI_K3_IMAGE_GEN_MAKE, [2]...

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 67

Quoted 4 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +4 -0
+TI_K3_IMAGE_GEN_MAKE_OPTS = \
+	SOC=$(TI_K3_IMAGE_GEN_SOC) \
+	SOC_TYPE=$(TI_K3_IMAGE_GEN_SOC_TYPE) \
+	CONFIG=$(TI_K3_IMAGE_GEN_CONFIG) \

[1] here: CONFIG=evm

boot/ti-k3-image-gen/ti-k3-image-gen.mk line 74

Quoted 7 lines
boot/ti-k3-image-gen/ti-k3-image-gen.mk new file +7 -0
+	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
+	SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
+	O=$(@D)/tmp \
+	BIN_DIR=$(@D)
+
+define TI_K3_IMAGE_GEN_BUILD_CMDS
+	$(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)

[2] just use $(BR2_MAKE) here.

[0] Yes, there is a discrepancy due to c3568d58f8ea (package/freescale-imx:
add option for i.MX8X) which forgot to add the corresponding entry for BR2_PACKAGE_FREESCALE_IMX_PLATFORM...

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

Re: [Buildroot] [PATCH v9 02/11] boot/ti-k3-image-gen: new package

In reply to Andreas Dannenberg via buildroot

Hi Andreas and all,

Quoted 8 lines · Andreas Dannenberg via buildroot

From: Xuanhao Shi <[email protected]>

This is the image generator that builds the initial boot binary, tiboot3.bin, for the R5 core on TI's K3 family of devices. This requires the R5 SPL output from the ti-k3-r5-loader package.

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

I was able to build with your patchset for am62x_sk_defconfig as included. I attempted to do a reproducible and per_package parallel build and ran into an error. We tend to use that for builds because it is significantly faster build times especially on a dedicated server.

Adding to the defconfig:
BR2_REPRODUCIBLE=y
BR2_PER_PACKAGE_DIRECTORIES=y

and I was running in to the below error:

Quoted 1 line
Quoted 1 line
Quoted 1 line

ti-k3-image-gen 08.06.00.007 Installing to images directory

cp /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin /build_data/johnsonb/buildroot_ti/output/images
[19/30] Compiling C object
src/libwayland-server.so.0.21.0.p/wayland-shm.c.omake[5]: Leaving
directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[4]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[3]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[2]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[1]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
cp: cannot stat '/build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin':
No such file or directory
package/pkg-generic.mk:371: recipe for target '/build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/.stamp_images_installed' failed
make: *** [/build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/.stamp_images_installed] Error 1
make: *** Waiting for unfinished jobs....

I can see that file located there:
ls -al /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin lrwxrwxrwx 1 johnsonb users 103 Aug 8 18:18 /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin -> /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3-am62x-hs-fs-evm.bin

Might be something out of order or a missing dependency. I didn't dig into it too far, but I thought I would let you know.

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

#10 lore raw

Re: [Buildroot] [PATCH v9 02/11] boot/ti-k3-image-gen: new package

Hi Bryce, All,
first I wanted to say my apologies from the lack of progress on updating this series, the v9 rework got caught up in my summer break, and then TI has since released new U-Boot 2023.04 and Kernel 6.1-based SDKs for the AM62x/AM64 devices which should now be the updated goal for this upstream effort. In addition to newer components this should actually help/simplify some of the boot image creation and secure boot related "TI quirks", for example we'll no longer need the ti-k3-image-gen and ti-core-secdev-k3 packages (yeey!) as those items will be taken care of by U-Boot (via binman). I'm planning on making time to pick this back up over the next few weeks and work on a v10 series with those changes plus applicable feedback that was provided on v9.

As for your feedback, see below...

Quoted 20 lines · Bryce Johnson

Hi Andreas and all,

Quoted 8 lines · Andreas Dannenberg via buildroot

From: Xuanhao Shi <[email protected]>

This is the image generator that builds the initial boot binary, tiboot3.bin, for the R5 core on TI's K3 family of devices. This requires the R5 SPL output from the ti-k3-r5-loader package.

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

I was able to build with your patchset for am62x_sk_defconfig as included. I attempted to do a reproducible and per_package parallel build and ran into an error. We tend to use that for builds because it is significantly faster build times especially on a dedicated server.

Quoted 3 lines

Adding to the defconfig:
BR2_REPRODUCIBLE=y
BR2_PER_PACKAGE_DIRECTORIES=y

Good find, I'll experiment with this in the context of v10 and see how this behavior can be improved.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 35 lines

and I was running in to the below error:

Quoted 1 line
Quoted 1 line
Quoted 1 line

ti-k3-image-gen 08.06.00.007 Installing to images directory

cp /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin /build_data/johnsonb/buildroot_ti/output/images
[19/30] Compiling C object
src/libwayland-server.so.0.21.0.p/wayland-shm.c.omake[5]: Leaving
directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[4]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[3]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[2]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
make[1]: Leaving directory '/build_data/johnsonb/buildroot_ti/output/build/util-linux-libs-2.38'
cp: cannot stat '/build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin':
No such file or directory
package/pkg-generic.mk:371: recipe for target '/build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/.stamp_images_installed' failed
make: *** [/build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/.stamp_images_installed] Error 1
make: *** Waiting for unfinished jobs....

I can see that file located there:
ls -al /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin lrwxrwxrwx 1 johnsonb users 103 Aug 8 18:18 /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3.bin -> /build_data/johnsonb/buildroot_ti/output/build/ti-k3-image-gen-08.06.00.007/tiboot3-am62x-hs-fs-evm.bin

Quoted 4 lines

Might be something out of order or a missing dependency. I didn't dig into it too far, but I thought I would let you know.

Bryce

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

#11 lore raw

Re: [Buildroot] [PATCH v9 02/11] boot/ti-k3-image-gen: new package

Hi Andreas,

Quoted 4 lines

Hi Bryce, All,
first I wanted to say my apologies from the lack of progress on updating this series, the v9 rework got caught up in my summer break, and then TI has since released new U-Boot 2023.04 and Kernel 6.1-based SDKs for the

Quoted 9 lines

AM62x/AM64 devices which should now be the updated goal for this upstream effort. In addition to newer components this should actually help/simplify some of the boot image creation and secure boot related "TI quirks", for example we'll no longer need the ti-k3-image-gen and ti-core-secdev-k3 packages (yeey!) as those items will be taken care of by U-Boot (via binman). I'm planning on making time to pick this back up over the next few weeks and work on a v10 series with those changes plus applicable feedback that was provided on v9.

Thanks, that sounds good. I was able to get V9 building with the host openssl change. Didn't realize I had the older GP version of the sk-am62, but after I got the recommended changeset reverted, I was able to flash and got it booted up.

Added
BR2_PACKAGE_READLINE=y
BR2_PACKAGE_IWD=y
and was able to get the onboard wl18xx to enable and connect to my wifi. We are targeting using a CC3301 for our custom board, but it is nice to see the wl18xx come up and work.

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

#12 lore raw

PATCH v9 3/11 boot/uboot: add support for building the TI K3 DM into U-Boot

In reply to Andreas Dannenberg via buildroot

Certain TI K3 devices such as AM62x and AM62Ax require a Device Manager (DM) firmnware to be made available to the U-Boot build, which will get packaged into the "tispl.bin" image tree blob during A53 SPL build. Without that DM firmware U-Boot will not be functional. To support this, add a config option called BR2_TARGET_UBOOT_NEEDS_TI_K3_DM to enable this feature, and another option BR2_TARGET_UBOOT_TI_K3_DM_SOC to allow setting the name of the SOC which needs to match the corresponding folder name in the ti-linux-firmware Git repository.

---
 boot/uboot/Config.in | 17 +++++++++++++++++
 boot/uboot/uboot.mk  | 16 ++++++++++++++++
 2 files changed, 33 insertions(+)
boot/uboot/Config.in +17 -0
index 085397d03d..7e1dd44196 100644
@@ -240,6 +240,23 @@ config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE
 	  U-Boot, and that the TEE variable pointing to OPTEE's
 	  tee.elf, is passed during the Buildroot build.
 
+config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
+	bool "U-Boot needs TI K3 Device Manager (DM)"
+	help
+	  Some TI K3 devices need the Device Manager (DM) firmware
+	  to be available for the U-Boot build. Currently supports FW
+	  from Git tag 08.06.00.006 by default.
+
+	  https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/tree/ti-dm?h=ti-linux-firmware
+
+config BR2_TARGET_UBOOT_TI_K3_DM_SOC
+	string "TI K3 Device Manager (DM) SOC Type"
+	depends on BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
+	help
+	  Name of the TI K3 Device Manager (DM) SOC. This needs to
+	  match one of the SOC-specific folders in within the ti-dm
+	  folder of the ti-linux-firmware Git repository.
+
 config BR2_TARGET_UBOOT_NEEDS_OPENSBI
 	bool "U-Boot needs OpenSBI"
 	depends on BR2_TARGET_OPENSBI
boot/uboot/uboot.mk +16 -0
index 4eae8e95c3..48af69bd26 100644
@@ -184,6 +184,22 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
+# Currently supports the FW from Git tag 08.06.00.006 by default
+TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
+TI_K3_DM_SITE = https://git.ti.com/processor-firmware/ti-linux-firmware/blobs/raw/$(TI_K3_DM_VERSION)/ti-dm/$(BR2_TARGET_UBOOT_TI_K3_DM_SOC)
+TI_K3_DM_SOURCE = ipc_echo_testb_mcu1_0_release_strip.xer5f
+# This is not really nice but disable the hash check for the DM FW file. Main
+# reason is all those DM FW files for different SoCs have the same(!) name in
+# the Git repository they reside in, so it would be more difficult to distinguish
+# between them for hash checking purposes. To work around this let's just
+# rely and trust the official Git repo at ti.com is known-good which is also
+# accessed through a secure transport.
+BR_NO_CHECK_HASH_FOR += $(TI_K3_DM_SOURCE)
+UBOOT_EXTRA_DOWNLOADS = $(TI_K3_DM_SITE)/$(TI_K3_DM_SOURCE)
+UBOOT_MAKE_OPTS += DM=$(UBOOT_DL_DIR)/$(TI_K3_DM_SOURCE)
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
 UBOOT_DEPENDENCIES += opensbi
 UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin
Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 03/11] boot/uboot: add support for building the TI K3 DM into U-Boot

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 56 lines

Certain TI K3 devices such as AM62x and AM62Ax require a Device Manager (DM) firmnware to be made available to the U-Boot build, which will get packaged into the "tispl.bin" image tree blob during A53 SPL build. Without that DM firmware U-Boot will not be functional. To support this, add a config option called BR2_TARGET_UBOOT_NEEDS_TI_K3_DM to enable this feature, and another option BR2_TARGET_UBOOT_TI_K3_DM_SOC to allow setting the name of the SOC which needs to match the corresponding folder name in the ti-linux-firmware Git repository.

---
 boot/uboot/Config.in | 17 +++++++++++++++++
 boot/uboot/uboot.mk  | 16 ++++++++++++++++
 2 files changed, 33 insertions(+)
boot/uboot/Config.in +17 -0
index 085397d03d..7e1dd44196 100644
@@ -240,6 +240,23 @@ config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE
 	  U-Boot, and that the TEE variable pointing to OPTEE's
 	  tee.elf, is passed during the Buildroot build.
 
+config BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
+	bool "U-Boot needs TI K3 Device Manager (DM)"
+	help
+	  Some TI K3 devices need the Device Manager (DM) firmware
+	  to be available for the U-Boot build. Currently supports FW
+	  from Git tag 08.06.00.006 by default.
+
+	  https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/tree/ti-dm?h=ti-linux-firmware
+
+config BR2_TARGET_UBOOT_TI_K3_DM_SOC
+	string "TI K3 Device Manager (DM) SOC Type"
+	depends on BR2_TARGET_UBOOT_NEEDS_TI_K3_DM
+	help
+	  Name of the TI K3 Device Manager (DM) SOC. This needs to
+	  match one of the SOC-specific folders in within the ti-dm
+	  folder of the ti-linux-firmware Git repository.
+
 config BR2_TARGET_UBOOT_NEEDS_OPENSBI
 	bool "U-Boot needs OpenSBI"
 	depends on BR2_TARGET_OPENSBI
boot/uboot/uboot.mk +5 -0
index 4eae8e95c3..48af69bd26 100644
@@ -184,6 +184,22 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
+# Currently supports the FW from Git tag 08.06.00.006 by default
+TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
+TI_K3_DM_SITE = https://git.ti.com/processor-firmware/ti-linux-firmware/blobs/raw/$(TI_K3_DM_VERSION)/ti-dm/$(BR2_TARGET_UBOOT_TI_K3_DM_SOC)
+TI_K3_DM_SOURCE = ipc_echo_testb_mcu1_0_release_strip.xer5f

boot/uboot/uboot.mk UBOOT_DEPENDENCIES += optee-os · line 201

Quoted 10 lines
boot/uboot/uboot.mk +10 -0
+# This is not really nice but disable the hash check for the DM FW file. Main
+# reason is all those DM FW files for different SoCs have the same(!) name in
+# the Git repository they reside in, so it would be more difficult to distinguish
+# between them for hash checking purposes. To work around this let's just
+# rely and trust the official Git repo at ti.com is known-good which is also
+# accessed through a secure transport.
+BR_NO_CHECK_HASH_FOR += $(TI_K3_DM_SOURCE)
+UBOOT_EXTRA_DOWNLOADS = $(TI_K3_DM_SITE)/$(TI_K3_DM_SOURCE)
+UBOOT_MAKE_OPTS += DM=$(UBOOT_DL_DIR)/$(TI_K3_DM_SOURCE)
+endif

I again am not very fond of this injecting extra downloads n uboot. I'd rather we have a separate package, ti-linux-firmware. That way, it can be used by both uboot and ti-k3-image-gen.

The ti-linux-firmware repository is not small (git clone reports 750MiB today) but the repository exposes snapshots, so that is a bit more easy on the networks connection (althoiugh we should take the .gz, not the .xz, as the on-the-fly compression is much slower for xz than gz).

Then it is again just a matter of ti-linux-firmware copying the appropriate blobs into $(BINARIES_DIR) and then uboot grabbing what's necessary.

Regards,
Yann E. MORIN.

Quoted 10 lines
boot/uboot/uboot.mk +0 -0
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
 UBOOT_DEPENDENCIES += opensbi
 UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#14 lore raw

Re: [Buildroot] [PATCH v9 03/11] boot/uboot: add support for building the TI K3 DM into U-Boot

Andreas, All,

On 2023-06-25 09:02 +0200, Yann E. MORIN spake thusly:

Quoted 1 line

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

[--SNIP--]

Quoted 20 lines
Quoted 5 lines
boot/uboot/uboot.mk +5 -0
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
+# Currently supports the FW from Git tag 08.06.00.006 by default
+TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
+TI_K3_DM_SITE = https://git.ti.com/processor-firmware/ti-linux-firmware/blobs/raw/$(TI_K3_DM_VERSION)/ti-dm/$(BR2_TARGET_UBOOT_TI_K3_DM_SOC)
+TI_K3_DM_SOURCE = ipc_echo_testb_mcu1_0_release_strip.xer5f

boot/uboot/uboot.mk UBOOT_DEPENDENCIES += optee-os · line 201

Quoted 10 lines
boot/uboot/uboot.mk +10 -0
+# This is not really nice but disable the hash check for the DM FW file. Main
+# reason is all those DM FW files for different SoCs have the same(!) name in
+# the Git repository they reside in, so it would be more difficult to distinguish
+# between them for hash checking purposes. To work around this let's just
+# rely and trust the official Git repo at ti.com is known-good which is also
+# accessed through a secure transport.
+BR_NO_CHECK_HASH_FOR += $(TI_K3_DM_SOURCE)
+UBOOT_EXTRA_DOWNLOADS = $(TI_K3_DM_SITE)/$(TI_K3_DM_SOURCE)
+UBOOT_MAKE_OPTS += DM=$(UBOOT_DL_DIR)/$(TI_K3_DM_SOURCE)
+endif

I again am not very fond of this injecting extra downloads n uboot. I'd rather we have a separate package, ti-linux-firmware. That way, it can be used by both uboot and ti-k3-image-gen.

Quoted 4 lines

The ti-linux-firmware repository is not small (git clone reports 750MiB today) but the repository exposes snapshots, so that is a bit more easy on the networks connection (althoiugh we should take the .gz, not the .xz, as the on-the-fly compression is much slower for xz than gz).

Well, the .tar.gz is 432MiB, so not so much an improvement over the 750MiB of the repository, and the same download size will have to be done again when we later bump the version, so I think it is better to do a git clone...

The other pro of doing a git clone, is that we do have a known-working way of generating reproducible arhives locally, while relying on the remote site do generate the archive risk generating non-reproducible archives (e.g. if they update their git version, there is no guarantee the archive is reproducible across git versions; we've been bitten quite hard early in the year when github (and now gitlab?) broke the whole world that was checking hashes).

Regards,
Yann E. MORIN.

Quoted 29 lines

Then it is again just a matter of ti-linux-firmware copying the appropriate blobs into $(BINARIES_DIR) and then uboot grabbing what's necessary.

Regards,
Yann E. MORIN.

Quoted 10 lines

ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y) UBOOT_DEPENDENCIES += opensbi
UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#15 lore raw

PATCH v9 4/11 board/ti/am64x_sk: add new board

In reply to Andreas Dannenberg via buildroot

From: Xuanhao Shi <[email protected]>

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

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

---
 DEVELOPERS                     |  4 ++++
 board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++++
 board/ti/am64x_sk/readme.txt   | 26 ++++++++++++++++++++
 configs/am64x_sk_defconfig     | 44 ++++++++++++++++++++++++++++++++++
 4 files changed, 101 insertions(+)
 create mode 100644 board/ti/am64x_sk/genimage.cfg
 create mode 100644 board/ti/am64x_sk/readme.txt
 create mode 100644 configs/am64x_sk_defconfig
DEVELOPERS +4 -0
index 7ed9f040cc..a4d729983b 100644
@@ -129,8 +129,10 @@ F:	package/libxmlrpc/
 F:	package/python-docopt/
 
 N:	Anand Gadiyar <[email protected]>
+F:	board/ti/am64x_sk/
 F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
+F:	configs/am64x_sk_defconfig
 
 N:	André Zwing <[email protected]>
 F:	package/libkrb5/
@@ -3021,8 +3023,10 @@ N:	Wojciech Niziński <[email protected]>
 F:	package/fwup/
 
 N:	Xuanhao Shi <[email protected]>
+F:	board/ti/am64x_sk/
 F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
+F:	configs/am64x_sk_defconfig
 
 N:	Yair Ben Avraham <[email protected]>
 F:	package/casync/
board/ti/am64x_sk/genimage.cfg new file +27 -0
new file mode 100644
index 0000000000..26304fe98f
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"tiboot3.bin",
+			"tispl.bin",
+			"u-boot.img",
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/ti/am64x_sk/readme.txt new file +26 -0
new file mode 100644
index 0000000000..fe83c675f5
@@ -0,0 +1,26 @@
+Texas Instuments SK-AM64 Test and Development Board
+
+Description
+===========
+This configuration will build a complete image for the TI SK-AM64 board.
+
+How to Build
+============
+Select the default configuration for the target:
+$ make am64x_sk_defconfig
+
+Optional: modify the configuration:
+$ make menuconfig
+
+Build:
+$ make
+
+To copy the resultimg output image file to an SD card use dd:
+$ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+
+How to Run
+==========
+Insert the SD card into the SK-AM62 board, and power it up through
+the USB Type-C connector. The system should come up. You can use
+a micro-USB cable to connect to the connector labeled DEBUG CONSOLE
+to communicate with the board.
configs/am64x_sk_defconfig new file +44 -0

44 lines not on this page · raw message

Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 04/11] board/ti/am64x_sk: add new board

Le jeu. 22 juin 2023 à 19:39, Andreas Dannenberg <[email protected]> a écrit :

Quoted 126 lines

From: Xuanhao Shi <[email protected]>

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

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

---
 DEVELOPERS                     |  4 ++++
 board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++++
 board/ti/am64x_sk/readme.txt   | 26 ++++++++++++++++++++
 configs/am64x_sk_defconfig     | 44 ++++++++++++++++++++++++++++++++++
 4 files changed, 101 insertions(+)
 create mode 100644 board/ti/am64x_sk/genimage.cfg
 create mode 100644 board/ti/am64x_sk/readme.txt
 create mode 100644 configs/am64x_sk_defconfig
DEVELOPERS +4 -0
index 7ed9f040cc..a4d729983b 100644
@@ -129,8 +129,10 @@ F: package/libxmlrpc/
 F:     package/python-docopt/
 
 N:     Anand Gadiyar <[email protected]>
+F:     board/ti/am64x_sk/
 F:     boot/ti-k3-image-gen/
 F:     boot/ti-k3-r5-loader/
+F:     configs/am64x_sk_defconfig
 
 N:     André Zwing <[email protected]>
 F:     package/libkrb5/
@@ -3021,8 +3023,10 @@ N:       Wojciech Niziński <[email protected]>
 F:     package/fwup/
 
 N:     Xuanhao Shi <[email protected]>
+F:     board/ti/am64x_sk/
 F:     boot/ti-k3-image-gen/
 F:     boot/ti-k3-r5-loader/
+F:     configs/am64x_sk_defconfig
 
 N:     Yair Ben Avraham <[email protected]>
 F:     package/casync/
board/ti/am64x_sk/genimage.cfg new file +27 -0
new file mode 100644
index 0000000000..26304fe98f
@@ -0,0 +1,27 @@
+image boot.vfat {
+       vfat {
+               files = {
+                       "tiboot3.bin",
+                       "tispl.bin",
+                       "u-boot.img",
+               }
+       }
+
+       size = 16M
+}
+
+image sdcard.img {
+       hdimage {
+       }
+
+       partition u-boot {
+               partition-type = 0xC
+               bootable = "true"
+               image = "boot.vfat"
+       }
+
+       partition rootfs {
+               partition-type = 0x83
+               image = "rootfs.ext4"
+       }
+}
board/ti/am64x_sk/readme.txt new file +26 -0
new file mode 100644
index 0000000000..fe83c675f5
@@ -0,0 +1,26 @@
+Texas Instuments SK-AM64 Test and Development Board
+
+Description
+===========
+This configuration will build a complete image for the TI SK-AM64 board.
+
+How to Build
+============
+Select the default configuration for the target:
+$ make am64x_sk_defconfig
+
+Optional: modify the configuration:
+$ make menuconfig
+
+Build:
+$ make
+
+To copy the resultimg output image file to an SD card use dd:
+$ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+
+How to Run
+==========
+Insert the SD card into the SK-AM62 board, and power it up through
+the USB Type-C connector. The system should come up. You can use
+a micro-USB cable to connect to the connector labeled DEBUG CONSOLE
+to communicate with the board.
configs/am64x_sk_defconfig new file +0 -0
new file mode 100644
index 0000000000..411b3d5b0f

configs/am64x_sk_defconfig line 8

Quoted 8 lines
configs/am64x_sk_defconfig new file +8 -0
@@ -0,0 +1,44 @@
+BR2_aarch64=y
+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
+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_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y is missing at least at the end of the serie.

Quoted 17 lines
configs/am64x_sk_defconfig new file +16 -0
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
+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_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TISCI=y
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"

configs/am64x_sk_defconfig line 34

Quoted 10 lines
configs/am64x_sk_defconfig new file +10 -0
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP=y
+BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
+BR2_TARGET_TI_K3_R5_LOADER=y
+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_BOARD_DEFCONFIG="am64x_evm_a53"
+BR2_TARGET_UBOOT_NEEDS_DTC=y

BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y is missing at least at the end of the serie.

François

Quoted 11 lines
configs/am64x_sk_defconfig new file +10 -1
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
--
Quoted 3 lines

2.34.1

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

#17 lore raw

Re: [Buildroot] [PATCH v9 04/11] board/ti/am64x_sk: add new board

In reply to Andreas Dannenberg via buildroot

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 17 lines

From: Xuanhao Shi <[email protected]>

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

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

Quoted 1 line

---

[--SNIP--]

configs/am64x_sk_defconfig line 4

Quoted 10 lines
configs/am64x_sk_defconfig new file +4 -0
new file mode 100644
index 0000000000..411b3d5b0f
@@ -0,0 +1,44 @@
+BR2_aarch64=y
+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

For the kernel, we prefer that an explcit version be used, rather than the default, latest. Indeed, a board is usally tested using a specific kernel version, and thus is more prone to break with a kernel update, which will happen next time we update the kernel latest version.

As a consequence, you also need to add:

    BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_3=y

(yes, the current latest kernel version is 6.3)

Regards,
Yann E. MORIN.

Quoted 47 lines
configs/am64x_sk_defconfig new file +40 -0
+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_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
+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_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TISCI=y
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP=y
+BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
+BR2_TARGET_TI_K3_R5_LOADER=y
+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_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_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#18 lore raw

PATCH v9 5/11 board/ti/am62x_sk: add new board

In reply to Andreas Dannenberg via buildroot

From: Xuanhao Shi <[email protected]>

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

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

---
 DEVELOPERS                     |  4 +++
 board/ti/am62x_sk/genimage.cfg | 27 ++++++++++++++++++++
 board/ti/am62x_sk/readme.txt   | 26 ++++++++++++++++++++
 configs/am62x_sk_defconfig     | 45 ++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+)
 create mode 100644 board/ti/am62x_sk/genimage.cfg
 create mode 100644 board/ti/am62x_sk/readme.txt
 create mode 100644 configs/am62x_sk_defconfig
DEVELOPERS +4 -0
index a4d729983b..8ce903b294 100644
@@ -129,9 +129,11 @@ F:	package/libxmlrpc/
 F:	package/python-docopt/
 
 N:	Anand Gadiyar <[email protected]>
+F:	board/ti/am62x_sk/
 F:	board/ti/am64x_sk/
 F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
+F:	configs/am62x_sk_defconfig
 F:	configs/am64x_sk_defconfig
 
 N:	André Zwing <[email protected]>
@@ -3023,9 +3025,11 @@ N:	Wojciech Niziński <[email protected]>
 F:	package/fwup/
 
 N:	Xuanhao Shi <[email protected]>
+F:	board/ti/am62x_sk/
 F:	board/ti/am64x_sk/
 F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
+F:	configs/am62x_sk_defconfig
 F:	configs/am64x_sk_defconfig
 
 N:	Yair Ben Avraham <[email protected]>
board/ti/am62x_sk/genimage.cfg new file +27 -0
new file mode 100644
index 0000000000..26304fe98f
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"tiboot3.bin",
+			"tispl.bin",
+			"u-boot.img",
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/ti/am62x_sk/readme.txt new file +26 -0
new file mode 100644
index 0000000000..ccbb24896b
@@ -0,0 +1,26 @@
+Texas Instuments SK-AM62 Test and Development Board
+
+Description
+===========
+This configuration will build a complete image for the TI SK-AM62 board.
+
+How to Build
+============
+Select the default configuration for the target:
+$ make am62x_sk_defconfig
+
+Optional: modify the configuration:
+$ make menuconfig
+
+Build:
+$ make
+
+To copy the resultimg output image file to an SD card use dd:
+$ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+
+How to Run
+==========
+Insert the SD card into the SK-AM62 board, and power it up through
+the USB Type-C connector. The system should come up. You can use
+a micro-USB cable to connect to the connector labeled UART to
+communicate with the board.
configs/am62x_sk_defconfig new file +45 -0

45 lines not on this page · raw message

Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 05/11] board/ti/am62x_sk: add new board

Quoted 121 lines · Andreas Dannenberg via buildroot

From: Xuanhao Shi <[email protected]>

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

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

---
 DEVELOPERS                     |  4 +++
 board/ti/am62x_sk/genimage.cfg | 27 ++++++++++++++++++++
 board/ti/am62x_sk/readme.txt   | 26 ++++++++++++++++++++
 configs/am62x_sk_defconfig     | 45 ++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+)
 create mode 100644 board/ti/am62x_sk/genimage.cfg
 create mode 100644 board/ti/am62x_sk/readme.txt
 create mode 100644 configs/am62x_sk_defconfig
DEVELOPERS +4 -0
index a4d729983b..8ce903b294 100644
@@ -129,9 +129,11 @@ F: package/libxmlrpc/
 F:     package/python-docopt/
 
 N:     Anand Gadiyar <[email protected]>
+F:     board/ti/am62x_sk/
 F:     board/ti/am64x_sk/
 F:     boot/ti-k3-image-gen/
 F:     boot/ti-k3-r5-loader/
+F:     configs/am62x_sk_defconfig
 F:     configs/am64x_sk_defconfig
 
 N:     André Zwing <[email protected]>
@@ -3023,9 +3025,11 @@ N:       Wojciech Niziński <[email protected]>
 F:     package/fwup/
 
 N:     Xuanhao Shi <[email protected]>
+F:     board/ti/am62x_sk/
 F:     board/ti/am64x_sk/
 F:     boot/ti-k3-image-gen/
 F:     boot/ti-k3-r5-loader/
+F:     configs/am62x_sk_defconfig
 F:     configs/am64x_sk_defconfig
 
 N:     Yair Ben Avraham <[email protected]>
board/ti/am62x_sk/genimage.cfg new file +27 -0
new file mode 100644
index 0000000000..26304fe98f
@@ -0,0 +1,27 @@
+image boot.vfat {
+       vfat {
+               files = {
+                       "tiboot3.bin",
+                       "tispl.bin",
+                       "u-boot.img",
+               }
+       }
+
+       size = 16M
+}
+
+image sdcard.img {
+       hdimage {
+       }
+
+       partition u-boot {
+               partition-type = 0xC
+               bootable = "true"
+               image = "boot.vfat"
+       }
+
+       partition rootfs {
+               partition-type = 0x83
+               image = "rootfs.ext4"
+       }
+}
board/ti/am62x_sk/readme.txt new file +26 -0
new file mode 100644
index 0000000000..ccbb24896b
@@ -0,0 +1,26 @@
+Texas Instuments SK-AM62 Test and Development Board
+
+Description
+===========
+This configuration will build a complete image for the TI SK-AM62 board.
+
+How to Build
+============
+Select the default configuration for the target:
+$ make am62x_sk_defconfig
+
+Optional: modify the configuration:
+$ make menuconfig
+
+Build:
+$ make
+
+To copy the resultimg output image file to an SD card use dd:
+$ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+
+How to Run
+==========
+Insert the SD card into the SK-AM62 board, and power it up through
+the USB Type-C connector. The system should come up. You can use
+a micro-USB cable to connect to the connector labeled UART to
+communicate with the board.
configs/am62x_sk_defconfig new file +0 -0
new file mode 100644
index 0000000000..083720f512

configs/am62x_sk_defconfig line 8

Quoted 8 lines
configs/am62x_sk_defconfig new file +8 -0
@@ -0,0 +1,45 @@
+BR2_aarch64=y
+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
+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_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y is missing at least at the end of the serie.

François

Quoted 40 lines
configs/am62x_sk_defconfig new file +37 -1
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
+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_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am62x"
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP=y
+BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
+BR2_TARGET_TI_K3_R5_LOADER=y
+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_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_TI_K3_DM_SOC="am62xx"
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
--

2.34.1

Quoted 5 lines

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

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

#20 lore raw

Re: [Buildroot] [PATCH v9 05/11] board/ti/am62x_sk: add new board

François,
thanks for the feedback. Comment inlined...

Quoted 127 lines · François Perrad
Quoted 124 lines · Andreas Dannenberg via buildroot

From: Xuanhao Shi <[email protected]>

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

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

---
 DEVELOPERS                     |  4 +++
 board/ti/am62x_sk/genimage.cfg | 27 ++++++++++++++++++++
 board/ti/am62x_sk/readme.txt   | 26 ++++++++++++++++++++
 configs/am62x_sk_defconfig     | 45 ++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+)
 create mode 100644 board/ti/am62x_sk/genimage.cfg
 create mode 100644 board/ti/am62x_sk/readme.txt
 create mode 100644 configs/am62x_sk_defconfig
DEVELOPERS +4 -0
index a4d729983b..8ce903b294 100644
@@ -129,9 +129,11 @@ F: package/libxmlrpc/
 F:     package/python-docopt/
 
 N:     Anand Gadiyar <[email protected]>
+F:     board/ti/am62x_sk/
 F:     board/ti/am64x_sk/
 F:     boot/ti-k3-image-gen/
 F:     boot/ti-k3-r5-loader/
+F:     configs/am62x_sk_defconfig
 F:     configs/am64x_sk_defconfig
 
 N:     André Zwing <[email protected]>
@@ -3023,9 +3025,11 @@ N:       Wojciech Niziński <[email protected]>
 F:     package/fwup/
 
 N:     Xuanhao Shi <[email protected]>
+F:     board/ti/am62x_sk/
 F:     board/ti/am64x_sk/
 F:     boot/ti-k3-image-gen/
 F:     boot/ti-k3-r5-loader/
+F:     configs/am62x_sk_defconfig
 F:     configs/am64x_sk_defconfig
 
 N:     Yair Ben Avraham <[email protected]>
board/ti/am62x_sk/genimage.cfg new file +27 -0
new file mode 100644
index 0000000000..26304fe98f
@@ -0,0 +1,27 @@
+image boot.vfat {
+       vfat {
+               files = {
+                       "tiboot3.bin",
+                       "tispl.bin",
+                       "u-boot.img",
+               }
+       }
+
+       size = 16M
+}
+
+image sdcard.img {
+       hdimage {
+       }
+
+       partition u-boot {
+               partition-type = 0xC
+               bootable = "true"
+               image = "boot.vfat"
+       }
+
+       partition rootfs {
+               partition-type = 0x83
+               image = "rootfs.ext4"
+       }
+}
board/ti/am62x_sk/readme.txt new file +26 -0
new file mode 100644
index 0000000000..ccbb24896b
@@ -0,0 +1,26 @@
+Texas Instuments SK-AM62 Test and Development Board
+
+Description
+===========
+This configuration will build a complete image for the TI SK-AM62 board.
+
+How to Build
+============
+Select the default configuration for the target:
+$ make am62x_sk_defconfig
+
+Optional: modify the configuration:
+$ make menuconfig
+
+Build:
+$ make
+
+To copy the resultimg output image file to an SD card use dd:
+$ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+
+How to Run
+==========
+Insert the SD card into the SK-AM62 board, and power it up through
+the USB Type-C connector. The system should come up. You can use
+a micro-USB cable to connect to the connector labeled UART to
+communicate with the board.
configs/am62x_sk_defconfig new file +4 -0
new file mode 100644
index 0000000000..083720f512
@@ -0,0 +1,45 @@
+BR2_aarch64=y
+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
Quoted 8 lines

configs/am62x_sk_defconfig line 8

Quoted 5 lines
configs/am62x_sk_defconfig new file +4 -0
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-sk"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y

BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y is missing at least at the end of the serie.

Yes good find, the same was since reported by Bryce (via DM), who encountered build issues that he confirmed got fixed by adding this line. Will include into v10.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 44 lines

François

Quoted 40 lines
configs/am62x_sk_defconfig new file +37 -1
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
+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_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am62x"
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP=y
+BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
+BR2_TARGET_TI_K3_R5_LOADER=y
+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_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_TI_K3_DM_SOC="am62xx"
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
--

2.34.1

Quoted 5 lines
Quoted 5 lines

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

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

#21 lore raw

PATCH v9 6/11 board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources

In reply to Andreas Dannenberg via buildroot

Switch the following projects to using the same Git source repos and commit IDs that are used to build the TI SDK v8.6 for AM62x and AM64x devices to establish a baseline for comparable functionality:

* TI Linux Kernel v5.10
* TI U-Boot v2021.01
* ARM Trusted Firmware
* OP-TEE

For the Linux Kernel this also includes switching the defconfig to a new one that is generated with the ti_config_fragments/defconfig_builder.sh tool that is part of the respective ti-linux-5.10.y repository.

---
 .../ti/am62x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am62x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 .../ti/am64x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am64x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 configs/am62x_sk_defconfig                    |   19 +-
 configs/am64x_sk_defconfig                    |   19 +-
 6 files changed, 7798 insertions(+), 10 deletions(-)
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_release_defconfig
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_release_defconfig
board/ti/am62x_sk/ti_sdk_arm64_debug_defconfig new file +1991 -0
new file mode 100644
index 0000000000..8d7304965f
@@ -0,0 +1,1991 @@
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
+CONFIG_IRQ_TIME_ACCOUNTING=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_NUMA_BALANCING=y
+CONFIG_MEMCG=y
+CONFIG_MEMCG_SWAP=y
+CONFIG_CGROUP_HUGETLB=y
+CONFIG_CPUSETS=y
+CONFIG_USER_NS=y
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_ARCH_K3=y
+CONFIG_ARM64_VA_BITS_48=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+CONFIG_KEXEC=y
+CONFIG_KEXEC_FILE=y
+CONFIG_COMPAT=y
+CONFIG_RANDOMIZE_BASE=y
+CONFIG_HIBERNATION=y
+CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
+CONFIG_ENERGY_MODEL=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_ACPI_CPPC_CPUFREQ=m
+CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=m
+CONFIG_ARM_ARMADA_37XX_CPUFREQ=y
+CONFIG_ARM_IMX_CPUFREQ_DT=m
+CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y
+CONFIG_ARM_QCOM_CPUFREQ_HW=y
+CONFIG_ARM_RASPBERRYPI_CPUFREQ=m
+CONFIG_ARM_TEGRA186_CPUFREQ=y
+CONFIG_QORIQ_CPUFREQ=y
+CONFIG_RASPBERRYPI_FIRMWARE=y
+CONFIG_INTEL_STRATIX10_SERVICE=y
+CONFIG_INTEL_STRATIX10_RSU=m
+CONFIG_EFI_CAPSULE_LOADER=y
+CONFIG_IMX_SCU=y
+CONFIG_IMX_SCU_PD=y
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=y
+CONFIG_VIRTUALIZATION=y
+CONFIG_ARM64_CRYPTO=y
+CONFIG_CRYPTO_SHA1_ARM64_CE=y
+CONFIG_CRYPTO_SHA2_ARM64_CE=y
+CONFIG_CRYPTO_SHA512_ARM64_CE=m
+CONFIG_CRYPTO_SHA3_ARM64=m
+CONFIG_CRYPTO_SM3_ARM64_CE=m
+CONFIG_CRYPTO_GHASH_ARM64_CE=y
+CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=m
+CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
+CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
+CONFIG_CRYPTO_CHACHA20_NEON=m
+CONFIG_CRYPTO_AES_ARM64_BS=m
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_KSM=y
+CONFIG_MEMORY_FAILURE=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IPV6=m
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
+CONFIG_NETFILTER_XT_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_NAT=m
+CONFIG_IP6_NF_TARGET_MASQUERADE=m
+CONFIG_BRIDGE_VLAN_FILTERING=y
+CONFIG_NET_DSA=m
+CONFIG_VLAN_8021Q_GVRP=y
+CONFIG_VLAN_8021Q_MVRP=y
+CONFIG_NET_SCH_CBS=m
+CONFIG_NET_SCH_ETF=m
+CONFIG_NET_CLS_FLOWER=m
+CONFIG_NET_ACT_GATE=m
+CONFIG_QRTR=m
+CONFIG_QRTR_SMD=m
+CONFIG_QRTR_TUN=m
+CONFIG_BPF_JIT=y
+CONFIG_CAN_RCAR=m
+CONFIG_CAN_RCAR_CANFD=m
+CONFIG_CAN_FLEXCAN=m
+CONFIG_BT=m
+CONFIG_BT_HIDP=m
+# CONFIG_BT_HS is not set
+# CONFIG_BT_LE is not set
+CONFIG_BT_LEDS=y
+# CONFIG_BT_DEBUGFS is not set
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIUART_BCM=y
+CONFIG_BT_HCIUART_QCA=y
+CONFIG_CFG80211=m
+CONFIG_MAC80211=m
+CONFIG_MAC80211_LEDS=y
+CONFIG_RFKILL=m
+CONFIG_NET_9P=y
+CONFIG_NET_9P_VIRTIO=y
+CONFIG_NFC=m
+CONFIG_NFC_NCI=m
+CONFIG_NFC_S3FWRN5_I2C=m
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_IOV=y
+CONFIG_PCI_PASID=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+CONFIG_PCI_AARDVARK=y
+CONFIG_PCI_TEGRA=y
+CONFIG_PCIE_RCAR_HOST=y
+CONFIG_PCIE_RCAR_EP=y
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_PCIE_ALTERA=y
+CONFIG_PCIE_ALTERA_MSI=y
+CONFIG_PCI_HOST_THUNDER_PEM=y
+CONFIG_PCI_HOST_THUNDER_ECAM=y
+CONFIG_PCIE_ROCKCHIP_HOST=m
+CONFIG_PCIE_BRCMSTB=m
+CONFIG_PCI_LAYERSCAPE=y
+CONFIG_PCIE_LAYERSCAPE_GEN4=y
+CONFIG_PCIE_QCOM=y
+CONFIG_PCIE_ARMADA_8K=y
+CONFIG_PCIE_HISI_STB=y
+CONFIG_PCIE_TEGRA194_HOST=m
+CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
+CONFIG_HISILICON_LPC=y
+CONFIG_SIMPLE_PM_BUS=y
+CONFIG_FSL_MC_BUS=y
+CONFIG_TEGRA_ACONNECT=m
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_DATAFLASH=y
+CONFIG_MTD_SST25L=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_NAND_DENALI_DT=y
+CONFIG_MTD_NAND_MARVELL=y
+CONFIG_MTD_NAND_FSL_IFC=y
+CONFIG_MTD_NAND_QCOM=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_NBD=m
+CONFIG_VIRTIO_BLK=y
+CONFIG_SRAM=y
+CONFIG_EEPROM_AT25=m
+CONFIG_UACCE=m
+# CONFIG_SCSI_PROC_FS is not set
+CONFIG_SCSI_SAS_ATA=y
+CONFIG_SCSI_HISI_SAS=y
+CONFIG_SCSI_HISI_SAS_PCI=y
+CONFIG_MEGARAID_SAS=y
+CONFIG_SCSI_MPT3SAS=m
+CONFIG_SCSI_UFS_QCOM=m
+CONFIG_SCSI_UFS_HISI=y
+CONFIG_AHCI_CEVA=y
+CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_XGENE=y
+CONFIG_AHCI_QORIQ=y
+CONFIG_SATA_SIL24=y
+CONFIG_SATA_RCAR=y
+CONFIG_PATA_PLATFORM=y
+CONFIG_PATA_OF_PLATFORM=y
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_NETDEVICES=y
+CONFIG_MACVTAP=m
+CONFIG_TUN=y
+CONFIG_VIRTIO_NET=y
+CONFIG_NET_DSA_MSCC_FELIX=m
+CONFIG_AMD_XGBE=y
+CONFIG_NET_XGENE=y
+CONFIG_ATL1C=m
+CONFIG_BNX2X=m
+CONFIG_MACB=y
+CONFIG_THUNDER_NIC_PF=y
+CONFIG_FEC=y
+CONFIG_FSL_FMAN=y
+CONFIG_FSL_DPAA_ETH=y
+CONFIG_FSL_DPAA2_ETH=y
+CONFIG_FSL_ENETC=y
+CONFIG_FSL_ENETC_VF=y
+CONFIG_FSL_ENETC_QOS=y
+CONFIG_HIX5HD2_GMAC=y
+CONFIG_HNS_DSAF=y
+CONFIG_HNS_ENET=y
+CONFIG_HNS3=y
+CONFIG_HNS3_HCLGE=y
+CONFIG_HNS3_ENET=y
+CONFIG_IGBVF=y
+CONFIG_MVNETA=y
+CONFIG_MVPP2=y
+CONFIG_SKY2=y
+CONFIG_MLX4_EN=m
+CONFIG_MLX5_CORE=m
+CONFIG_MLX5_CORE_EN=y
+CONFIG_QCOM_EMAC=m
+CONFIG_RMNET=m
+CONFIG_SH_ETH=y
+CONFIG_RAVB=y
+CONFIG_SMC91X=y
+CONFIG_SMSC911X=y
+CONFIG_SNI_AVE=y
+CONFIG_SNI_NETSEC=y
+CONFIG_STMMAC_ETH=m
+CONFIG_QCOM_IPA=m
+CONFIG_MDIO_BUS_MUX_MMIOREG=y
+CONFIG_AQUANTIA_PHY=y
+CONFIG_MARVELL_10G_PHY=m
+CONFIG_MESON_GXL_PHY=m
+CONFIG_MICROSEMI_PHY=y
+CONFIG_AT803X_PHY=y
+CONFIG_REALTEK_PHY=m
+CONFIG_ROCKCHIP_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_SR9800=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_ATH10K=m
+CONFIG_ATH10K_PCI=m
+CONFIG_ATH10K_SNOC=m
+CONFIG_BRCMFMAC=m
+CONFIG_MWIFIEX=m
+CONFIG_MWIFIEX_PCIE=m
+CONFIG_INPUT_EVDEV=y
+CONFIG_KEYBOARD_ADC=m
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_SNVS_PWRKEY=m
+CONFIG_KEYBOARD_IMX_SC_KEY=m
+CONFIG_KEYBOARD_CROS_EC=y
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PM8941_PWRKEY=y
+CONFIG_INPUT_PM8XXX_VIBRATOR=m
+CONFIG_INPUT_HISI_POWERKEY=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_AMBAKMI=y
+CONFIG_LEGACY_PTY_COUNT=16
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_BCM2835AUX=y
+CONFIG_SERIAL_8250_OMAP=y
+CONFIG_SERIAL_8250_MT6577=y
+CONFIG_SERIAL_8250_UNIPHIER=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_MESON=y
+CONFIG_SERIAL_MESON_CONSOLE=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+CONFIG_SERIAL_TEGRA=y
+CONFIG_SERIAL_TEGRA_TCU=y
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_MSM=y
+CONFIG_SERIAL_MSM_CONSOLE=y
+CONFIG_SERIAL_QCOM_GENI=y
+CONFIG_SERIAL_QCOM_GENI_CONSOLE=y
+CONFIG_SERIAL_FSL_LPUART=y
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+CONFIG_SERIAL_FSL_LINFLEXUART=y
+CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
+CONFIG_SERIAL_MVEBU_UART=y
+CONFIG_SERIAL_OWL=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_IPMI_HANDLER=m
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_TCG_TPM=y
+CONFIG_TCG_TIS_I2C_INFINEON=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MUX_PCA954x=y
+CONFIG_I2C_BCM2835=m
+CONFIG_I2C_IMX=y
+CONFIG_I2C_IMX_LPI2C=y
+CONFIG_I2C_MESON=y
+CONFIG_I2C_MV64XXX=y
+CONFIG_I2C_OWL=y
+CONFIG_I2C_PXA=y
+CONFIG_I2C_QCOM_CCI=m
+CONFIG_I2C_QCOM_GENI=m
+CONFIG_I2C_QUP=y
+CONFIG_I2C_SH_MOBILE=y
+CONFIG_I2C_TEGRA=y
+CONFIG_I2C_UNIPHIER_F=y
+CONFIG_I2C_RCAR=y
+CONFIG_I2C_CROS_EC_TUNNEL=y
+CONFIG_SPI=y
+CONFIG_SPI_ARMADA_3700=y
+CONFIG_SPI_BCM2835=m
+CONFIG_SPI_BCM2835AUX=m
+CONFIG_SPI_FSL_LPSPI=y
+CONFIG_SPI_FSL_QUADSPI=y
+CONFIG_SPI_NXP_FLEXSPI=y
+CONFIG_SPI_IMX=m
+CONFIG_SPI_FSL_DSPI=y
+CONFIG_SPI_MESON_SPICC=m
+CONFIG_SPI_MESON_SPIFC=m
+CONFIG_SPI_ORION=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_RPCIF=m
+CONFIG_SPI_QCOM_QSPI=m
+CONFIG_SPI_QUP=y
+CONFIG_SPI_QCOM_GENI=m
+CONFIG_SPI_S3C64XX=y
+CONFIG_SPI_SH_MSIOF=m
+CONFIG_SPI_SUN6I=y
+CONFIG_SPMI=y
+CONFIG_PINCTRL_MAX77620=y
+CONFIG_PINCTRL_OWL=y
+CONFIG_PINCTRL_S700=y
+CONFIG_PINCTRL_S900=y
+CONFIG_PINCTRL_IMX8MM=y
+CONFIG_PINCTRL_IMX8MN=y
+CONFIG_PINCTRL_IMX8MP=y
+CONFIG_PINCTRL_IMX8MQ=y
+CONFIG_PINCTRL_IMX8QXP=y
+CONFIG_PINCTRL_IMX8DXL=y
+CONFIG_PINCTRL_IPQ8074=y
+CONFIG_PINCTRL_IPQ6018=y
+CONFIG_PINCTRL_MSM8916=y
+CONFIG_PINCTRL_MSM8994=y
+CONFIG_PINCTRL_MSM8996=y
+CONFIG_PINCTRL_MSM8998=y
+CONFIG_PINCTRL_QCS404=y
+CONFIG_PINCTRL_QDF2XXX=y
+CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
+CONFIG_PINCTRL_SC7180=y
+CONFIG_PINCTRL_SDM845=y
+CONFIG_PINCTRL_SM8150=y
+CONFIG_PINCTRL_SM8250=y
+CONFIG_GPIO_ALTERA=m
+CONFIG_GPIO_DAVINCI=y
+CONFIG_GPIO_DWAPB=y
+CONFIG_GPIO_MB86S7X=y
+CONFIG_GPIO_MPC8XXX=y
+CONFIG_GPIO_MXC=y
+CONFIG_GPIO_PL061=y
+CONFIG_GPIO_RCAR=y
+CONFIG_GPIO_UNIPHIER=y
+CONFIG_GPIO_WCD934X=m
+CONFIG_GPIO_XGENE=y
+CONFIG_GPIO_XGENE_SB=y
+CONFIG_GPIO_MAX732X=y
+CONFIG_GPIO_BD9571MWV=m
+CONFIG_GPIO_MAX77620=y
+CONFIG_GPIO_SL28CPLD=m
+CONFIG_POWER_AVS=y
+CONFIG_QCOM_CPR=y
+CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_POWER_RESET_MSM=y
+CONFIG_POWER_RESET_XGENE=y
+CONFIG_POWER_RESET_SYSCON=y
+CONFIG_SYSCON_REBOOT_MODE=y
+CONFIG_BATTERY_SBS=m
+CONFIG_BATTERY_BQ27XXX=y
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_PWM_FAN=m
+CONFIG_SENSORS_RASPBERRYPI_HWMON=m
+CONFIG_SENSORS_SL28CPLD=m
+CONFIG_SENSORS_INA2XX=m
+CONFIG_SENSORS_INA3221=m
+CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
+CONFIG_CPU_THERMAL=y
+CONFIG_THERMAL_EMULATION=y
+CONFIG_QORIQ_THERMAL=m
+CONFIG_SUN8I_THERMAL=y
+CONFIG_IMX_SC_THERMAL=m
+CONFIG_IMX8MM_THERMAL=m
+CONFIG_ROCKCHIP_THERMAL=m
+CONFIG_RCAR_THERMAL=y
+CONFIG_RCAR_GEN3_THERMAL=y
+CONFIG_ARMADA_THERMAL=y
+CONFIG_BCM2711_THERMAL=m
+CONFIG_BCM2835_THERMAL=m
+CONFIG_BRCMSTB_THERMAL=m
+CONFIG_EXYNOS_THERMAL=y
+CONFIG_TEGRA_BPMP_THERMAL=m
+CONFIG_QCOM_TSENS=y
+CONFIG_QCOM_SPMI_TEMP_ALARM=m
+CONFIG_UNIPHIER_THERMAL=y
+CONFIG_WATCHDOG=y
+CONFIG_SL28CPLD_WATCHDOG=m
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_ARM_SBSA_WATCHDOG=y
+CONFIG_ARM_SMC_WATCHDOG=y
+CONFIG_S3C2410_WATCHDOG=y
+CONFIG_DW_WATCHDOG=y
+CONFIG_SUNXI_WATCHDOG=m
+CONFIG_IMX2_WDT=y
+CONFIG_IMX_SC_WDT=m
+CONFIG_QCOM_WDT=m
+CONFIG_MESON_GXBB_WATCHDOG=m
+CONFIG_MESON_WATCHDOG=m
+CONFIG_RENESAS_WDT=y
+CONFIG_UNIPHIER_WATCHDOG=y
+CONFIG_BCM2835_WDT=y
+CONFIG_MFD_ALTERA_SYSMGR=y
+CONFIG_MFD_BD9571MWV=y
+CONFIG_MFD_AXP20X_I2C=y
+CONFIG_MFD_AXP20X_RSB=y
+CONFIG_MFD_EXYNOS_LPASS=m
+CONFIG_MFD_HI6421_PMIC=y
+CONFIG_MFD_HI655X_PMIC=y
+CONFIG_MFD_MAX77620=y
+CONFIG_MFD_SPMI_PMIC=y
+CONFIG_MFD_RK808=y
+CONFIG_MFD_SEC_CORE=y
+CONFIG_MFD_SL28CPLD=y
+CONFIG_MFD_ROHM_BD718XX=y
+CONFIG_MFD_WCD934X=m
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_AXP20X=y
+CONFIG_REGULATOR_BD718XX=y
+CONFIG_REGULATOR_BD9571MWV=y
+CONFIG_REGULATOR_FAN53555=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_REGULATOR_HI6421V530=y
+CONFIG_REGULATOR_HI655X=y
+CONFIG_REGULATOR_MAX77620=y
+CONFIG_REGULATOR_MAX8973=y
+CONFIG_REGULATOR_PCA9450=y
+CONFIG_REGULATOR_PFUZE100=y
+CONFIG_REGULATOR_PWM=y
+CONFIG_REGULATOR_QCOM_RPMH=y
+CONFIG_REGULATOR_QCOM_SMD_RPM=y
+CONFIG_REGULATOR_QCOM_SPMI=y
+CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_S2MPS11=y
+CONFIG_REGULATOR_VCTRL=m
+CONFIG_RC_DECODERS=y
+CONFIG_RC_DEVICES=y
+CONFIG_IR_MESON=m
+CONFIG_IR_SUNXI=m
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_MEDIA_SDR_SUPPORT=y
+CONFIG_MEDIA_CONTROLLER=y
+CONFIG_VIDEO_V4L2_SUBDEV_API=y
+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+# CONFIG_DVB_NET is not set
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_VIDEO_RCAR_CSI2=m
+CONFIG_VIDEO_RCAR_VIN=m
+CONFIG_VIDEO_SUN6I_CSI=m
+CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
+CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
+CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m
+CONFIG_VIDEO_RENESAS_FDP1=m
+CONFIG_VIDEO_RENESAS_FCP=m
+CONFIG_VIDEO_RENESAS_VSP1=m
+CONFIG_SDR_PLATFORM_DRIVERS=y
+CONFIG_VIDEO_RCAR_DRIF=m
+CONFIG_VIDEO_IMX219=m
+CONFIG_VIDEO_OV5645=m
+CONFIG_VIDEO_QCOM_CAMSS=m
+CONFIG_DRM_MALI_DISPLAY=m
+CONFIG_DRM_EXYNOS=m
+CONFIG_DRM_EXYNOS5433_DECON=y
+CONFIG_DRM_EXYNOS7_DECON=y
+CONFIG_DRM_EXYNOS_DSI=y
+# CONFIG_DRM_EXYNOS_DP is not set
+CONFIG_DRM_EXYNOS_HDMI=y
+CONFIG_DRM_EXYNOS_MIC=y
+CONFIG_DRM_ROCKCHIP=m
+CONFIG_ROCKCHIP_ANALOGIX_DP=y
+CONFIG_ROCKCHIP_CDN_DP=y
+CONFIG_ROCKCHIP_DW_HDMI=y
+CONFIG_ROCKCHIP_DW_MIPI_DSI=y
+CONFIG_ROCKCHIP_INNO_HDMI=y
+CONFIG_DRM_RCAR_DU=m
+CONFIG_DRM_RCAR_DW_HDMI=m
+CONFIG_DRM_SUN4I=m
+CONFIG_DRM_SUN6I_DSI=m
+CONFIG_DRM_SUN8I_DW_HDMI=m
+CONFIG_DRM_SUN8I_MIXER=m
+CONFIG_DRM_MSM=m
+CONFIG_DRM_TEGRA=m
+CONFIG_DRM_PANEL_LVDS=m
+CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
+CONFIG_DRM_PANEL_SITRONIX_ST7703=m
+CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m
+CONFIG_DRM_NWL_MIPI_DSI=m
+CONFIG_DRM_LONTIUM_LT9611=m
+CONFIG_DRM_SIMPLE_BRIDGE=m
+CONFIG_DRM_THINE_THC63LVD1024=m
+CONFIG_DRM_TI_SN65DSI86=m
+CONFIG_DRM_I2C_ADV7511_AUDIO=y
+CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
+CONFIG_DRM_DW_HDMI_CEC=m
+CONFIG_DRM_VC4=m
+CONFIG_DRM_MESON=m
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_BACKLIGHT_GENERIC=m
+CONFIG_BACKLIGHT_LP855X=m
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_HDA_TEGRA=m
+CONFIG_SND_HDA_CODEC_HDMI=m
+CONFIG_SND_SOC=y
+CONFIG_SND_BCM2835_SOC_I2S=m
+CONFIG_SND_MESON_AXG_SOUND_CARD=m
+CONFIG_SND_MESON_GX_SOUND_CARD=m
+CONFIG_SND_SOC_QCOM=m
+CONFIG_SND_SOC_APQ8016_SBC=m
+CONFIG_SND_SOC_MSM8996=m
+CONFIG_SND_SOC_SDM845=m
+CONFIG_SND_SOC_ROCKCHIP=m
+CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
+CONFIG_SND_SOC_ROCKCHIP_RT5645=m
+CONFIG_SND_SOC_RK3399_GRU_SOUND=m
+CONFIG_SND_SOC_SAMSUNG=y
+CONFIG_SND_SOC_RCAR=m
+CONFIG_SND_SUN4I_SPDIF=m
+CONFIG_SND_SOC_TEGRA=m
+CONFIG_SND_SOC_TEGRA210_AHUB=m
+CONFIG_SND_SOC_TEGRA210_DMIC=m
+CONFIG_SND_SOC_TEGRA210_I2S=m
+CONFIG_SND_SOC_TEGRA186_DSPK=m
+CONFIG_SND_SOC_TEGRA210_ADMAIF=m
+CONFIG_SND_SOC_WCD934X=m
+CONFIG_SND_SOC_WM8904=m
+CONFIG_SND_SOC_WSA881X=m
+CONFIG_SND_SIMPLE_CARD=m
+CONFIG_SND_AUDIO_GRAPH_CARD=m
+CONFIG_I2C_HID=m
+CONFIG_USB_CONN_GPIO=m
+CONFIG_USB_OTG=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_TEGRA=y
+CONFIG_USB_EHCI_EXYNOS=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_EXYNOS=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_RENESAS_USBHS_HCD=m
+CONFIG_USB_RENESAS_USBHS=m
+CONFIG_USB_STORAGE=y
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_ISP1760=y
+CONFIG_USB_HSIC_USB3503=y
+CONFIG_USB_RENESAS_USBHS_UDC=m
+CONFIG_USB_RENESAS_USB3=m
+CONFIG_USB_TEGRA_XUDC=m
+CONFIG_TYPEC=m
+CONFIG_TYPEC_TCPM=m
+CONFIG_TYPEC_FUSB302=m
+CONFIG_TYPEC_HD3SS3220=m
+CONFIG_MMC_BLOCK_MINORS=32
+CONFIG_MMC_ARMMMCI=y
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_MMC_SDHCI_OF_ESDHC=y
+CONFIG_MMC_SDHCI_CADENCE=y
+CONFIG_MMC_SDHCI_ESDHC_IMX=y
+CONFIG_MMC_SDHCI_TEGRA=y
+CONFIG_MMC_SDHCI_F_SDH30=y
+CONFIG_MMC_MESON_GX=y
+CONFIG_MMC_SDHCI_MSM=y
+CONFIG_MMC_SPI=y
+CONFIG_MMC_SDHI=y
+CONFIG_MMC_UNIPHIER=y
+CONFIG_MMC_DW_EXYNOS=y
+CONFIG_MMC_DW_HI3798CV200=y
+CONFIG_MMC_DW_K3=y
+CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_SUNXI=y
+CONFIG_MMC_BCM2835=y
+CONFIG_MMC_SDHCI_XENON=y
+CONFIG_MMC_OWL=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_SYSCON=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_DISK=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+CONFIG_LEDS_TRIGGER_PANIC=y
+CONFIG_EDAC=y
+CONFIG_EDAC_GHES=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_MAX77686=y
+CONFIG_RTC_DRV_RK808=m
+CONFIG_RTC_DRV_PCF85363=m
+CONFIG_RTC_DRV_RX8581=m
+CONFIG_RTC_DRV_RV8803=m
+CONFIG_RTC_DRV_S5M=y
+CONFIG_RTC_DRV_DS3232=y
+CONFIG_RTC_DRV_PCF2127=m
+CONFIG_RTC_DRV_EFI=y
+CONFIG_RTC_DRV_CROS_EC=y
+CONFIG_RTC_DRV_S3C=y
+CONFIG_RTC_DRV_PL031=y
+CONFIG_RTC_DRV_SUN6I=y
+CONFIG_RTC_DRV_ARMADA38X=y
+CONFIG_RTC_DRV_PM8XXX=m
+CONFIG_RTC_DRV_TEGRA=y
+CONFIG_RTC_DRV_SNVS=m
+CONFIG_RTC_DRV_IMX_SC=m
+CONFIG_RTC_DRV_XGENE=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_BCM2835=y
+CONFIG_DMA_SUN6I=m
+CONFIG_FSL_EDMA=y
+CONFIG_IMX_SDMA=m
+CONFIG_K3_DMA=y
+CONFIG_MV_XOR=y
+CONFIG_MV_XOR_V2=y
+CONFIG_OWL_DMA=y
+CONFIG_PL330_DMA=y
+CONFIG_TEGRA20_APB_DMA=y
+CONFIG_TEGRA210_ADMA=m
+CONFIG_QCOM_BAM_DMA=y
+CONFIG_QCOM_HIDMA_MGMT=y
+CONFIG_QCOM_HIDMA=y
+CONFIG_RCAR_DMAC=y
+CONFIG_RENESAS_USB_DMAC=m
+CONFIG_TI_K3_UDMA=y
+CONFIG_TI_K3_UDMA_GLUE_LAYER=y
+CONFIG_VFIO=y
+CONFIG_VFIO_PCI=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_XEN_GNTDEV=y
+CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_MFD_CROS_EC_DEV=y
+CONFIG_CHROME_PLATFORMS=y
+CONFIG_CROS_EC=y
+CONFIG_CROS_EC_I2C=y
+CONFIG_CROS_EC_SPI=y
+CONFIG_CROS_EC_CHARDEV=m
+CONFIG_COMMON_CLK_RK808=y
+CONFIG_COMMON_CLK_CS2000_CP=y
+CONFIG_COMMON_CLK_FSL_SAI=y
+CONFIG_COMMON_CLK_S2MPS11=y
+CONFIG_COMMON_CLK_PWM=y
+CONFIG_COMMON_CLK_VC5=y
+CONFIG_COMMON_CLK_BD718XX=m
+CONFIG_CLK_RASPBERRYPI=m
+CONFIG_CLK_IMX8MM=y
+CONFIG_CLK_IMX8MN=y
+CONFIG_CLK_IMX8MP=y
+CONFIG_CLK_IMX8MQ=y
+CONFIG_CLK_IMX8QXP=y
+CONFIG_TI_SCI_CLK=y
+CONFIG_COMMON_CLK_QCOM=y
+CONFIG_QCOM_A53PLL=y
+CONFIG_QCOM_CLK_APCS_MSM8916=y
+CONFIG_QCOM_CLK_SMD_RPM=y
+CONFIG_QCOM_CLK_RPMH=y
+CONFIG_IPQ_GCC_8074=y
+CONFIG_IPQ_GCC_6018=y
+CONFIG_MSM_GCC_8916=y
+CONFIG_MSM_GCC_8994=y
+CONFIG_MSM_MMCC_8996=y
+CONFIG_MSM_GCC_8998=y
+CONFIG_QCS_GCC_404=y
+CONFIG_SC_GCC_7180=y
+CONFIG_SDM_CAMCC_845=m
+CONFIG_SDM_GCC_845=y
+CONFIG_SDM_GPUCC_845=y
+CONFIG_SDM_VIDEOCC_845=y
+CONFIG_SDM_DISPCC_845=y
+CONFIG_SM_GCC_8150=y
+CONFIG_SM_GCC_8250=y
+CONFIG_SM_GPUCC_8150=y
+CONFIG_SM_GPUCC_8250=y
+CONFIG_QCOM_HFPLL=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
+CONFIG_IMX_MBOX=y
+CONFIG_BCM2835_MBOX=y
+CONFIG_QCOM_APCS_IPC=y
+CONFIG_QCOM_IPCC=y
+CONFIG_ROCKCHIP_IOMMU=y
+CONFIG_TEGRA_IOMMU_SMMU=y
+CONFIG_ARM_SMMU=y
+CONFIG_ARM_SMMU_V3=y
+CONFIG_QCOM_IOMMU=y
+CONFIG_REMOTEPROC=y
+CONFIG_QCOM_Q6V5_MSS=m
+CONFIG_QCOM_Q6V5_PAS=m
+CONFIG_QCOM_SYSMON=m
+CONFIG_RPMSG_QCOM_GLINK_RPM=y
+CONFIG_RPMSG_QCOM_GLINK_SMEM=m
+CONFIG_RPMSG_QCOM_SMD=y
+CONFIG_SOUNDWIRE=m
+CONFIG_SOUNDWIRE_QCOM=m
+CONFIG_OWL_PM_DOMAINS=y
+CONFIG_RASPBERRYPI_POWER=y
+CONFIG_FSL_DPAA=y
+CONFIG_FSL_MC_DPIO=y
+CONFIG_QCOM_AOSS_QMP=y
+CONFIG_QCOM_GENI_SE=y
+CONFIG_QCOM_RMTFS_MEM=m
+CONFIG_QCOM_RPMH=y
+CONFIG_QCOM_RPMHPD=y
+CONFIG_QCOM_RPMPD=y
+CONFIG_QCOM_SMEM=y
+CONFIG_QCOM_SMD_RPM=y
+CONFIG_QCOM_SMP2P=y
+CONFIG_QCOM_SMSM=y
+CONFIG_QCOM_SOCINFO=m
+CONFIG_QCOM_APR=m
+CONFIG_ARCH_R8A774A1=y
+CONFIG_ARCH_R8A774B1=y
+CONFIG_ARCH_R8A774C0=y
+CONFIG_ARCH_R8A774E1=y
+CONFIG_ARCH_R8A77950=y
+CONFIG_ARCH_R8A77951=y
+CONFIG_ARCH_R8A77960=y
+CONFIG_ARCH_R8A77961=y
+CONFIG_ARCH_R8A77965=y
+CONFIG_ARCH_R8A77970=y
+CONFIG_ARCH_R8A77980=y
+CONFIG_ARCH_R8A77990=y
+CONFIG_ARCH_R8A77995=y
+CONFIG_ROCKCHIP_PM_DOMAINS=y
+CONFIG_ARCH_TEGRA_194_SOC=y
+CONFIG_TI_SCI_PM_DOMAINS=y
+CONFIG_EXTCON_PTN5150=m
+CONFIG_EXTCON_USBC_CROS_EC=y
+CONFIG_RENESAS_RPCIF=m
+CONFIG_IIO=y
+CONFIG_EXYNOS_ADC=y
+CONFIG_MAX9611=m
+CONFIG_QCOM_SPMI_ADC5=m
+CONFIG_ROCKCHIP_SARADC=m
+CONFIG_IIO_CROS_EC_SENSORS_CORE=m
+CONFIG_IIO_CROS_EC_SENSORS=m
+CONFIG_IIO_CROS_EC_LIGHT_PROX=m
+CONFIG_SENSORS_ISL29018=m
+CONFIG_IIO_CROS_EC_BARO=m
+CONFIG_MPL3115=m
+CONFIG_PWM=y
+CONFIG_PWM_BCM2835=m
+CONFIG_PWM_CROS_EC=m
+CONFIG_PWM_MESON=m
+CONFIG_PWM_RCAR=m
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_PWM_SAMSUNG=y
+CONFIG_PWM_SL28CPLD=m
+CONFIG_PWM_SUN4I=m
+CONFIG_PWM_TEGRA=m
+CONFIG_SL28CPLD_INTC=y
+CONFIG_QCOM_PDC=y
+CONFIG_RESET_IMX7=y
+CONFIG_RESET_QCOM_AOSS=y
+CONFIG_RESET_QCOM_PDC=m
+CONFIG_RESET_TI_SCI=y
+CONFIG_PHY_XGENE=y
+CONFIG_PHY_SUN4I_USB=y
+CONFIG_PHY_MIXEL_MIPI_DPHY=m
+CONFIG_PHY_HI6220_USB=y
+CONFIG_PHY_HISTB_COMBPHY=y
+CONFIG_PHY_HISI_INNO_USB2=y
+CONFIG_PHY_MVEBU_CP110_COMPHY=y
+CONFIG_PHY_QCOM_QMP=m
+CONFIG_PHY_QCOM_QUSB2=m
+CONFIG_PHY_QCOM_USB_HS=y
+CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=y
+CONFIG_PHY_RCAR_GEN3_PCIE=y
+CONFIG_PHY_RCAR_GEN3_USB2=y
+CONFIG_PHY_RCAR_GEN3_USB3=m
+CONFIG_PHY_ROCKCHIP_EMMC=y
+CONFIG_PHY_ROCKCHIP_INNO_HDMI=m
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_PCIE=m
+CONFIG_PHY_ROCKCHIP_TYPEC=y
+CONFIG_PHY_UNIPHIER_USB2=y
+CONFIG_PHY_UNIPHIER_USB3=y
+CONFIG_PHY_TEGRA_XUSB=y
+CONFIG_ARM_SMMU_V3_PMU=m
+CONFIG_FSL_IMX8_DDR_PMU=m
+CONFIG_HISI_PMU=y
+CONFIG_QCOM_L2_PMU=y
+CONFIG_QCOM_L3_PMU=y
+CONFIG_NVMEM_IMX_OCOTP=y
+CONFIG_NVMEM_IMX_OCOTP_SCU=y
+CONFIG_QCOM_QFPROM=y
+CONFIG_ROCKCHIP_EFUSE=y
+CONFIG_NVMEM_SUNXI_SID=y
+CONFIG_UNIPHIER_EFUSE=y
+CONFIG_MESON_EFUSE=m
+CONFIG_FPGA=y
+CONFIG_FPGA_MGR_STRATIX10_SOC=m
+CONFIG_FPGA_BRIDGE=m
+CONFIG_ALTERA_FREEZE_BRIDGE=m
+CONFIG_FPGA_REGION=m
+CONFIG_OF_FPGA_REGION=m
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_SLIMBUS=m
+CONFIG_SLIM_QCOM_CTRL=m
+CONFIG_SLIM_QCOM_NGD_CTRL=m
+CONFIG_MUX_MMIO=y
+CONFIG_INTERCONNECT=y
+CONFIG_INTERCONNECT_QCOM=y
+CONFIG_INTERCONNECT_QCOM_MSM8916=m
+CONFIG_INTERCONNECT_QCOM_SDM845=m
+CONFIG_INTERCONNECT_QCOM_SM8150=m
+CONFIG_INTERCONNECT_QCOM_SM8250=m
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+CONFIG_BTRFS_FS_POSIX_ACL=y
+CONFIG_FANOTIFY=y
+CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
+CONFIG_QUOTA=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_FUSE_FS=m
+CONFIG_CUSE=m
+CONFIG_VFAT_FS=y
+CONFIG_HUGETLBFS=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_EFIVAR_FS=y
+CONFIG_SQUASHFS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_V4_1=y
+CONFIG_NFS_V4_2=y
+CONFIG_ROOT_NFS=y
+CONFIG_9P_FS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_SECURITY=y
+CONFIG_CRYPTO_ECHAINIV=y
+CONFIG_CRYPTO_ANSI_CPRNG=y
+CONFIG_CRYPTO_USER_API_RNG=m
+CONFIG_CRYPTO_DEV_SUN8I_CE=m
+CONFIG_CRYPTO_DEV_FSL_CAAM=m
+CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=m
+CONFIG_CRYPTO_DEV_QCOM_RNG=m
+CONFIG_CRYPTO_DEV_CCREE=m
+CONFIG_CRYPTO_DEV_HISI_SEC2=m
+CONFIG_CRYPTO_DEV_HISI_ZIP=m
+CONFIG_CRYPTO_DEV_HISI_HPRE=m
+CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_INFO=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_FTRACE is not set
+CONFIG_MEMTEST=y
+CONFIG_ARCH_ACTIONS=n
+CONFIG_ARCH_SUNXI=n
+CONFIG_ARCH_AGILEX=n
+CONFIG_ARCH_ALPINE=n
+CONFIG_ARCH_BCM2835=n
+CONFIG_ARCH_BCM_IPROC=n
+CONFIG_ARCH_BERLIN=n
+CONFIG_ARCH_BRCMSTB=n
+CONFIG_ARCH_EXYNOS=n
+CONFIG_ARCH_LAYERSCAPE=n
+CONFIG_ARCH_LG1K=n
+CONFIG_ARCH_HISI=n
+CONFIG_ARCH_MEDIATEK=n
+CONFIG_ARCH_MESON=n
+CONFIG_ARCH_MVEBU=n
+CONFIG_ARCH_MXC=n
+CONFIG_ARCH_QCOM=n
+CONFIG_ARCH_ROCKCHIP=n
+CONFIG_ARCH_SEATTLE=n
+CONFIG_ARCH_RENESAS=n
+CONFIG_ARCH_R8A7795=n
+CONFIG_ARCH_R8A7796=n
+CONFIG_ARCH_S32=n
+CONFIG_ARCH_STRATIX10=n
+CONFIG_ARCH_SYNQUACER=n
+CONFIG_ARCH_TEGRA=n
+CONFIG_ARCH_SPRD=n
+CONFIG_ARCH_THUNDER=n
+CONFIG_ARCH_THUNDER2=n
+CONFIG_ARCH_UNIPHIER=n
+CONFIG_ARCH_VEXPRESS=n
+CONFIG_ARCH_VISCONTI=n
+CONFIG_ARCH_XGENE=n
+CONFIG_ARCH_ZX=n
+CONFIG_ARCH_ZYNQMP=n
+CONFIG_ARCH_TEGRA_132_SOC=n
+CONFIG_ARCH_TEGRA_210_SOC=n
+CONFIG_ARCH_TEGRA_186_SOC=n
+
+CONFIG_QCOM_FALKOR_ERRATUM_1003=n
+CONFIG_QCOM_FALKOR_ERRATUM_1009=n
+CONFIG_QCOM_QDF2400_ERRATUM_0065=n
+CONFIG_QCOM_FALKOR_ERRATUM_E1041=n
+
+CONFIG_CAVIUM_ERRATUM_22375=n
+CONFIG_CAVIUM_ERRATUM_23144=n
+CONFIG_CAVIUM_ERRATUM_23154=n
+CONFIG_CAVIUM_ERRATUM_27456=n
+CONFIG_CAVIUM_ERRATUM_30115=n
+
+CONFIG_HISILICON_ERRATUM_161600802=n
+
+CONFIG_SERIAL_8250_FSL=n
+CONFIG_SERIAL_8250_DW=n
+CONFIG_SERIAL_AMBA_PL011=n
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=n
+CONFIG_SERIAL_XILINX_PS_UART=n
+CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=n
+
+CONFIG_ARM_SCPI_PROTOCOL=n
+CONFIG_ARM_SCPI_POWER_DOMAIN=n
+CONFIG_ARM_SCPI_CPUFREQ=n
+CONFIG_SENSORS_ARM_SCPI=n
+CONFIG_COMMON_CLK_SCPI=n
+
+CONFIG_ARM_MHU=n
+CONFIG_PLATFORM_MHU=n
+
+CONFIG_ACPI=n
+
+CONFIG_NUMA=n
+
+CONFIG_XEN=n
+CONFIG_KVM=n
+
+CONFIG_ARM_BIG_LITTLE_CPUFREQ=n
+
+CONFIG_PCI_XGENE=n
+CONFIG_PCI_HISI=n
+CONFIG_PCIE_KIRIN=n
+
+# DRM
+CONFIG_DRM_NOUVEAU=n
+CONFIG_DRM_I2C_ADV7511=n
+CONFIG_DRM_ETNAVIV=n
+CONFIG_DRM_HISI_HIBMC=n
+CONFIG_DRM_HISI_KIRIN=n
+CONFIG_DRM_MXSFB=n
+CONFIG_DRM_PL111=n
+CONFIG_DRM_LIMA=n
+CONFIG_DRM_PANFROST=n
+
+# Video
+CONFIG_VGA_ARB=n
+CONFIG_FB_EFI=n
+
+# V4L2
+CONFIG_RC_CORE=n
+
+# Sound
+CONFIG_SND_SPI=n
+CONFIG_SND_SOC_FSL_SAI=n
+CONFIG_SND_SOC_AK4613=n
+CONFIG_SND_SOC_ES7134=n
+CONFIG_SND_SOC_ES7241=n
+CONFIG_SND_SOC_PCM3168A_I2C=n
+CONFIG_SND_SOC_TAS571X=n
+##################################################
+# TI Baseport Config Options
+##################################################
+
+# Serial
+CONFIG_SERIAL_8250_NR_UARTS=10
+CONFIG_SERIAL_8250_RUNTIME_UARTS=10
+
+# K3 Power config options
+CONFIG_PM=y
+
+# CPU Idle
+CONFIG_CPU_IDLE=y
+
+# ARM CPU Idle Drivers
+CONFIG_ARM_CPUIDLE=y
+CONFIG_ARM_PSCI_CPUIDLE=n
+
+# CPU Frequency scaling
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+
+# Enable Reset Controllers
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RESET_TI_SYSCON=y
+
+# Enable support for perf
+CONFIG_PERF_EVENTS=y
+
+# Add Bin2c
+CONFIG_BUILD_BIN2C=y
+
+# Add base Cgroups functions
+
+# Choose CONFIG_EMBEDDED
+CONFIG_EMBEDDED=y
+
+# Enable all kernel symbols please
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+
+# How do we want kernel Modules to work?
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+
+# Boot options
+CONFIG_CRASH_DUMP=n
+
+# Mem allocator
+
+# Pinctrl
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_SINGLE=y
+
+# GPIO
+CONFIG_GPIO_SYSFS=y
+
+# Crypto SA2UL
+CONFIG_CRYPTO_DEV_SA2UL=m
+
+# Enable options to facilitate testing
+CONFIG_CRYPTO_TEST=m
+
+# Thermal
+CONFIG_K3_THERMAL=y
+
+# Disable extra debug options
+CONFIG_PROFILING=n
+
+# Block Layer
+CONFIG_BLK_DEV_RAM=y
+
+# PMIC
+CONFIG_MFD_PALMAS=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_PALMAS=y
+
+# Watchdog support
+CONFIG_K3_RTI_WATCHDOG=m
+
+# RTC Drivers
+CONFIG_RTC_DRV_TI_K3=y
+
+# Counter device
+CONFIG_COUNTER=m
+
+# UIO and overlay support for Jailhouse
+CONFIG_UIO=y
+CONFIG_OF_OVERLAY=y
+
+# DMA-BUF Heaps
+CONFIG_DMABUF_HEAPS=y
+CONFIG_DMABUF_HEAPS_SYSTEM=y
+CONFIG_DMABUF_HEAPS_CMA=y
+CONFIG_DMABUF_HEAPS_CARVEOUT=y
+CONFIG_SRAM_DMA_HEAP=y
+
+# DMA-BUF exporter
+CONFIG_DMA_BUF_PHYS=y
+
+# TI PAT
+CONFIG_TI_PAT=y
+
+# Enable Staging drivers for ARMV8
+CONFIG_STAGING=y
+
+# MCRC and its userspace support
+CONFIG_CRYPTO_DEV_TI_MCRC64=m
+CONFIG_CRYPTO_USER_API_HASH=m
+##################################################
+# TI RPMsg/IPC Config Options
+##################################################
+# HwSpinLock
+CONFIG_HWSPINLOCK_OMAP=y
+
+# Mailbox
+CONFIG_MAILBOX=y
+CONFIG_OMAP2PLUS_MBOX=y
+
+# SoC Drivers
+CONFIG_TI_PRUSS=m
+
+# IrqChip Drivers
+CONFIG_TI_PRUSS_INTC=m
+
+# Remoteproc
+CONFIG_TI_K3_R5_REMOTEPROC=m
+CONFIG_TI_K3_DSP_REMOTEPROC=m
+CONFIG_PRU_REMOTEPROC=m
+CONFIG_TI_K3_M4_REMOTEPROC=m
+
+# RPMsg
+CONFIG_RPMSG_CHAR=m
+CONFIG_RPMSG_VIRTIO=m
+CONFIG_RPMSG_PRU=m
+
+# RPMsg Samples
+# CONFIG_SAMPLES=y
+# CONFIG_SAMPLE_RPMSG_CLIENT=m
+##################################################
+# TI Connectivity Configs
+##################################################
+
+# Disable unused I2C options
+CONFIG_I2C_MUX=n
+CONFIG_I2C_DESIGNWARE_PLATFORM=n
+CONFIG_I2C_GPIO=n
+CONFIG_I2C_RK3X=n
+CONFIG_I2C_XILINX=n
+
+# I2C controllers
+CONFIG_I2C=y
+CONFIG_I2C_OMAP=y
+
+# I2C GPIO expanders
+CONFIG_GPIO_PCA953X=y
+CONFIG_GPIO_PCA953X_IRQ=y
+CONFIG_GPIO_PCF857X=y
+CONFIG_GPIO_TPIC2810=m
+
+#I2C EEPROMS
+CONFIG_EEPROM_AT24=m
+
+#SPI EEPROMS
+CONFIG_EEPROM_93XX46=m
+
+# PTP
+CONFIG_PTP_1588_CLOCK=y
+
+#Networking drivers
+CONFIG_NET_VENDOR_TI=y
+CONFIG_KEYSTONE_NAVIGATOR_QMSS=y
+CONFIG_KEYSTONE_NAVIGATOR_DMA=y
+CONFIG_TI_KEYSTONE_NETCP=y
+CONFIG_TI_KEYSTONE_NETCP_ETHSS=y
+CONFIG_TI_DAVINCI_EMAC=y
+CONFIG_TI_DAVINCI_MDIO=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_GPIO=y
+CONFIG_TI_CPSW=y
+CONFIG_TI_CPSW_SWITCHDEV=y
+CONFIG_TI_CPTS=y
+CONFIG_TI_RDEV_ETH_SWITCH_VIRT_EMAC=m
+CONFIG_TI_PRUETH=m
+CONFIG_TI_ICSSG_PRUETH=m
+CONFIG_TI_K3_AM65_CPSW_SWITCHDEV=y
+# non-TI Net vendors
+CONFIG_NET_DSA_BCM_SF2=n
+CONFIG_B53=n
+CONFIG_SYSTEMPORT=n
+CONFIG_NET_VENDOR_3COM=n
+CONFIG_NET_VENDOR_ADAPTEC=n
+CONFIG_NET_VENDOR_AGERE=n
+CONFIG_NET_VENDOR_ALTEON=n
+CONFIG_NET_VENDOR_AMAZON=n
+CONFIG_NET_VENDOR_AMD=n
+CONFIG_NET_VENDOR_ARC=n
+CONFIG_NET_VENDOR_ATHEROS=n
+CONFIG_NET_VENDOR_BROCADE=n
+CONFIG_NET_VENDOR_CAVIUM=n
+CONFIG_NET_VENDOR_CHELSIO=n
+CONFIG_BCMGENET=n
+CONFIG_NET_VENDOR_CIRRUS=n
+CONFIG_NET_VENDOR_CISCO=n
+CONFIG_NET_VENDOR_DEC=n
+CONFIG_NET_VENDOR_DLINK=n
+CONFIG_NET_VENDOR_EMULEX=n
+CONFIG_NET_VENDOR_EZCHIP=n
+CONFIG_NET_VENDOR_FARADAY=n
+CONFIG_NET_VENDOR_HISILICON=n
+CONFIG_NET_VENDOR_HP=n
+CONFIG_IGB=n
+CONFIG_NET_VENDOR_I825XX=n
+CONFIG_NET_VENDOR_MELLANOX=n
+CONFIG_NET_VENDOR_MICROCHIP=n
+CONFIG_NET_VENDOR_MYRI=n
+CONFIG_NET_VENDOR_NATSEMI=n
+CONFIG_NET_VENDOR_NETRONOME=n
+CONFIG_NET_VENDOR_NVIDIA=n
+CONFIG_NET_VENDOR_OKI=n
+CONFIG_NET_VENDOR_8390=n
+CONFIG_NET_VENDOR_QLOGIC=n
+CONFIG_NET_VENDOR_REALTEK=n
+CONFIG_NET_VENDOR_RENESAS=n
+CONFIG_NET_VENDOR_RDC=n
+CONFIG_NET_VENDOR_ROCKER=n
+CONFIG_NET_VENDOR_SAMSUNG=n
+CONFIG_NET_VENDOR_SILAN=n
+CONFIG_NET_VENDOR_SIS=n
+CONFIG_NET_VENDOR_SEEQ=n
+CONFIG_NET_VENDOR_STMICRO=n
+CONFIG_NET_VENDOR_SUN=n
+CONFIG_NET_VENDOR_SYNOPSYS=n
+CONFIG_NET_VENDOR_TEHUTI=n
+CONFIG_NET_VENDOR_VIA=n
+CONFIG_NET_VENDOR_WIZNET=n
+#Wireless LAN
+CONFIG_WLCORE=m
+CONFIG_WLCORE_SDIO=m
+CONFIG_WL18XX=m
+CONFIG_NL80211_TESTMODE=y
+CONFIG_MAC80211_MESH=y
+
+#MDIO phys
+CONFIG_MARVELL_PHY=y
+CONFIG_MICREL_PHY=y
+# unused PHY drivers
+CONFIG_BROADCOM_PHY=n
+CONFIG_ICPLUS_PHY=n
+#PRU MII PHYs for Industrial Boards
+CONFIG_DP83848_PHY=y
+# Enable phy for DRA72 evm
+CONFIG_DP83867_PHY=y
+# Enable phy for AM64 evm
+CONFIG_DP83869_PHY=y
+# Control onboard MDIO muxes
+CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y
+
+#MTD
+CONFIG_MTD=y
+CONFIG_MEMORY=y
+CONFIG_TI_AEMIF=y
+CONFIG_OMAP_GPMC=y
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_OMAP_BCH=y
+CONFIG_MTD_NAND_OMAP_BCH_BUILD=y
+CONFIG_MTD_NAND_DAVINCI=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_TESTS=m
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_HYPERBUS=y
+CONFIG_HBMC_AM654=y
+
+#PCIE
+CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
+CONFIG_PCI=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=y
+CONFIG_PCI_EPF_NTB=y
+CONFIG_PCI_ENDPOINT_TEST=m
+CONFIG_PCI_DRA7XX=y
+CONFIG_PCI_DRA7XX_HOST=y
+CONFIG_PCI_DRA7XX_EP=y
+CONFIG_PCI_KEYSTONE=y
+CONFIG_PCI_KEYSTONE_HOST=y
+CONFIG_PCI_KEYSTONE_EP=y
+CONFIG_PCI_J721E=y
+CONFIG_PCI_J721E_HOST=y
+CONFIG_PCI_J721E_EP=y
+CONFIG_PCIE_CADENCE=y
+CONFIG_PCIE_CADENCE_HOST=y
+CONFIG_PCIE_CADENCE_EP=y
+
+#NTB
+CONFIG_NTB=m
+CONFIG_NTB_EPF=m
+CONFIG_NTB_TRANSPORT=m
+CONFIG_NTB_NETDEV=m
+
+#NVME
+CONFIG_NVME_CORE=m
+CONFIG_BLK_DEV_NVME=m
+
+#These drivers have been used with DRA7x/AM57x PCIe RC with some success
+CONFIG_NET_VENDOR_BROADCOM=y
+CONFIG_NET_VENDOR_MARVELL=y
+CONFIG_NET_VENDOR_INTEL=y
+CONFIG_TIGON3=m
+CONFIG_SKGE=m
+CONFIG_E1000=m
+CONFIG_E1000E=m
+CONFIG_IWLWIFI=m
+CONFIG_IWLDVM=m
+CONFIG_IWLMVM=m
+CONFIG_B43=m
+#Generic Phys
+CONFIG_PHY_AM654_SERDES=y
+CONFIG_PHY_TI_KEYSTONE_SERDES=y
+CONFIG_PHY_CADENCE_SIERRA=y
+
+# Networking
+CONFIG_HSR=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_BRIDGE=m
+CONFIG_XFRM_USER=m
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_INET_AH=m
+CONFIG_INET6_AH=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_NETFILTER=y
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CPU=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_802_3=m
+CONFIG_BRIDGE_EBT_AMONG=m
+CONFIG_BRIDGE_EBT_ARP=m
+CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_IP6=m
+CONFIG_BRIDGE_EBT_LIMIT=m
+CONFIG_BRIDGE_EBT_MARK=m
+CONFIG_BRIDGE_EBT_PKTTYPE=m
+CONFIG_BRIDGE_EBT_STP=m
+CONFIG_BRIDGE_EBT_VLAN=m
+CONFIG_BRIDGE_EBT_ARPREPLY=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_NFLOG=m
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_MULTIQ=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFB=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_DRR=m
+CONFIG_NET_SCH_MQPRIO=m
+CONFIG_NET_SCH_TAPRIO=m
+CONFIG_NET_SCH_CHOKE=m
+CONFIG_NET_SCH_QFQ=m
+CONFIG_NET_SCH_CODEL=m
+CONFIG_NET_SCH_FQ_CODEL=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_FLOW=m
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_STACK=32
+CONFIG_NET_EMATCH_CMP=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_U32=m
+CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
+CONFIG_NET_ACT_GACT=m
+CONFIG_GACT_PROB=y
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_NAT=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_ACT_SKBEDIT=m
+CONFIG_NET_ACT_CSUM=m
+CONFIG_NET_SCH_FIFO=y
+CONFIG_IP_SCTP=m
+CONFIG_VLAN_8021Q=m
+CONFIG_IP_MULTICAST=y
+CONFIG_NET_SWITCHDEV=y
+
+# Ethernet drivers
+CONFIG_TI_K3_AM65_CPSW_NUSS=y
+CONFIG_TI_AM65_CPSW_TAS=y
+CONFIG_TI_K3_AM65_CPTS=y
+#MMC/SD support
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_SDHCI_OMAP=y
+CONFIG_MMC_DW=n
+CONFIG_MMC_SDHCI_AM654=y
+
+#SPI
+CONFIG_SPI_CADENCE_QUADSPI=y
+CONFIG_SPI_TI_QSPI=y
+CONFIG_SPI_OMAP24XX=y
+CONFIG_SPI_SLAVE=y
+CONFIG_SPI_SPIDEV=m
+#Disable unused SPI controllers
+CONFIG_SPI_BITBANG=n
+CONFIG_SPI_CADENCE=n
+CONFIG_SPI_ROCKCHIP=n
+CONFIG_SPI_XILINX=n
+
+#Disable SPI NOR 4K SECTORS
+CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=n
+
+#SPI GPIO expanders
+CONFIG_GPIO_PISOSR=m
+
+#SATA
+CONFIG_SATA_AHCI_PLATFORM=m
+CONFIG_SATA_AHCI=m
+CONFIG_ATA=m
+
+#USB PHY
+CONFIG_OMAP_USB2=m
+
+#USB gadgets
+CONFIG_USB_GADGET=m
+CONFIG_USB_AUDIO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_G_NCM=m
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FUNCTIONFS=m
+CONFIG_USB_FUNCTIONFS_ETH=y
+CONFIG_USB_FUNCTIONFS_RNDIS=y
+CONFIG_USB_FUNCTIONFS_GENERIC=y
+CONFIG_USB_MASS_STORAGE=m
+CONFIG_USB_G_SERIAL=m
+CONFIG_USB_MIDI_GADGET=m
+CONFIG_USB_G_PRINTER=m
+CONFIG_USB_CDC_COMPOSITE=m
+CONFIG_USB_G_ACM_MS=m
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_CDC=y
+CONFIG_USB_G_HID=m
+CONFIG_USB_G_DBGP=m
+CONFIG_USB_G_WEBCAM=m
+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=32
+CONFIG_USB_ZERO=m
+CONFIG_USB_CONFIGFS=m
+CONFIG_USB_CONFIGFS_SERIAL=y
+CONFIG_USB_CONFIGFS_ACM=y
+CONFIG_USB_CONFIGFS_OBEX=y
+CONFIG_USB_CONFIGFS_NCM=y
+CONFIG_USB_CONFIGFS_ECM=y
+CONFIG_USB_CONFIGFS_ECM_SUBSET=y
+CONFIG_USB_CONFIGFS_RNDIS=y
+CONFIG_USB_CONFIGFS_EEM=y
+CONFIG_USB_CONFIGFS_MASS_STORAGE=y
+CONFIG_USB_CONFIGFS_F_LB_SS=y
+CONFIG_USB_CONFIGFS_F_FS=y
+CONFIG_USB_CONFIGFS_F_UAC1=y
+CONFIG_USB_CONFIGFS_F_UAC2=y
+CONFIG_USB_CONFIGFS_F_MIDI=y
+CONFIG_USB_CONFIGFS_F_HID=y
+CONFIG_USB_CONFIGFS_F_UVC=y
+CONFIG_USB_CONFIGFS_F_PRINTER=y
+
+# USB DWC3
+CONFIG_USB_DWC3=m
+CONFIG_USB_DWC3_DUAL_ROLE=y
+CONFIG_USB_DWC3_OMAP=m
+CONFIG_USB_DWC3_KEYSTONE=m
+CONFIG_USB_DWC3_AM62=m
+CONFIG_USB_DWC3_PCI=n
+CONFIG_USB_DWC2=n
+CONFIG_USB_CHIPIDEA=n
+
+# USB CDNS3
+CONFIG_USB_CDNS3=m
+CONFIG_USB_CDNS3_GADGET=y
+CONFIG_USB_CDNS3_HOST=y
+CONFIG_USB_CDNS3_TI=m
+
+#USB PHY
+CONFIG_NOP_USB_XCEIV=m
+
+#USB MUSB
+CONFIG_USB_MUSB_HDRC=m
+CONFIG_USB_MUSB_DUAL_ROLE=y
+CONFIG_USB_MUSB_OMAP2PLUS=m
+CONFIG_USB_MUSB_AM35X=m
+CONFIG_USB_MUSB_DSPS=m
+CONFIG_USB_MUSB_AM335X_CHILD=m
+CONFIG_TI_CPPI41=y
+CONFIG_USB_TI_CPPI41_DMA=y
+CONFIG_AM335X_CONTROL_USB=y
+CONFIG_AM335X_PHY_USB=y
+
+#USB EHCI
+CONFIG_USB=m
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_PCI=m
+CONFIG_USB_EHCI_HCD_OMAP=m
+
+#USB Networking
+CONFIG_USB_NET_DRIVERS=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_RTL8152=m
+CONFIG_USB_LAN78XX=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_AX88179_178A=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_CDC_EEM=m
+CONFIG_USB_NET_CDC_NCM=m
+CONFIG_USB_NET_SMSC75XX=m
+CONFIG_USB_NET_SMSC95XX=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_CDC_SUBSET_ENABLE=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_NET_ZAURUS=m
+
+#USB testing
+CONFIG_USB_TEST=m
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+#USB Serial
+CONFIG_USB_ACM=m
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_CP210X=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OPTION=m
+
+# Extcon drivers
+CONFIG_EXTCON=m
+CONFIG_EXTCON_PALMAS=m
+CONFIG_EXTCON_USB_GPIO=m
+
+# USB PD controller drivers
+CONFIG_TYPEC_TPS6598X=m
+
+# PWM
+CONFIG_PWM_TIECAP=y
+CONFIG_PWM_TIEHRPWM=y
+CONFIG_PWM_TIPWMSS=y
+CONFIG_PWM_OMAP_DMTIMER=y
+
+# eCAP driver
+CONFIG_TI_ECAP_CAPTURE=m
+
+# 1-wire Bus Masters
+CONFIG_W1=m
+CONFIG_HDQ_MASTER_OMAP=m
+
+# Matrix keypad
+CONFIG_KEYBOARD_MATRIX=m
+
+#Touchscreen/ADC
+CONFIG_TOUCHSCREEN_PIXCIR=m
+CONFIG_MFD_TI_AM335X_TSCADC=m
+CONFIG_TOUCHSCREEN_TI_AM335X_TSC=m
+CONFIG_TI_AM335X_ADC=m
+
+#CAN
+CONFIG_CAN=m
+CONFIG_CAN_C_CAN=m
+CONFIG_CAN_C_CAN_PLATFORM=m
+CONFIG_CAN_M_CAN=m
+CONFIG_CAN_M_CAN_PLATFORM=m
+
+# CAN Transceiver
+CONFIG_PHY_CAN_TRANSCEIVER=m
+
+# Rotary Encoder
+CONFIG_INPUT_GPIO_DECODER=m
+
+# Filesystem extra options
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=y
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+CONFIG_UBIFS_FS=y
+
+# HD-Audio
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=m
+
+#UFS
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_SCSI_UFSHCD=y
+CONFIG_SCSI_UFS_BSG=y
+CONFIG_SCSI_UFSHCD_PLATFORM=y
+CONFIG_SCSI_UFS_CDNS_PLATFORM=y
+CONFIG_SCSI_UFS_TI_J721E=y
+
+#PRUSS-UART
+CONFIG_SERIAL_8250_PRUSS=m
+
+# MUX Drivers
+CONFIG_MUX_GPIO=y
+
+# PRU Soft UART driver
+CONFIG_SERIAL_PRU_SWUART=m
+
+# Enable Power line communication Common drivers
+CONFIG_NET_VENDOR_QUALCOMM=y
+CONFIG_QCA7000=m
+CONFIG_QCA7000_SPI=m
+CONFIG_QCA7000_UART=m
+
+# AF_XDP
+CONFIG_BPF_SYSCALL=y
+CONFIG_XDP_SOCKETS=y
+##################################################
+# TI Audio/Display config options
+##################################################
+
+CONFIG_CMA=y
+CONFIG_DMA_CMA=y
+CONFIG_CMA_SIZE_MBYTES=512
+
+# backlight
+
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_TLC591XX=y
+
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_BACKLIGHT_GPIO=y
+CONFIG_BACKLIGHT_LED=y
+
+# fbdev
+
+CONFIG_FB_SSD1307=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_DRM_MIPI_DBI=m
+CONFIG_TINYDRM_ILI9225=m
+
+# DRM
+CONFIG_DRM=y
+CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS=y
+CONFIG_DRM_DISPLAY_CONNECTOR=y
+CONFIG_DRM_LVDS_CODEC=y
+CONFIG_DRM_SII902X=y
+CONFIG_DRM_TOSHIBA_TC358767=y
+CONFIG_DRM_TOSHIBA_TC358768=y
+CONFIG_DRM_TI_TFP410=y
+CONFIG_DRM_TI_TPD12S015=y
+
+# Firmware loading only works if built as module
+CONFIG_DRM_CDNS_MHDP8546=m
+CONFIG_DRM_CDNS_DSI=m
+
+CONFIG_PHY_J721E_WIZ=y
+CONFIG_PHY_CADENCE_TORRENT=y
+
+# SGX driver needs legacy support
+CONFIG_DRM_LEGACY=y
+
+CONFIG_DRM_I2C_NXP_TDA998X=y
+
+# tidss
+CONFIG_DRM_TIDSS=y
+
+# Touchscreen
+CONFIG_TOUCHSCREEN_GOODIX=m
+CONFIG_TOUCHSCREEN_ILI210X=m
+CONFIG_TOUCHSCREEN_EDT_FT5X06=m
+CONFIG_HID_MULTITOUCH=m
+
+# V4L2
+CONFIG_VIDEO_CADENCE=y
+CONFIG_VIDEO_CADENCE_CSI2RX=m
+CONFIG_VIDEO_TI_CAL=m
+CONFIG_VIDEO_TI_J721E_CSI2RX=m
+CONFIG_VIDEO_IMX390=m
+CONFIG_VIDEO_OV2659=m
+CONFIG_VIDEO_OV5640=m
+CONFIG_VIDEO_OV1063X=m
+CONFIG_VIDEO_OV2312=m
+CONFIG_VIDEO_DS90UB953=m
+CONFIG_VIDEO_DS90UB960=m
+CONFIG_PHY_CADENCE_DPHY=m
+
+# Sound
+CONFIG_SND_SOC_DAVINCI_MCASP=y
+CONFIG_SND_SOC_J721E_EVM=m
+CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
+CONFIG_SND_SOC_TLV320AIC31XX=m
+CONFIG_SND_SOC_TLV320AIC3X=m
+
+# display sharing
+CONFIG_RPMSG_KDRV_DISPLAY=y
+##################################################
+# TI Multimedia (Video Decode, Encode) Configs
+##################################################
+
+# IMG D5500 v4l2 Driver Config Options
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_VIDEO_IMG_VXD_DEC=m
+
+# IMG VXE384 v4l2 Driver Config Options
+CONFIG_VIDEO_IMG_VXE_ENC=m
+
+# Enable multimedia staging drivers for Wave VPU driver.
+CONFIG_STAGING_MEDIA=y
+CONFIG_VIDEO_WAVE_VPU=m
+##############################################
+#
+# Kernel options needed for systemd enabled TI SDKs
+# See https://cgit.freedesktop.org/systemd/systemd/tree/README#n38 for details
+#
+##############################################
+CONFIG_TMPFS=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_BLK_CGROUP=y
+CONFIG_CGROUP_PIDS=y
+CONFIG_CGROUP_PERF=y
+
+CONFIG_INOTIFY_USER=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EPOLL=y
+CONFIG_NET=y
+CONFIG_SYSFS=y
+CONFIG_PROC_FS=y
+CONFIG_FHANDLE=y
+
+# udev will fail to work with the legacy sysfs layout:
+CONFIG_SYSFS_DEPRECATED=n
+
+# Legacy hotplug slows down the system and confuses udev:
+CONFIG_UEVENT_HELPER_PATH=""
+
+# Userspace firmware loading is not supported and should
+# be disabled in the kernel:
+CONFIG_FW_LOADER_USER_HELPER=n
+
+# Some udev rules and virtualization detection relies on it:
+# Only for UEFI based systems
+# http://cateee.net/lkddb/web-lkddb/DMI.html
+CONFIG_DMIID=n
+
+# Support for some SCSI devices serial number retrieval, to
+# create additional symlinks in /dev/disk/ and /dev/tape:
+CONFIG_BLK_DEV_BSG=y
+
+# Required for PrivateNetwork and PrivateDevices in service units:
+# Note that systemd-localed.service and other systemd units use
+# PrivateNetwork and PrivateDevices so this is effectively required.
+CONFIG_NAMESPACES=y
+CONFIG_NET_NS=y
+CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
+
+# Optional but strongly recommended options: those are nice to have and
+# indeed recommended, but not necessarily systemd required. These to be
+# enabled in corresponding domain fragments since they are not specific
+# to supporting systemd.
+
+CONFIG_SECCOMP=y
+# for kcmp syscall
+CONFIG_CHECKPOINT_RESTORE=y
+
+# Required for CPUShares= in resource control unit settings
+CONFIG_CGROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+
+# Required for CPUQuota= in resource control unit settings
+CONFIG_CFS_BANDWIDTH=y
+
+# For systemd-bootchart, several proc debug interfaces are required:
+# Systemd-debug.cfg?
+CONFIG_SCHEDSTATS=y
+CONFIG_SCHED_DEBUG=y
+
+# We recommend to turn off Real-Time group scheduling in the
+# kernel when using systemd. RT group scheduling effectively
+# makes RT scheduling unavailable for most userspace, since it
+# requires explicit assignment of RT budgets to each unit whose
+# processes making use of RT. As there's no sensible way to
+# assign these budgets automatically this cannot really be
+# fixed, and it's best to disable group scheduling hence.
+CONFIG_RT_GROUP_SCHED=n
+
+# Note that kernel auditing is broken when used with systemd's
+# container code. When using systemd in conjunction with
+# containers, please make sure to either turn off auditing at
+# runtime using the kernel command line option "audit=0", or
+# turn it off at kernel compile time using:
+CONFIG_AUDIT=n
+##############################################
+#
+# Kernel options needed for container enabled TI SDKs
+# See https://raw.githubusercontent.com/moby/moby/v20.10.12/contrib/check-config.sh
+# Also see lxc-checkconfig
+#
+##############################################
+
+# Just the basic container configuration necessary
+CONFIG_CGROUP_BPF=y
+CONFIG_VETH=m
+CONFIG_BRIDGE_NETFILTER=m
+CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_IPVS=m
+CONFIG_NET_CLS_CGROUP=m
+CONFIG_IP_VS=m
+CONFIG_IP_VS_RR=m
+CONFIG_VXLAN=m
+CONFIG_IPVLAN=m
+CONFIG_MACVLAN=m
+CONFIG_DUMMY=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_AUFS_FS=m
+CONFIG_BTRFS_FS=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_THIN_PROVISIONING=m
+CONFIG_OVERLAY_FS=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+##################################################
+# Common Debug options considered generically
+# useful for kernel debug. This is not meant to
+# be an exhaustive list of options and will probably
+# have performance impact by using the same.
+#
+# IMPORTANT NOTE: Do not collect reference performance
+# data with this configuration.
+##################################################
+
+CONFIG_DYNAMIC_DEBUG=y
+
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_WANT_PAGE_DEBUG_FLAGS=y
+CONFIG_PAGE_POISONING=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_SELFTEST=n
+CONFIG_DEBUG_OBJECTS_FREE=n
+CONFIG_DEBUG_OBJECTS_TIMERS=n
+CONFIG_DEBUG_OBJECTS_WORK=n
+CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=n
+CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
+CONFIG_DEBUG_SLAB=y
+CONFIG_DEBUG_SLAB_LEAK=y
+CONFIG_SLUB_DEBUG=y
+
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=8000
+CONFIG_DEBUG_KMEMLEAK_TEST=n
+CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=n
+
+CONFIG_DEBUG_SHIRQ=n
+CONFIG_DEBUG_PREEMPT=y
+
+CONFIG_LOCKUP_DETECTOR=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=300
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
+CONFIG_PANIC_ON_OOPS=y
+CONFIG_PANIC_ON_OOPS_VALUE=1
+
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_PI_LIST=y
+CONFIG_RT_MUTEX_TESTER=n
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_LOCKDEP=y
+CONFIG_LOCK_STAT=n
+CONFIG_DEBUG_LOCKDEP=y
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+CONFIG_DEBUG_LOCKING_API_SELFTESTS=n
+CONFIG_STACKTRACE=y
+CONFIG_DEBUG_KOBJECT=n
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_WRITECOUNT=n
+CONFIG_DEBUG_LIST=y
+CONFIG_DEBUG_SG=y
+CONFIG_DEBUG_NOTIFIERS=y
+CONFIG_DEBUG_CREDENTIALS=n
+
+CONFIG_SPARSE_RCU_POINTER=y
+CONFIG_RCU_TORTURE_TEST=n
+CONFIG_RCU_CPU_STALL_TIMEOUT=60
+CONFIG_RCU_CPU_STALL_INFO=y
+CONFIG_RCU_TRACE=y
+CONFIG_PROVE_RCU=y
+CONFIG_PROVE_RCU_REPEATEDLY=y
+
+CONFIG_DMA_API_DEBUG=y
+
+CONFIG_ARM_PTDUMP=y
+CONFIG_ARM_UNWIND=y
+CONFIG_DEBUG_USER=y
+
+# Cgroups debug
+CONFIG_CGROUP_DEBUG=y
+CONFIG_DEBUG_BLK_CGROUP=y
+
+# IRQ Domain debug
+CONFIG_IRQ_DOMAIN_DEBUG=y
+
+# Debug HighMem
+CONFIG_DEBUG_HIGHMEM=y
+
+# Crypto self-tests
+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=n
+
+# Enable Debug configuration for EFI if enabled
+CONFIG_DEBUG_EFI=y
+
+# Power management options
+CONFIG_PM_DEBUG=y
board/ti/am62x_sk/ti_sdk_arm64_release_defconfig new file +1894 -0

1,009 lines not on this page · raw message

board/ti/am64x_sk/ti_sdk_arm64_debug_defconfig new file +1991 -0

1,991 lines not on this page · raw message

board/ti/am64x_sk/ti_sdk_arm64_release_defconfig new file +1894 -0

1,894 lines not on this page · raw message

configs/am62x_sk_defconfig +14 -5
index 083720f512..0b196f4cce 100644

Lines of this file are not shown. View the raw message.

configs/am64x_sk_defconfig +14 -5
index 411b3d5b0f..ccd58dad68 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 7 lines
2.34.1


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

Part of the diff is not shown here. View the raw message.

#22 lore raw

Re: [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 5 lines

Switch the following projects to using the same Git source repos and commit IDs that are used to build the TI SDK v8.6 for AM62x and AM64x devices to establish a baseline for comparable functionality:

* TI Linux Kernel v5.10

So this means going from a 6.3 kernel back to a 5.10 (the current latest if 6.3, which is what is used in the defconfigs from the two previous patches). That's a bit unfortunate.

Do you have plans to update to a more recent kernel in the (near) future? Can't we keep using 6.3 anyway?

Quoted 8 lines

* TI U-Boot v2021.01
* ARM Trusted Firmware
* OP-TEE

For the Linux Kernel this also includes switching the defconfig to a new one that is generated with the ti_config_fragments/defconfig_builder.sh tool that is part of the respective ti-linux-5.10.y repository.

Quoted 6 lines
---
 .../ti/am62x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am62x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 .../ti/am64x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am64x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++

Those are really big defconfigs... Why can't we use the defconfig anymore?

Also, for each board, you are providing two defconfigs, one release and one debug, but only one is used. We don;t want to carry files that are unused, because they are going to bitrot sooner than later.

Just add the two defconfigs that are needed, one for each board.

Also, I think it would be preferrable that the files be named linux.config (.config even though it is a defconfig, yes), like we do for the other boards (there are slight deviations, like adding the lernel version, or a 'nommu', but only one is named after the board).

Regards,
Yann E. MORIN.

[--SNIP--]

configs/am62x_sk_defconfig line 2

Quoted 7 lines
configs/am62x_sk_defconfig +1 -0
index 083720f512..0b196f4cce 100644
@@ -1,8 +1,12 @@
 BR2_aarch64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y

This is out-of-order.

Either you have manually-edited defconfigs, and then you should provide comments in there, like (see existing defconfigs for exampleS):

# Linux headers same as kernel, a 5.10 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y

or you have a defconfig that is fully auto-gemnerated with save-defconfig.

I prefer the latter, but other maintainers may prefer the former..

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#23 lore raw

Re: [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources

Quoted 7 lines · Yann E. MORIN

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 4 lines

Switch the following projects to using the same Git source repos and commit IDs that are used to build the TI SDK v8.6 for AM62x and AM64x devices to establish a baseline for comparable functionality:

Quoted 8 lines
Quoted 1 line

* TI Linux Kernel v5.10

So this means going from a 6.3 kernel back to a 5.10 (the current latest if 6.3, which is what is used in the defconfigs from the two previous patches). That's a bit unfortunate.

Do you have plans to update to a more recent kernel in the (near) future? Can't we keep using 6.3 anyway?

We don't actually have a clear policy on whether to use upstream or vendor
kernels for the defconfigs. We have a few boards with both, but IMHO that's not a great approach either.

Personally, I think it makes sense to focus on vendor kernels for the
defconfigs. Using upstream is generally easy, you just have to find the appropriate device tree. But for the vendor kernel, you have to find the repository, which branch is "current", and often also make sure you sync up with U-Boot and OP-TEE etc. versions. @Andreas don't take this as law, though, it's just personal opinion.

That said, I think for each board we should look at what the vendor kernel
really brings. If everything, including GPU, is working with the upstream kernel, it doesn't make sense to use the vendor kernel. I don't know if that's the case in this specific situation.

Yann, Peter, Romain, Thomas, what do you think?

Regards,
Arnout

Quoted 50 lines
Quoted 9 lines

* TI U-Boot v2021.01
* ARM Trusted Firmware
* OP-TEE

For the Linux Kernel this also includes switching the defconfig to a new one that is generated with the ti_config_fragments/defconfig_builder.sh tool that is part of the respective ti-linux-5.10.y repository.

Quoted 6 lines
---
  .../ti/am62x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
  .../am62x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
  .../ti/am64x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
  .../am64x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++

Those are really big defconfigs... Why can't we use the defconfig anymore?

Also, for each board, you are providing two defconfigs, one release and one debug, but only one is used. We don;t want to carry files that are unused, because they are going to bitrot sooner than later.

Just add the two defconfigs that are needed, one for each board.

Also, I think it would be preferrable that the files be named linux.config (.config even though it is a defconfig, yes), like we do for the other boards (there are slight deviations, like adding the lernel version, or a 'nommu', but only one is named after the board).

Regards,
Yann E. MORIN.

[--SNIP--]

configs/am62x_sk_defconfig line 2

Quoted 7 lines
configs/am62x_sk_defconfig +1 -0
index 083720f512..0b196f4cce 100644
@@ -1,8 +1,12 @@
  BR2_aarch64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y

This is out-of-order.

Either you have manually-edited defconfigs, and then you should provide comments in there, like (see existing defconfigs for exampleS):

# Linux headers same as kernel, a 5.10 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y

Quoted 8 lines

or you have a defconfig that is fully auto-gemnerated with save-defconfig.

I prefer the latter, but other maintainers may prefer the former..

Regards,
Yann E. MORIN.

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

#24 lore raw

Re: [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Hi,

Quoted 12 lines
Quoted 7 lines
Quoted 1 line

* TI Linux Kernel v5.10

So this means going from a 6.3 kernel back to a 5.10 (the current latest
if 6.3, which is what is used in the defconfigs from the two previous patches). That's a bit unfortunate.
Do you have plans to update to a more recent kernel in the (near) future? Can't we keep using 6.3 anyway?

We don't actually have a clear policy on whether to use upstream or vendor kernels for the defconfigs. We have a few boards with both,
but IMHO that's not a great approach either.

Quoted 6 lines

Personally, I think it makes sense to focus on vendor kernels for the defconfigs. Using upstream is generally easy, you just have to find
the appropriate device tree. But for the vendor kernel, you have to find the repository, which branch is "current", and often also make sure you sync up with U-Boot and OP-TEE etc. versions. @Andreas don't take this as law, though, it's just personal opinion.

Correct, but given the poor quality of most vendor kernels, using a board with mainline is typically a lot nicer (if the IP blocks you care about are supported naturally).

Same about the support, E.G. we had issues with various vendor kernels/bootloaders breaking with newer toolchain versions.

Quoted 6 lines

That said, I think for each board we should look at what the vendor kernel really brings. If everything, including GPU, is working with
the upstream kernel, it doesn't make sense to use the vendor kernel. I don't know if that's the case in this specific situation.

Yann, Peter, Romain, Thomas, what do you think?

Agreed. I would in general say go for mainline, unless there is no decent support in mainline. I would not necessarily think that GPU support is a requirement, but at least the things used by the defconfig (E.G. storage, serial, network).

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#25 lore raw

Re: [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources

Quoted 23 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Hi,

Quoted 12 lines
Quoted 7 lines
Quoted 1 line

* TI Linux Kernel v5.10

So this means going from a 6.3 kernel back to a 5.10 (the current latest
if 6.3, which is what is used in the defconfigs from the two previous patches). That's a bit unfortunate.
Do you have plans to update to a more recent kernel in the (near) future? Can't we keep using 6.3 anyway?

We don't actually have a clear policy on whether to use upstream or vendor kernels for the defconfigs. We have a few boards with both,
but IMHO that's not a great approach either.

Quoted 6 lines

Personally, I think it makes sense to focus on vendor kernels for the defconfigs. Using upstream is generally easy, you just have to find
the appropriate device tree. But for the vendor kernel, you have to find the repository, which branch is "current", and often also make sure you sync up with U-Boot and OP-TEE etc. versions. @Andreas don't take this as law, though, it's just personal opinion.

Quoted 3 lines

Correct, but given the poor quality of most vendor kernels, using a board with mainline is typically a lot nicer (if the IP blocks you care about are supported naturally).

I'm not sure that you can claim most vendor kernels are poor quality. At least
NXP and Microchip have decent vendor kernels. Conversely, when vendor kernels are horrible, mainline is often not super usable either (because, of course, those vendors don't invest in upstreaming either).

Quoted 9 lines

Same about the support, E.G. we had issues with various vendor kernels/bootloaders breaking with newer toolchain versions.

Quoted 4 lines

That said, I think for each board we should look at what the vendor kernel really brings. If everything, including GPU, is working with
the upstream kernel, it doesn't make sense to use the vendor kernel. I don't know if that's the case in this specific situation.

Quoted 6 lines
Quoted 1 line

Yann, Peter, Romain, Thomas, what do you think?

Agreed. I would in general say go for mainline, unless there is no decent support in mainline. I would not necessarily think that GPU support is a requirement, but at least the things used by the defconfig (E.G. storage, serial, network).

That's exactly the opposite of what I was saying, so not agreed I guess :-)

Regards,
Arnout

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

#26 lore raw

Re: [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Hi,

Quoted 9 lines
Quoted 3 lines

Correct, but given the poor quality of most vendor kernels, using a board with mainline is typically a lot nicer (if the IP blocks you care about are supported naturally).

I'm not sure that you can claim most vendor kernels are poor quality. At least NXP and Microchip have decent vendor
kernels. Conversely, when vendor kernels are horrible, mainline is often not super usable either (because, of course, those vendors don't invest in upstreaming either).

Sure, not all vendor kernels are equal, but vendor drivers are often written by people not very familiar with the subsystem, so things get handled in "odd ways", and as they have not been submitted upstream they don't get any review feedback to clean it up. The vendor kernels of high quality is typically the ones where the vendor developers interact with mainline (so their drivers get reviewed by the subsystem maintainers). E.G. for the Microchip and NXP cases, the basics are anyway in mainline, so it is normal that the identical parts in the vendor kernel also looks sensible.

I am not aware of any situations where the mainline kernel is of lower quality than the vendor kernel. It will often have less features, but the support that is there is often cleaner.

Quoted 9 lines
Quoted 8 lines

Same about the support, E.G. we had issues with various vendor kernels/bootloaders breaking with newer toolchain versions.

Quoted 5 lines

That said, I think for each board we should look at what the vendor kernel really brings. If everything, including GPU, is working with
the upstream kernel, it doesn't make sense to use the vendor kernel. I don't know if that's the case in this specific situation.
Yann, Peter, Romain, Thomas, what do you think?

Quoted 6 lines
Quoted 4 lines

Agreed. I would in general say go for mainline, unless there is no decent support in mainline. I would not necessarily think that GPU support is a requirement, but at least the things used by the defconfig (E.G. storage, serial, network).

That's exactly the opposite of what I was saying, so not agreed I guess :-)

I guess it is a question of glass half full vs half empty. You wrote ".. we should look at what the vendor kernel really brings. If everything, including GPU, is working with the upsteam kernel, it doesn't make sense to use the vendor kernel", which I agreed with, EXCEPT that I think the cutoff point should be lower than "everything supported", but just if mainline is suitable for booting a Buildroot defconfig, E.G. working serial/storage/network.

But like usual, this is largely up to the person contributing the defconfig.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#27 lore raw

Re: [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources

In reply to Arnout Vandecappelle via buildroot

Arnout, Andreas, All,

On 2023-06-25 16:33 +0200, Arnout Vandecappelle via buildroot spake thusly:

Quoted 30 lines · Yann E. MORIN
Quoted 7 lines

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 4 lines

Switch the following projects to using the same Git source repos and commit IDs that are used to build the TI SDK v8.6 for AM62x and AM64x devices to establish a baseline for comparable functionality:

Quoted 8 lines
Quoted 1 line

* TI Linux Kernel v5.10

So this means going from a 6.3 kernel back to a 5.10 (the current latest if 6.3, which is what is used in the defconfigs from the two previous patches). That's a bit unfortunate.

Do you have plans to update to a more recent kernel in the (near) future? Can't we keep using 6.3 anyway?

We don't actually have a clear policy on whether to use upstream or vendor
kernels for the defconfigs. We have a few boards with both, but IMHO that's not a great approach either.

Personally, I think it makes sense to focus on vendor kernels for the
defconfigs. Using upstream is generally easy, you just have to find the appropriate device tree. But for the vendor kernel, you have to find the repository, which branch is "current", and often also make sure you sync up with U-Boot and OP-TEE etc. versions. @Andreas don't take this as law, though, it's just personal opinion.

Quoted 6 lines

That said, I think for each board we should look at what the vendor kernel
really brings. If everything, including GPU, is working with the upstream kernel, it doesn't make sense to use the vendor kernel. I don't know if that's the case in this specific situation.

Yann, Peter, Romain, Thomas, what do you think?

My position is that we should use upstream as much as possible, and switch to a fork only when that is needed.

Now, what "it is needed" means is very hazy. Lack of serial, storage, network upstream certainly means it is not suitable. Lack of support for some obscure IP block that no one uses or even knows of, is certainly not a blocker. Then there is the wide gray range of peripherals (GPU, hw crypto accels, etc...) that some may see as critical while others might not care about.

So I guess the rule is: deviating from upstream should be dully motivated, not just "get in sync with Yocto/OE" or whatev'.

What prompted my initial comment above, is that the series introduces two defconfigs that use the upstream kernel, i.e. 6.3 as of now, but then this patch dwindles back to use the 5.10-vendor. So, the question is really, indeed: why use the 5.10-vendor tree when the 6.3-upstream seems to work?

Or put in other words: does the 6.3-upstream actually works, as introduced in the previous patches?

I.e. if we do not apply this patch, does the am62x_sk_defconfig and the am64x_sk_defconfig work?

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#28 lore raw

PATCH v9 7/11 package/ti-core-secdev-k3: new package

In reply to Andreas Dannenberg via buildroot

The ti-core-secdev-k3 package is used to provide binary image signing tools and keys to the build process needed to build boot artifacts for the secure boot flow on TI K3 platform "High Security" SoCs (device variants "HS-FS" and "HS-SE"). This package is not needed building for "General Purpose" ("GP") SoC variants.

This commit also updates the ti-k3-image-gen, ti-k3-r5-loader, and uboot packages which are all used as part of the boot flow of TI K3 platform devices to make use of the ti-core-secdev-k3 package if enabled.

Note that although the use of the underlying 'core-secdev-k3' tool provided by TI is required to generate bootable images for HS-FS and HS-SE device variants, the use of this Buildroot package itself should remain optional, hence no hard dependencies are being established. The reason is that a user often wants to provide their own signing tool through the use of the TI_SECURE_DEV_PKG environmental variable set outside Buildroot on their specific build machine, especially for HS-SE device variants where the signing tool would contain the user's private keys.

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

---
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 10 ++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 10 ++++++
 boot/uboot/uboot.mk                           | 10 ++++++
 package/Config.in.host                        |  1 +
 package/ti-core-secdev-k3/Config.in.host      | 11 +++++++
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |  3 ++
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    | 31 +++++++++++++++++++
 7 files changed, 76 insertions(+)
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
boot/ti-k3-image-gen/ti-k3-image-gen.mk +10 -0
index b624f93771..57202d6918 100644
@@ -70,6 +70,16 @@ TI_K3_IMAGE_GEN_MAKE_OPTS = \
 	O=$(@D)/tmp \
 	BIN_DIR=$(@D)
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_IMAGE_GEN_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_IMAGE_GEN_BUILD_CMDS
 	$(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
 endef
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +10 -0
index 341888623e..8311e1b401 100644
@@ -67,6 +67,16 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
 	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
 	HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_R5_LOADER_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
boot/uboot/uboot.mk +10 -0
index 48af69bd26..472fec8619 100644
@@ -184,6 +184,16 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 # Currently supports the FW from Git tag 08.06.00.006 by default
 TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
package/Config.in.host +1 -0
index dcadbfdfc1..eed39a4102 100644
@@ -103,6 +103,7 @@ menu "Host utilities"
 	source "package/systemd/Config.in.host"
 	source "package/tegrarcm/Config.in.host"
 	source "package/ti-cgt-pru/Config.in.host"
+	source "package/ti-core-secdev-k3/Config.in.host"
 	source "package/uboot-tools/Config.in.host"
 	source "package/util-linux/Config.in.host"
 	source "package/utp_com/Config.in.host"
package/ti-core-secdev-k3/Config.in.host new file +11 -0
new file mode 100644
index 0000000000..364619d824
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3
+	bool "host ti-core-secdev-k3"
+	help
+	  ti-core-secdev-k3 is used to provide binary image signing
+	  tools and keys to the build process needed to build boot
+	  artifacts for the secure boot flow on TI K3 platform
+	  "High Security" SoCs (device variants "HS-FS" and "HS-SE").
+	  This package is not needed building for "General Purpose"
+	  ("GP") SoC variants.
+
+	  https://git.ti.com/cgit/security-development-tools/core-secdev-k3
package/ti-core-secdev-k3/ti-core-secdev-k3.hash new file +3 -0
new file mode 100644
index 0000000000..526ed29514
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  eb637ed54204b64e98ae07070e0f2ebd36eed228ecc108dae0e7be6e38edde74  core-secdev-k3-08.06.00.007.tar.gz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +31 -0
new file mode 100644
index 0000000000..c388af2865
@@ -0,0 +1,31 @@
+################################################################################
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007
+TI_CORE_SECDEV_K3_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_CORE_SECDEV_K3_LICENSE = TI TSPA License
+TI_CORE_SECDEV_K3_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+TI_CORE_SECDEV_K3_SOURCE = core-secdev-k3-$(TI_CORE_SECDEV_K3_VERSION).tar.gz
+
+# To allow the image signing process for various firmware artifacts to work the
+# build process for TI K3 platform HS-FS and HS-SE device variants is using the
+# 'core-secdev-k3' tool provided by TI. Its location must be made available to
+# the build process of dependent packages by exporting it through the use of an
+# environmental variable. In order to not pollute the global Buildroot
+# environment let's record the package's location and then define the actual
+# environmental variable needed for the build only in the packages that need it.
+TI_CORE_SECDEV_K3_INSTALL_DIR = $(HOST_DIR)/opt/ti-core-secdev-k3
+
+define HOST_TI_CORE_SECDEV_K3_INSTALL_CMDS
+	mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+	cp -dpfr $(@D)/keys/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+	mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+	cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+	mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+	cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+endef
+
+$(eval $(host-generic-package))
Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package

Quoted 145 lines · Andreas Dannenberg via buildroot

The ti-core-secdev-k3 package is used to provide binary image signing tools and keys to the build process needed to build boot artifacts for the secure boot flow on TI K3 platform "High Security" SoCs (device variants "HS-FS" and "HS-SE"). This package is not needed building for "General Purpose" ("GP") SoC variants.

This commit also updates the ti-k3-image-gen, ti-k3-r5-loader, and uboot packages which are all used as part of the boot flow of TI K3 platform devices to make use of the ti-core-secdev-k3 package if enabled.

Note that although the use of the underlying 'core-secdev-k3' tool provided by TI is required to generate bootable images for HS-FS and HS-SE device variants, the use of this Buildroot package itself should remain optional, hence no hard dependencies are being established. The reason is that a user often wants to provide their own signing tool through the use of the TI_SECURE_DEV_PKG environmental variable set outside Buildroot on their specific build machine, especially for HS-SE device variants where the signing tool would contain the user's private keys.

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

---
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 10 ++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 10 ++++++
 boot/uboot/uboot.mk                           | 10 ++++++
 package/Config.in.host                        |  1 +
 package/ti-core-secdev-k3/Config.in.host      | 11 +++++++
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |  3 ++
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    | 31 +++++++++++++++++++
 7 files changed, 76 insertions(+)
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
boot/ti-k3-image-gen/ti-k3-image-gen.mk +10 -0
index b624f93771..57202d6918 100644
@@ -70,6 +70,16 @@ TI_K3_IMAGE_GEN_MAKE_OPTS = \
        O=$(@D)/tmp \
        BIN_DIR=$(@D)
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_IMAGE_GEN_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_IMAGE_GEN_BUILD_CMDS
        $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
 endef
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +10 -0
index 341888623e..8311e1b401 100644
@@ -67,6 +67,16 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
        HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
        HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_R5_LOADER_BUILD_CMDS
        $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
boot/uboot/uboot.mk +10 -0
index 48af69bd26..472fec8619 100644
@@ -184,6 +184,16 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 # Currently supports the FW from Git tag 08.06.00.006 by default
 TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
package/Config.in.host +1 -0
index dcadbfdfc1..eed39a4102 100644
@@ -103,6 +103,7 @@ menu "Host utilities"
        source "package/systemd/Config.in.host"
        source "package/tegrarcm/Config.in.host"
        source "package/ti-cgt-pru/Config.in.host"
+       source "package/ti-core-secdev-k3/Config.in.host"
        source "package/uboot-tools/Config.in.host"
        source "package/util-linux/Config.in.host"
        source "package/utp_com/Config.in.host"
package/ti-core-secdev-k3/Config.in.host new file +11 -0
new file mode 100644
index 0000000000..364619d824
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3
+       bool "host ti-core-secdev-k3"
+       help
+         ti-core-secdev-k3 is used to provide binary image signing
+         tools and keys to the build process needed to build boot
+         artifacts for the secure boot flow on TI K3 platform
+         "High Security" SoCs (device variants "HS-FS" and "HS-SE").
+         This package is not needed building for "General Purpose"
+         ("GP") SoC variants.
+
+         https://git.ti.com/cgit/security-development-tools/core-secdev-k3
package/ti-core-secdev-k3/ti-core-secdev-k3.hash new file +3 -0
new file mode 100644
index 0000000000..526ed29514
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  eb637ed54204b64e98ae07070e0f2ebd36eed228ecc108dae0e7be6e38edde74  core-secdev-k3-08.06.00.007.tar.gz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +1 -0
new file mode 100644
index 0000000000..c388af2865
@@ -0,0 +1,31 @@
+################################################################################

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 11

Quoted 10 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +10 -0
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007
+TI_CORE_SECDEV_K3_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_CORE_SECDEV_K3_LICENSE = TI TSPA License
+TI_CORE_SECDEV_K3_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+TI_CORE_SECDEV_K3_SOURCE = core-secdev-k3-$(TI_CORE_SECDEV_K3_VERSION).tar.gz

Hi Andreas,

Would it make sense to support user customisation of this via Kconfig instead of using the magic TI_SECURE_DEV_PKG environment variable?

I'm slightly confused about how this is intended to work. core-secdev-k3 contains both infrastructure (scripts) and data (keys) to secure the image. It looks like someone tried to split these concerns by supporting customisation of the key location. secure-binary-image.sh expects TI_SECURE_DEV_PKG to point to something containing keys/custMpk.pem, but the rest of the process expects TI_SECURE_DEV_PKG to point to something containing scripts to secure the binary blobs.

It would make more sense to me to support overriding just the key, rather than having to duplicate all the scripts too.

Could we support configuring the location of the custMpk.pem key and have the build process replace the default key in build/host-ti-core-secdev-k3-08.06.00.007/keys?

Is there a reason why a customer is expected to replace (or, more likely, duplicate) the scripts rather than just supply a key?

Patrick

Quoted 22 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +19 -1
+# To allow the image signing process for various firmware artifacts to work the
+# build process for TI K3 platform HS-FS and HS-SE device variants is using the
+# 'core-secdev-k3' tool provided by TI. Its location must be made available to
+# the build process of dependent packages by exporting it through the use of an
+# environmental variable. In order to not pollute the global Buildroot
+# environment let's record the package's location and then define the actual
+# environmental variable needed for the build only in the packages that need it.
+TI_CORE_SECDEV_K3_INSTALL_DIR = $(HOST_DIR)/opt/ti-core-secdev-k3
+
+define HOST_TI_CORE_SECDEV_K3_INSTALL_CMDS
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       cp -dpfr $(@D)/keys/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+endef
+
+$(eval $(host-generic-package))
--

2.34.1

Quoted 4 lines

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

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

#30 lore raw

Re: [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package

Hi Patrick,
thanks for the feedback. Comments inlined...

Quoted 172 lines · Patrick Oppenlander
Quoted 145 lines · Andreas Dannenberg via buildroot

The ti-core-secdev-k3 package is used to provide binary image signing tools and keys to the build process needed to build boot artifacts for the secure boot flow on TI K3 platform "High Security" SoCs (device variants "HS-FS" and "HS-SE"). This package is not needed building for "General Purpose" ("GP") SoC variants.

This commit also updates the ti-k3-image-gen, ti-k3-r5-loader, and uboot packages which are all used as part of the boot flow of TI K3 platform devices to make use of the ti-core-secdev-k3 package if enabled.

Note that although the use of the underlying 'core-secdev-k3' tool provided by TI is required to generate bootable images for HS-FS and HS-SE device variants, the use of this Buildroot package itself should remain optional, hence no hard dependencies are being established. The reason is that a user often wants to provide their own signing tool through the use of the TI_SECURE_DEV_PKG environmental variable set outside Buildroot on their specific build machine, especially for HS-SE device variants where the signing tool would contain the user's private keys.

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

---
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 10 ++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 10 ++++++
 boot/uboot/uboot.mk                           | 10 ++++++
 package/Config.in.host                        |  1 +
 package/ti-core-secdev-k3/Config.in.host      | 11 +++++++
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |  3 ++
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    | 31 +++++++++++++++++++
 7 files changed, 76 insertions(+)
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
boot/ti-k3-image-gen/ti-k3-image-gen.mk +10 -0
index b624f93771..57202d6918 100644
@@ -70,6 +70,16 @@ TI_K3_IMAGE_GEN_MAKE_OPTS = \
        O=$(@D)/tmp \
        BIN_DIR=$(@D)
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_IMAGE_GEN_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_IMAGE_GEN_BUILD_CMDS
        $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
 endef
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +10 -0
index 341888623e..8311e1b401 100644
@@ -67,6 +67,16 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
        HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
        HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_R5_LOADER_BUILD_CMDS
        $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
boot/uboot/uboot.mk +10 -0
index 48af69bd26..472fec8619 100644
@@ -184,6 +184,16 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 # Currently supports the FW from Git tag 08.06.00.006 by default
 TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
package/Config.in.host +1 -0
index dcadbfdfc1..eed39a4102 100644
@@ -103,6 +103,7 @@ menu "Host utilities"
        source "package/systemd/Config.in.host"
        source "package/tegrarcm/Config.in.host"
        source "package/ti-cgt-pru/Config.in.host"
+       source "package/ti-core-secdev-k3/Config.in.host"
        source "package/uboot-tools/Config.in.host"
        source "package/util-linux/Config.in.host"
        source "package/utp_com/Config.in.host"
package/ti-core-secdev-k3/Config.in.host new file +11 -0
new file mode 100644
index 0000000000..364619d824
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3
+       bool "host ti-core-secdev-k3"
+       help
+         ti-core-secdev-k3 is used to provide binary image signing
+         tools and keys to the build process needed to build boot
+         artifacts for the secure boot flow on TI K3 platform
+         "High Security" SoCs (device variants "HS-FS" and "HS-SE").
+         This package is not needed building for "General Purpose"
+         ("GP") SoC variants.
+
+         https://git.ti.com/cgit/security-development-tools/core-secdev-k3
package/ti-core-secdev-k3/ti-core-secdev-k3.hash new file +3 -0
new file mode 100644
index 0000000000..526ed29514
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  eb637ed54204b64e98ae07070e0f2ebd36eed228ecc108dae0e7be6e38edde74  core-secdev-k3-08.06.00.007.tar.gz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +1 -0
new file mode 100644
index 0000000000..c388af2865
@@ -0,0 +1,31 @@
+################################################################################

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 11

Quoted 10 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +10 -0
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007
+TI_CORE_SECDEV_K3_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_CORE_SECDEV_K3_LICENSE = TI TSPA License
+TI_CORE_SECDEV_K3_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+TI_CORE_SECDEV_K3_SOURCE = core-secdev-k3-$(TI_CORE_SECDEV_K3_VERSION).tar.gz

Hi Andreas,

Would it make sense to support user customisation of this via Kconfig instead of using the magic TI_SECURE_DEV_PKG environment variable?

I'm slightly confused about how this is intended to work. core-secdev-k3 contains both infrastructure (scripts) and data (keys) to secure the image. It looks like someone tried to split these concerns by supporting customisation of the key location. secure-binary-image.sh expects TI_SECURE_DEV_PKG to point to something containing keys/custMpk.pem, but the rest of the process expects TI_SECURE_DEV_PKG to point to something containing scripts to secure the binary blobs.

Quoted 6 lines

It would make more sense to me to support overriding just the key, rather than having to duplicate all the scripts too.

Could we support configuring the location of the custMpk.pem key and have the build process replace the default key in build/host-ti-core-secdev-k3-08.06.00.007/keys?

Well, this is how the "TI secure dev package" has been for the last 10+ years, and that's how it's being used by 100% of our customers today doing Linux image builds. It's hard-wired into Yocto builds, even the official U-Boot tree...

https://source.denx.de/u-boot/u-boot/-/blob/master/doc/README.ti-secure

I agree improvements could be made for example to point to just a private key via Kconfig but this would also create an inconsistency with all solutions currently in production, and with what folks are used to, and go against enabling an easier and more seamless "switch" from Yocto for example, which is what I'd like people to do.

This doesn't say it should not or never be improved, but I think such changes could be managed more smoothly by establishing a known baseline first (which is what this entire series intends to do, based on a comparable variant of the official TI production SDK), and then over time improve things, also as Yocto, U-Boot, and other projects evolve (there's constant development on those including on the security front, so what we have here will not be the "forever solution).

Quoted 2 lines

Is there a reason why a customer is expected to replace (or, more likely, duplicate) the scripts rather than just supply a key?

The key is the most obvious thing, but often customers also want to customize the certificate to add additional items for example to control certain device features such as whether JTAG should be locked or unlocked, etc., all things not readily controllable through some knobs but needing to be done through customization of sripts / templates.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 25 lines

Patrick

Quoted 22 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +19 -1
+# To allow the image signing process for various firmware artifacts to work the
+# build process for TI K3 platform HS-FS and HS-SE device variants is using the
+# 'core-secdev-k3' tool provided by TI. Its location must be made available to
+# the build process of dependent packages by exporting it through the use of an
+# environmental variable. In order to not pollute the global Buildroot
+# environment let's record the package's location and then define the actual
+# environmental variable needed for the build only in the packages that need it.
+TI_CORE_SECDEV_K3_INSTALL_DIR = $(HOST_DIR)/opt/ti-core-secdev-k3
+
+define HOST_TI_CORE_SECDEV_K3_INSTALL_CMDS
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       cp -dpfr $(@D)/keys/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+endef
+
+$(eval $(host-generic-package))
--

2.34.1

Quoted 4 lines
Quoted 4 lines

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

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

#31 lore raw

Re: [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package

Quoted 184 lines · Andreas Dannenberg

Hi Patrick,
thanks for the feedback. Comments inlined...

Quoted 172 lines · Patrick Oppenlander
Quoted 145 lines · Andreas Dannenberg via buildroot

The ti-core-secdev-k3 package is used to provide binary image signing tools and keys to the build process needed to build boot artifacts for the secure boot flow on TI K3 platform "High Security" SoCs (device variants "HS-FS" and "HS-SE"). This package is not needed building for "General Purpose" ("GP") SoC variants.

This commit also updates the ti-k3-image-gen, ti-k3-r5-loader, and uboot packages which are all used as part of the boot flow of TI K3 platform devices to make use of the ti-core-secdev-k3 package if enabled.

Note that although the use of the underlying 'core-secdev-k3' tool provided by TI is required to generate bootable images for HS-FS and HS-SE device variants, the use of this Buildroot package itself should remain optional, hence no hard dependencies are being established. The reason is that a user often wants to provide their own signing tool through the use of the TI_SECURE_DEV_PKG environmental variable set outside Buildroot on their specific build machine, especially for HS-SE device variants where the signing tool would contain the user's private keys.

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

---
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 10 ++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 10 ++++++
 boot/uboot/uboot.mk                           | 10 ++++++
 package/Config.in.host                        |  1 +
 package/ti-core-secdev-k3/Config.in.host      | 11 +++++++
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |  3 ++
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    | 31 +++++++++++++++++++
 7 files changed, 76 insertions(+)
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
boot/ti-k3-image-gen/ti-k3-image-gen.mk +10 -0
index b624f93771..57202d6918 100644
@@ -70,6 +70,16 @@ TI_K3_IMAGE_GEN_MAKE_OPTS = \
        O=$(@D)/tmp \
        BIN_DIR=$(@D)
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_IMAGE_GEN_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_IMAGE_GEN_BUILD_CMDS
        $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
 endef
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +10 -0
index 341888623e..8311e1b401 100644
@@ -67,6 +67,16 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
        HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
        HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_R5_LOADER_BUILD_CMDS
        $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
boot/uboot/uboot.mk +10 -0
index 48af69bd26..472fec8619 100644
@@ -184,6 +184,16 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 # Currently supports the FW from Git tag 08.06.00.006 by default
 TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
package/Config.in.host +1 -0
index dcadbfdfc1..eed39a4102 100644
@@ -103,6 +103,7 @@ menu "Host utilities"
        source "package/systemd/Config.in.host"
        source "package/tegrarcm/Config.in.host"
        source "package/ti-cgt-pru/Config.in.host"
+       source "package/ti-core-secdev-k3/Config.in.host"
        source "package/uboot-tools/Config.in.host"
        source "package/util-linux/Config.in.host"
        source "package/utp_com/Config.in.host"
package/ti-core-secdev-k3/Config.in.host new file +11 -0
new file mode 100644
index 0000000000..364619d824
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3
+       bool "host ti-core-secdev-k3"
+       help
+         ti-core-secdev-k3 is used to provide binary image signing
+         tools and keys to the build process needed to build boot
+         artifacts for the secure boot flow on TI K3 platform
+         "High Security" SoCs (device variants "HS-FS" and "HS-SE").
+         This package is not needed building for "General Purpose"
+         ("GP") SoC variants.
+
+         https://git.ti.com/cgit/security-development-tools/core-secdev-k3
package/ti-core-secdev-k3/ti-core-secdev-k3.hash new file +3 -0
new file mode 100644
index 0000000000..526ed29514
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  eb637ed54204b64e98ae07070e0f2ebd36eed228ecc108dae0e7be6e38edde74  core-secdev-k3-08.06.00.007.tar.gz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +1 -0
new file mode 100644
index 0000000000..c388af2865
@@ -0,0 +1,31 @@
+################################################################################

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 11

Quoted 10 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +10 -0
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007
+TI_CORE_SECDEV_K3_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_CORE_SECDEV_K3_LICENSE = TI TSPA License
+TI_CORE_SECDEV_K3_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+TI_CORE_SECDEV_K3_SOURCE = core-secdev-k3-$(TI_CORE_SECDEV_K3_VERSION).tar.gz

Hi Andreas,

Would it make sense to support user customisation of this via Kconfig instead of using the magic TI_SECURE_DEV_PKG environment variable?

I'm slightly confused about how this is intended to work. core-secdev-k3 contains both infrastructure (scripts) and data (keys) to secure the image. It looks like someone tried to split these concerns by supporting customisation of the key location. secure-binary-image.sh expects TI_SECURE_DEV_PKG to point to something containing keys/custMpk.pem, but the rest of the process expects TI_SECURE_DEV_PKG to point to something containing scripts to secure the binary blobs.

Quoted 6 lines

It would make more sense to me to support overriding just the key, rather than having to duplicate all the scripts too.

Could we support configuring the location of the custMpk.pem key and have the build process replace the default key in build/host-ti-core-secdev-k3-08.06.00.007/keys?

Quoted 6 lines

Well, this is how the "TI secure dev package" has been for the last 10+ years, and that's how it's being used by 100% of our customers today doing Linux image builds. It's hard-wired into Yocto builds, even the official U-Boot tree...

https://source.denx.de/u-boot/u-boot/-/blob/master/doc/README.ti-secure

Thanks for the reference!

Quoted 5 lines

I agree improvements could be made for example to point to just a private key via Kconfig but this would also create an inconsistency with all solutions currently in production, and with what folks are used to, and go against enabling an easier and more seamless "switch" from Yocto for example, which is what I'd like people to do.

If you look in the section in README.ti-secure about K3 secure devices it supports setting the key with the Kconfig option "K3_KEY", so it looks like we can support key customisation using the u-boot config and don't need to support this in the buildroot config.

Patrick

Quoted 48 lines

This doesn't say it should not or never be improved, but I think such changes could be managed more smoothly by establishing a known baseline first (which is what this entire series intends to do, based on a comparable variant of the official TI production SDK), and then over time improve things, also as Yocto, U-Boot, and other projects evolve (there's constant development on those including on the security front, so what we have here will not be the "forever solution).

Quoted 2 lines

Is there a reason why a customer is expected to replace (or, more likely, duplicate) the scripts rather than just supply a key?

The key is the most obvious thing, but often customers also want to customize the certificate to add additional items for example to control certain device features such as whether JTAG should be locked or unlocked, etc., all things not readily controllable through some knobs but needing to be done through customization of sripts / templates.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 25 lines

Patrick

Quoted 22 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +19 -1
+# To allow the image signing process for various firmware artifacts to work the
+# build process for TI K3 platform HS-FS and HS-SE device variants is using the
+# 'core-secdev-k3' tool provided by TI. Its location must be made available to
+# the build process of dependent packages by exporting it through the use of an
+# environmental variable. In order to not pollute the global Buildroot
+# environment let's record the package's location and then define the actual
+# environmental variable needed for the build only in the packages that need it.
+TI_CORE_SECDEV_K3_INSTALL_DIR = $(HOST_DIR)/opt/ti-core-secdev-k3
+
+define HOST_TI_CORE_SECDEV_K3_INSTALL_CMDS
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       cp -dpfr $(@D)/keys/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+endef
+
+$(eval $(host-generic-package))
--

2.34.1

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

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

#32 lore raw

Re: [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package

Hi Patrick,

Quoted 200 lines · Patrick Oppenlander
Quoted 184 lines · Andreas Dannenberg

Hi Patrick,
thanks for the feedback. Comments inlined...

Quoted 172 lines · Patrick Oppenlander
Quoted 145 lines · Andreas Dannenberg via buildroot

The ti-core-secdev-k3 package is used to provide binary image signing tools and keys to the build process needed to build boot artifacts for the secure boot flow on TI K3 platform "High Security" SoCs (device variants "HS-FS" and "HS-SE"). This package is not needed building for "General Purpose" ("GP") SoC variants.

This commit also updates the ti-k3-image-gen, ti-k3-r5-loader, and uboot packages which are all used as part of the boot flow of TI K3 platform devices to make use of the ti-core-secdev-k3 package if enabled.

Note that although the use of the underlying 'core-secdev-k3' tool provided by TI is required to generate bootable images for HS-FS and HS-SE device variants, the use of this Buildroot package itself should remain optional, hence no hard dependencies are being established. The reason is that a user often wants to provide their own signing tool through the use of the TI_SECURE_DEV_PKG environmental variable set outside Buildroot on their specific build machine, especially for HS-SE device variants where the signing tool would contain the user's private keys.

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

---
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 10 ++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 10 ++++++
 boot/uboot/uboot.mk                           | 10 ++++++
 package/Config.in.host                        |  1 +
 package/ti-core-secdev-k3/Config.in.host      | 11 +++++++
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |  3 ++
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    | 31 +++++++++++++++++++
 7 files changed, 76 insertions(+)
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
boot/ti-k3-image-gen/ti-k3-image-gen.mk +10 -0
index b624f93771..57202d6918 100644
@@ -70,6 +70,16 @@ TI_K3_IMAGE_GEN_MAKE_OPTS = \
        O=$(@D)/tmp \
        BIN_DIR=$(@D)
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_IMAGE_GEN_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_IMAGE_GEN_BUILD_CMDS
        $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
 endef
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +10 -0
index 341888623e..8311e1b401 100644
@@ -67,6 +67,16 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
        HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
        HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_R5_LOADER_BUILD_CMDS
        $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
boot/uboot/uboot.mk +10 -0
index 48af69bd26..472fec8619 100644
@@ -184,6 +184,16 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 # Currently supports the FW from Git tag 08.06.00.006 by default
 TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
package/Config.in.host +1 -0
index dcadbfdfc1..eed39a4102 100644
@@ -103,6 +103,7 @@ menu "Host utilities"
        source "package/systemd/Config.in.host"
        source "package/tegrarcm/Config.in.host"
        source "package/ti-cgt-pru/Config.in.host"
+       source "package/ti-core-secdev-k3/Config.in.host"
        source "package/uboot-tools/Config.in.host"
        source "package/util-linux/Config.in.host"
        source "package/utp_com/Config.in.host"
package/ti-core-secdev-k3/Config.in.host new file +11 -0
new file mode 100644
index 0000000000..364619d824
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3
+       bool "host ti-core-secdev-k3"
+       help
+         ti-core-secdev-k3 is used to provide binary image signing
+         tools and keys to the build process needed to build boot
+         artifacts for the secure boot flow on TI K3 platform
+         "High Security" SoCs (device variants "HS-FS" and "HS-SE").
+         This package is not needed building for "General Purpose"
+         ("GP") SoC variants.
+
+         https://git.ti.com/cgit/security-development-tools/core-secdev-k3
package/ti-core-secdev-k3/ti-core-secdev-k3.hash new file +3 -0
new file mode 100644
index 0000000000..526ed29514
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  eb637ed54204b64e98ae07070e0f2ebd36eed228ecc108dae0e7be6e38edde74  core-secdev-k3-08.06.00.007.tar.gz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +1 -0
new file mode 100644
index 0000000000..c388af2865
@@ -0,0 +1,31 @@
+################################################################################

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 11

Quoted 10 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +10 -0
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007
+TI_CORE_SECDEV_K3_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_CORE_SECDEV_K3_LICENSE = TI TSPA License
+TI_CORE_SECDEV_K3_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+TI_CORE_SECDEV_K3_SOURCE = core-secdev-k3-$(TI_CORE_SECDEV_K3_VERSION).tar.gz

Hi Andreas,

Would it make sense to support user customisation of this via Kconfig instead of using the magic TI_SECURE_DEV_PKG environment variable?

I'm slightly confused about how this is intended to work. core-secdev-k3 contains both infrastructure (scripts) and data (keys) to secure the image. It looks like someone tried to split these concerns by supporting customisation of the key location. secure-binary-image.sh expects TI_SECURE_DEV_PKG to point to something containing keys/custMpk.pem, but the rest of the process expects TI_SECURE_DEV_PKG to point to something containing scripts to secure the binary blobs.

Quoted 6 lines

It would make more sense to me to support overriding just the key, rather than having to duplicate all the scripts too.

Could we support configuring the location of the custMpk.pem key and have the build process replace the default key in build/host-ti-core-secdev-k3-08.06.00.007/keys?

Quoted 6 lines

Well, this is how the "TI secure dev package" has been for the last 10+ years, and that's how it's being used by 100% of our customers today doing Linux image builds. It's hard-wired into Yocto builds, even the official U-Boot tree...

https://source.denx.de/u-boot/u-boot/-/blob/master/doc/README.ti-secure

Thanks for the reference!

Quoted 5 lines

I agree improvements could be made for example to point to just a private key via Kconfig but this would also create an inconsistency with all solutions currently in production, and with what folks are used to, and go against enabling an easier and more seamless "switch" from Yocto for example, which is what I'd like people to do.

Quoted 4 lines

If you look in the section in README.ti-secure about K3 secure devices it supports setting the key with the Kconfig option "K3_KEY", so it looks like we can support key customisation using the u-boot config and don't need to support this in the buildroot config.

Yes this option is available, but this in by itself won't be a complete solution to customize the key. For example the key is also used as part of ti-k3-image-gen, which is a wrapper around U-Boot SPL on R5 (which is provided through ti-k3-r5-loader). So if you customize it in U-Boot Kconfig you still need to somehow feed that same key into ti-k3-image-gen. Furthermore, the key _should_ also be used to sign Kernel / DTBs / Kernel FIT image (this part of the authenticated boot chain is not implemented with this patch series, but will be added in a future step).

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 50 lines

Patrick

Quoted 48 lines

This doesn't say it should not or never be improved, but I think such changes could be managed more smoothly by establishing a known baseline first (which is what this entire series intends to do, based on a comparable variant of the official TI production SDK), and then over time improve things, also as Yocto, U-Boot, and other projects evolve (there's constant development on those including on the security front, so what we have here will not be the "forever solution).

Quoted 2 lines

Is there a reason why a customer is expected to replace (or, more likely, duplicate) the scripts rather than just supply a key?

The key is the most obvious thing, but often customers also want to customize the certificate to add additional items for example to control certain device features such as whether JTAG should be locked or unlocked, etc., all things not readily controllable through some knobs but needing to be done through customization of sripts / templates.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 25 lines

Patrick

Quoted 22 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +19 -1
+# To allow the image signing process for various firmware artifacts to work the
+# build process for TI K3 platform HS-FS and HS-SE device variants is using the
+# 'core-secdev-k3' tool provided by TI. Its location must be made available to
+# the build process of dependent packages by exporting it through the use of an
+# environmental variable. In order to not pollute the global Buildroot
+# environment let's record the package's location and then define the actual
+# environmental variable needed for the build only in the packages that need it.
+TI_CORE_SECDEV_K3_INSTALL_DIR = $(HOST_DIR)/opt/ti-core-secdev-k3
+
+define HOST_TI_CORE_SECDEV_K3_INSTALL_CMDS
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       cp -dpfr $(@D)/keys/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+endef
+
+$(eval $(host-generic-package))
--

2.34.1

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

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

#33 lore raw

Re: [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package

Quoted 209 lines · Andreas Dannenberg

Hi Patrick,

Quoted 200 lines · Patrick Oppenlander
Quoted 184 lines · Andreas Dannenberg

Hi Patrick,
thanks for the feedback. Comments inlined...

Quoted 172 lines · Patrick Oppenlander
Quoted 145 lines · Andreas Dannenberg via buildroot

The ti-core-secdev-k3 package is used to provide binary image signing tools and keys to the build process needed to build boot artifacts for the secure boot flow on TI K3 platform "High Security" SoCs (device variants "HS-FS" and "HS-SE"). This package is not needed building for "General Purpose" ("GP") SoC variants.

This commit also updates the ti-k3-image-gen, ti-k3-r5-loader, and uboot packages which are all used as part of the boot flow of TI K3 platform devices to make use of the ti-core-secdev-k3 package if enabled.

Note that although the use of the underlying 'core-secdev-k3' tool provided by TI is required to generate bootable images for HS-FS and HS-SE device variants, the use of this Buildroot package itself should remain optional, hence no hard dependencies are being established. The reason is that a user often wants to provide their own signing tool through the use of the TI_SECURE_DEV_PKG environmental variable set outside Buildroot on their specific build machine, especially for HS-SE device variants where the signing tool would contain the user's private keys.

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

---
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 10 ++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 10 ++++++
 boot/uboot/uboot.mk                           | 10 ++++++
 package/Config.in.host                        |  1 +
 package/ti-core-secdev-k3/Config.in.host      | 11 +++++++
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |  3 ++
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    | 31 +++++++++++++++++++
 7 files changed, 76 insertions(+)
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
boot/ti-k3-image-gen/ti-k3-image-gen.mk +10 -0
index b624f93771..57202d6918 100644
@@ -70,6 +70,16 @@ TI_K3_IMAGE_GEN_MAKE_OPTS = \
        O=$(@D)/tmp \
        BIN_DIR=$(@D)
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_IMAGE_GEN_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_IMAGE_GEN_BUILD_CMDS
        $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
 endef
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk +10 -0
index 341888623e..8311e1b401 100644
@@ -67,6 +67,16 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
        HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
        HOSTLDFLAGS="$(HOST_LDFLAGS)"
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+TI_K3_R5_LOADER_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 define TI_K3_R5_LOADER_BUILD_CMDS
        $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
 endef
boot/uboot/uboot.mk +10 -0
index 48af69bd26..472fec8619 100644
@@ -184,6 +184,16 @@ UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif
 
+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y)
 # Currently supports the FW from Git tag 08.06.00.006 by default
 TI_K3_DM_VERSION = 340194800a581baf976360386dfc7b5acab8d948
package/Config.in.host +1 -0
index dcadbfdfc1..eed39a4102 100644
@@ -103,6 +103,7 @@ menu "Host utilities"
        source "package/systemd/Config.in.host"
        source "package/tegrarcm/Config.in.host"
        source "package/ti-cgt-pru/Config.in.host"
+       source "package/ti-core-secdev-k3/Config.in.host"
        source "package/uboot-tools/Config.in.host"
        source "package/util-linux/Config.in.host"
        source "package/utp_com/Config.in.host"
package/ti-core-secdev-k3/Config.in.host new file +11 -0
new file mode 100644
index 0000000000..364619d824
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3
+       bool "host ti-core-secdev-k3"
+       help
+         ti-core-secdev-k3 is used to provide binary image signing
+         tools and keys to the build process needed to build boot
+         artifacts for the secure boot flow on TI K3 platform
+         "High Security" SoCs (device variants "HS-FS" and "HS-SE").
+         This package is not needed building for "General Purpose"
+         ("GP") SoC variants.
+
+         https://git.ti.com/cgit/security-development-tools/core-secdev-k3
package/ti-core-secdev-k3/ti-core-secdev-k3.hash new file +3 -0
new file mode 100644
index 0000000000..526ed29514
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  eb637ed54204b64e98ae07070e0f2ebd36eed228ecc108dae0e7be6e38edde74  core-secdev-k3-08.06.00.007.tar.gz
+sha256  3e5cf4f5ab9f0333f46cd68fabede3f21e55de1a9e3c6ad673f241f4514d8369  manifest/k3-secdev-0.2-manifest.html
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +1 -0
new file mode 100644
index 0000000000..c388af2865
@@ -0,0 +1,31 @@
+################################################################################

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 11

Quoted 10 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +10 -0
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007
+TI_CORE_SECDEV_K3_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_CORE_SECDEV_K3_LICENSE = TI TSPA License
+TI_CORE_SECDEV_K3_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+TI_CORE_SECDEV_K3_SOURCE = core-secdev-k3-$(TI_CORE_SECDEV_K3_VERSION).tar.gz

Hi Andreas,

Would it make sense to support user customisation of this via Kconfig instead of using the magic TI_SECURE_DEV_PKG environment variable?

I'm slightly confused about how this is intended to work. core-secdev-k3 contains both infrastructure (scripts) and data (keys) to secure the image. It looks like someone tried to split these concerns by supporting customisation of the key location. secure-binary-image.sh expects TI_SECURE_DEV_PKG to point to something containing keys/custMpk.pem, but the rest of the process expects TI_SECURE_DEV_PKG to point to something containing scripts to secure the binary blobs.

Quoted 6 lines

It would make more sense to me to support overriding just the key, rather than having to duplicate all the scripts too.

Could we support configuring the location of the custMpk.pem key and have the build process replace the default key in build/host-ti-core-secdev-k3-08.06.00.007/keys?

Quoted 6 lines

Well, this is how the "TI secure dev package" has been for the last 10+ years, and that's how it's being used by 100% of our customers today doing Linux image builds. It's hard-wired into Yocto builds, even the official U-Boot tree...

https://source.denx.de/u-boot/u-boot/-/blob/master/doc/README.ti-secure

Thanks for the reference!

Quoted 5 lines

I agree improvements could be made for example to point to just a private key via Kconfig but this would also create an inconsistency with all solutions currently in production, and with what folks are used to, and go against enabling an easier and more seamless "switch" from Yocto for example, which is what I'd like people to do.

Quoted 4 lines

If you look in the section in README.ti-secure about K3 secure devices it supports setting the key with the Kconfig option "K3_KEY", so it looks like we can support key customisation using the u-boot config and don't need to support this in the buildroot config.

Quoted 5 lines

Yes this option is available, but this in by itself won't be a complete solution to customize the key. For example the key is also used as part of ti-k3-image-gen, which is a wrapper around U-Boot SPL on R5 (which is provided through ti-k3-r5-loader). So if you customize it in U-Boot Kconfig you still need to somehow feed that same key into ti-k3-image-gen.

Thanks for pointing that out.

Quoted 3 lines

Furthermore, the key _should_ also be used to sign Kernel / DTBs / Kernel FIT image (this part of the authenticated boot chain is not implemented with this patch series, but will be added in a future step).

Are you referring to U-Boot's verified boot support via signed FIT image or some TI K3 specific mecahnism?

Whether you use the same key to sign the boot binaries and the kernel FIT image is a policy decision. IMHO it makes sense to limit the scope of the root key as much as possible and embed public keys into U-Boot's control DTB which are then used to verify a kernel+DTB+initramfs FIT image.

Patrick

Quoted 54 lines

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 50 lines

Patrick

Quoted 48 lines

This doesn't say it should not or never be improved, but I think such changes could be managed more smoothly by establishing a known baseline first (which is what this entire series intends to do, based on a comparable variant of the official TI production SDK), and then over time improve things, also as Yocto, U-Boot, and other projects evolve (there's constant development on those including on the security front, so what we have here will not be the "forever solution).

Quoted 2 lines

Is there a reason why a customer is expected to replace (or, more likely, duplicate) the scripts rather than just supply a key?

The key is the most obvious thing, but often customers also want to customize the certificate to add additional items for example to control certain device features such as whether JTAG should be locked or unlocked, etc., all things not readily controllable through some knobs but needing to be done through customization of sripts / templates.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 25 lines

Patrick

Quoted 22 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +19 -1
+# To allow the image signing process for various firmware artifacts to work the
+# build process for TI K3 platform HS-FS and HS-SE device variants is using the
+# 'core-secdev-k3' tool provided by TI. Its location must be made available to
+# the build process of dependent packages by exporting it through the use of an
+# environmental variable. In order to not pollute the global Buildroot
+# environment let's record the package's location and then define the actual
+# environmental variable needed for the build only in the packages that need it.
+TI_CORE_SECDEV_K3_INSTALL_DIR = $(HOST_DIR)/opt/ti-core-secdev-k3
+
+define HOST_TI_CORE_SECDEV_K3_INSTALL_CMDS
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       cp -dpfr $(@D)/keys/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/keys
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/scripts
+       mkdir -p $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+       cp -dpfr $(@D)/scripts/* $(TI_CORE_SECDEV_K3_INSTALL_DIR)/templates
+endef
+
+$(eval $(host-generic-package))
--

2.34.1

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

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

#34 lore raw

Re: [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package

In reply to Andreas Dannenberg via buildroot

Andreas, Patrick, All,

On 2023-06-23 09:53 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 1 line · Patrick Oppenlander

[--SNIP--]

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +0 -0
new file mode 100644
index 0000000000..c388af2865
Quoted 8 lines
Quoted 8 lines

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 7

Quoted 8 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +7 -0
@@ -0,0 +1,31 @@
+################################################################################
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007

I see this version present (either used or referenced) in multiple packages. Would it be possible, and would it make sense to share a it in a single location?

This is going to be a bit tricky, because the variable must be set _before_ any package that uses it gets parsed. WE usually ensure this by having all packages in a common directory (like the Qt5 stuff in package/qt5/), but here we have packages in package/ and in boot/, so I can see a little issue...

Quoted 4 lines
Quoted 4 lines

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 11

Quoted 4 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +4 -0
+TI_CORE_SECDEV_K3_SITE = https://git.ti.com/cgit/security-development-tools/core-secdev-k3/snapshot
+TI_CORE_SECDEV_K3_LICENSE = TI TSPA License
+TI_CORE_SECDEV_K3_LICENSE_FILES = manifest/k3-secdev-0.2-manifest.html
+TI_CORE_SECDEV_K3_SOURCE = core-secdev-k3-$(TI_CORE_SECDEV_K3_VERSION).tar.gz

[--SNIP--]

Quoted 2 lines
Quoted 2 lines

Would it make sense to support user customisation of this via Kconfig instead of using the magic TI_SECURE_DEV_PKG environment variable?

[--SNIP--]

Quoted 22 lines
Quoted 3 lines

Could we support configuring the location of the custMpk.pem key and have the build process replace the default key in build/host-ti-core-secdev-k3-08.06.00.007/keys?

Well, this is how the "TI secure dev package" has been for the last 10+ years, and that's how it's being used by 100% of our customers today doing Linux image builds. It's hard-wired into Yocto builds, even the official U-Boot tree...
https://source.denx.de/u-boot/u-boot/-/blob/master/doc/README.ti-secure
I agree improvements could be made for example to point to just a private key via Kconfig but this would also create an inconsistency with all solutions currently in production, and with what folks are used to, and go against enabling an easier and more seamless "switch" from Yocto for example, which is what I'd like people to do.

This doesn't say it should not or never be improved, but I think such changes could be managed more smoothly by establishing a known baseline first (which is what this entire series intends to do, based on a comparable variant of the official TI production SDK), and then over time improve things, also as Yocto, U-Boot, and other projects evolve (there's constant development on those including on the security front, so what we have here will not be the "forever solution).

Quoted 7 lines
Quoted 2 lines

Is there a reason why a customer is expected to replace (or, more likely, duplicate) the scripts rather than just supply a key?

The key is the most obvious thing, but often customers also want to customize the certificate to add additional items for example to control certain device features such as whether JTAG should be locked or unlocked, etc., all things not readily controllable through some knobs but needing to be done through customization of sripts / templates.

I've read the whole exchange, and it was very instructive, thanks!

I'd side with Andreas here: let's get the basic support in, which does behave like people are currently used to.

If it then is possible to customise the security settings (key, certs, etc...), either following future upstream changes, or in a Buildroot-specific way, then we can improve later on.

Quoted 1 line

+TI_CORE_SECDEV_K3_INSTALL_DIR = $(HOST_DIR)/opt/ti-core-secdev-k3

This variable is set unconditionally, even if the package is not enabled. So, the conditional blocks you added in the other packages will always hit.

Here's one sich block below:

Quoted 1 line

+ifneq ($(TI_CORE_SECDEV_K3_INSTALL_DIR),)

As said above, this condition will always be true.

boot/uboot/uboot.mk UBOOT_DEPENDENCIES += optee-os · line 195

Quoted 8 lines
boot/uboot/uboot.mk +8 -0
+# Only set TI_SECURE_DEV_PKG make option if not already defined in the
+# environment, thus allowing the user to unconditionally override this
+# setting with a custom location on their build machine containing their
+# private keys, etc.
+ifeq ($(TI_SECURE_DEV_PKG),)
+UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
+endif
+endif

So, as I understand it, the user has two options:

- enable BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3=y and use it as a signing tool,

- disable BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3 and set TI_SECURE_DEV_PKG in their environment, to point to their signing tool

My suggestion would be the following:

- if the user enables BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3=y then we use that as a signing tool, and forcefully set TI_SECURE_DEV_PKG;

- otherwise, we do nothing: if they have TI_SECURE_DEV_PKG set in

    their environment, it will be used as a signing tool;

- otherwise, no signing will be done.

I.e. the code blocks would look like (e.g. for uboot):

    ifeq ($(BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3),y)
    UBOOT_MAKE_OPTS += TI_SECURE_DEV_PKG=$(TI_CORE_SECDEV_K3_INSTALL_DIR)
    endif

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#35 lore raw

Re: [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package

Quoted 23 lines · Yann E. MORIN

Andreas, Patrick, All,

On 2023-06-23 09:53 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 1 line · Patrick Oppenlander

[--SNIP--]

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +0 -0
new file mode 100644
index 0000000000..c388af2865
Quoted 8 lines
Quoted 8 lines

package/ti-core-secdev-k3/ti-core-secdev-k3.mk line 7

Quoted 8 lines
package/ti-core-secdev-k3/ti-core-secdev-k3.mk new file +7 -0
@@ -0,0 +1,31 @@
+################################################################################
+#
+# ti-core-secdev-k3
+#
+################################################################################
+
+TI_CORE_SECDEV_K3_VERSION = 08.06.00.007

I see this version present (either used or referenced) in multiple packages. Would it be possible, and would it make sense to share a it in a single location?

Quoted 5 lines

This is going to be a bit tricky, because the variable must be set _before_ any package that uses it gets parsed. WE usually ensure this by having all packages in a common directory (like the Qt5 stuff in package/qt5/), but here we have packages in package/ and in boot/, so I can see a little issue...

Well, package/ is parsed before boot/ is, so the order is implicitly
guaranteed. It's a bit meh to rely on that though.

Regards,
Arnout

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

#36 lore raw

PATCH v9 8/11 board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants

In reply to Andreas Dannenberg via buildroot

Current starter kits for AM62x (called SK-AM62B, see [1]) and AM64x (called SK-AM64B, see [2]) both contain High Security - Field Securable (HS-FS) device variants, and those are really the recommended production device variants and boards TI will provide moving forward. Hence, switch the defconfigs for those boards over to accommodate those now-shipping device variants and boards.

[1] https://www.ti.com/tool/SK-AM62B
[2] https://www.ti.com/tool/SK-AM64B

---
 configs/am62x_sk_defconfig | 2 +-
 configs/am64x_sk_defconfig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
configs/am62x_sk_defconfig +1 -1
index 0b196f4cce..17855bc743 100644
@@ -28,7 +28,6 @@ BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am62x"
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP=y
 BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL=y
@@ -52,3 +51,4 @@ BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3=y
configs/am64x_sk_defconfig +2 -2
index ccd58dad68..dbbe16eca5 100644
@@ -28,8 +28,7 @@ BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY=y
 BR2_TARGET_OPTEE_OS_PLATFORM="k3"
 BR2_TARGET_TI_K3_IMAGE_GEN=y
 BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE_TISCI=y
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"
-BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP=y
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x_sr2"
 BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
 BR2_TARGET_TI_K3_R5_LOADER=y
 BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL=y
@@ -51,3 +50,4 @@ BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3=y
Signature · 6 lines
2.34.1

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

PATCH v9 9/11 package/ti-rogue-km: new package

In reply to Andreas Dannenberg via buildroot

This package adds the kernel module for the Rogue graphics accelerator of the following Texas Instuments SoCs: AM62, J721E, J721S2, and J784S4.

---
 package/Config.in                    |  1 +
 package/ti-rogue-km/Config.in        | 28 +++++++++++++++++++++
 package/ti-rogue-km/ti-rogue-km.hash |  3 +++
 package/ti-rogue-km/ti-rogue-km.mk   | 37 ++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+)
 create mode 100644 package/ti-rogue-km/Config.in
 create mode 100644 package/ti-rogue-km/ti-rogue-km.hash
 create mode 100644 package/ti-rogue-km/ti-rogue-km.mk
package/Config.in +1 -0
index bff090a661..96ef0d72de 100644
@@ -613,6 +613,7 @@ endmenu
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
+	source "package/ti-rogue-km/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-rogue-km/Config.in new file +28 -0
new file mode 100644
index 0000000000..b1565929d5
@@ -0,0 +1,28 @@
+comment "ti-rogue-km needs a Linux kernel to be built"
+	depends on BR2_aarch64
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_TI_ROGUE_KM
+	bool "ti-rogue-km"
+	depends on BR2_LINUX_KERNEL && BR2_aarch64
+	select BR2_LINUX_NEEDS_MODULES
+	help
+	  Kernel modules for TI SoCs with Rogue GPU.
+	  This package supports AM62, J721E, J721S2, and J784S4
+	  SoCs only.
+
+	  Note: it needs a TI specific kernel to build properly.
+
+	  https://git.ti.com/cgit/graphics/ti-img-rogue-driver
+
+if BR2_PACKAGE_TI_ROGUE_KM
+
+config BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT
+	string "KM driver target product"
+	default "am62_linux"
+	help
+	  Select target product to be used for KM driver. This needs to
+	  match one of the SoC-specific folders within the build/linux
+	  folder of the ti-img-rogue-driver Git repository.
+
+endif
package/ti-rogue-km/ti-rogue-km.hash new file +3 -0
new file mode 100644
index 0000000000..4a08efbb98
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  ef50124b3e79fb1d28d3a2b4135032505abbb5c6b337b24a9bed7223d521dcc1  ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2-br1.tar.gz
+sha256  c878f4e43e468329d3dcf4db09054e94472bfeee9f8ab2d69a122b978e9f773e  README
package/ti-rogue-km/ti-rogue-km.mk new file +37 -0
new file mode 100644
index 0000000000..7b0a595c71
@@ -0,0 +1,37 @@
+################################################################################
+#
+# ti-rogue-km
+#
+################################################################################
+
+# This corresponds to SDK 08.06.00
+TI_ROGUE_KM_VERSION = 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2
+TI_ROGUE_KM_SITE = https://git.ti.com/git/graphics/ti-img-rogue-driver.git
+TI_ROGUE_KM_SITE_METHOD = git
+TI_ROGUE_KM_LICENSE = MIT or GPL-2.0
+TI_ROGUE_KM_LICENSE_FILES = README
+
+TI_ROGUE_KM_DEPENDENCIES = linux
+
+PVR_BUILD = "release"
+PVR_WS = "wayland"
+
+TI_ROGUE_KM_MAKE_OPTS = \
+	$(LINUX_MAKE_FLAGS) \
+	KERNELDIR=$(LINUX_DIR) \
+	BUILD=$(PVR_BUILD) \
+	PVR_BUILD_DIR=$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT) \
+	WINDOW_SYSTEM=$(PVR_WS)
+
+define TI_ROGUE_KM_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TI_ROGUE_KM_MAKE_OPTS)
+endef
+
+define TI_ROGUE_KM_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR) \
+		M=$(@D)/binary_$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT)_$(PVR_WS)_$(PVR_BUILD)/target_aarch64/kbuild \
+		INSTALL_MOD_PATH=$(TARGET_DIR) \
+		modules_install
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 09/11] package/ti-rogue-km: new package

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 5 lines

This package adds the kernel module for the Rogue graphics accelerator of the following Texas Instuments SoCs: AM62, J721E, J721S2, and J784S4.

[--SNIP--]

Quoted 22 lines
package/ti-rogue-km/Config.in new file +16 -0
new file mode 100644
index 0000000000..b1565929d5
@@ -0,0 +1,28 @@
+comment "ti-rogue-km needs a Linux kernel to be built"
+	depends on BR2_aarch64
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_TI_ROGUE_KM
+	bool "ti-rogue-km"
+	depends on BR2_LINUX_KERNEL && BR2_aarch64
+	select BR2_LINUX_NEEDS_MODULES
+	help
+	  Kernel modules for TI SoCs with Rogue GPU.
+	  This package supports AM62, J721E, J721S2, and J784S4
+	  SoCs only.
+
+	  Note: it needs a TI specific kernel to build properly.
+
+	  https://git.ti.com/cgit/graphics/ti-img-rogue-driver

package/ti-rogue-km/Config.in line 26

Quoted 10 lines
package/ti-rogue-km/Config.in new file +10 -0
+
+if BR2_PACKAGE_TI_ROGUE_KM
+
+config BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT
+	string "KM driver target product"
+	default "am62_linux"
+	help
+	  Select target product to be used for KM driver. This needs to
+	  match one of the SoC-specific folders within the build/linux
+	  folder of the ti-img-rogue-driver Git repository.

If you go with the choice option I suggested in my review of patch 2, then this is going to be trivial to implement without asking the user:

    config BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT
        string
        default "am62_linux" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
        default 
Quoted 41 lines
package/ti-rogue-km/Config.in new file +1 -0
+endif
package/ti-rogue-km/ti-rogue-km.hash new file +3 -0
new file mode 100644
index 0000000000..4a08efbb98
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  ef50124b3e79fb1d28d3a2b4135032505abbb5c6b337b24a9bed7223d521dcc1  ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2-br1.tar.gz
+sha256  c878f4e43e468329d3dcf4db09054e94472bfeee9f8ab2d69a122b978e9f773e  README
package/ti-rogue-km/ti-rogue-km.mk new file +25 -0
new file mode 100644
index 0000000000..7b0a595c71
@@ -0,0 +1,37 @@
+################################################################################
+#
+# ti-rogue-km
+#
+################################################################################
+
+# This corresponds to SDK 08.06.00
+TI_ROGUE_KM_VERSION = 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2
+TI_ROGUE_KM_SITE = https://git.ti.com/git/graphics/ti-img-rogue-driver.git
+TI_ROGUE_KM_SITE_METHOD = git
+TI_ROGUE_KM_LICENSE = MIT or GPL-2.0
+TI_ROGUE_KM_LICENSE_FILES = README
+
+TI_ROGUE_KM_DEPENDENCIES = linux
+
+PVR_BUILD = "release"
+PVR_WS = "wayland"
+
+TI_ROGUE_KM_MAKE_OPTS = \
+	$(LINUX_MAKE_FLAGS) \
+	KERNELDIR=$(LINUX_DIR) \
+	BUILD=$(PVR_BUILD) \
+	PVR_BUILD_DIR=$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT) \
+	WINDOW_SYSTEM=$(PVR_WS)
+

package/ti-rogue-km/ti-rogue-km.mk line 35

Quoted 10 lines
package/ti-rogue-km/ti-rogue-km.mk new file +10 -0
+define TI_ROGUE_KM_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TI_ROGUE_KM_MAKE_OPTS)
+endef
+
+define TI_ROGUE_KM_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR) \
+		M=$(@D)/binary_$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT)_$(PVR_WS)_$(PVR_BUILD)/target_aarch64/kbuild \
+		INSTALL_MOD_PATH=$(TARGET_DIR) \
+		modules_install
+endef

Can't we use the kernel-module infra instead?
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_packages_building_kernel_modules

i.e. something like:

    TI_ROGUE_KM_MODULE_MAKE_OPTS = \
        PVR_BUILD_DIR=$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT) \
        WINDOW_SYSTEM=wayland

I'm a bit concerned about the hoops the Makefile goes through to end up with a path like:

    (@D)/binary_$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT)_$(PVR_WS)_$(PVR_BUILD)/target_aarch64/kbuild

so maybe it is more complex than that... In any case, it would be good to explain in the commit log why we can't use our kernel-module infra.

Regards,
Yann E. MORIN.

Quoted 8 lines
package/ti-rogue-km/ti-rogue-km.mk new file +1 -0
+$(eval $(generic-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#39 lore raw

Re: [Buildroot] [PATCH v9 09/11] package/ti-rogue-km: new package

Hi Andreas,

Quoted 5 lines

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:

Quoted 4 lines

This package adds the kernel module for the Rogue graphics accelerator of the following Texas Instuments SoCs: AM62, J721E, J721S2, and J784S4.

I was attempting to build this with uclibc and I got this error:

ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2-br1.tar.gz: OK (sha256: ef50124b3e79fb1d28d3a2b4135032505abbb5c6b337b24a9bed7223d521dcc1)

Quoted 1 line
Quoted 1 line
Quoted 1 line

ti-rogue-km 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2 Extracting

gzip -d -c /home/johnsonb/dl/ti-rogue-km/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2-br1.tar.gz | tar --strip-components=1 -C /home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2
-xf -

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

ti-rogue-km 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2 Patching ti-rogue-km 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2 Configuring ti-rogue-km 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2 Building

PATH="/home/johnsonb/buildroot1/output/host/bin:/home/johnsonb/buildroot1/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/wsl/lib:/snap/bin:/home/johnsonb/bin" /usr/bin/make -j21 -C
/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2
HOSTCC="/usr/bin/gcc -O2 -isystem
/home/johnsonb/buildroot1/output/host/include
-L/home/johnsonb/buildroot1/output/host/lib
-Wl,-rpath,/home/johnsonb/buildroot1/output/host/lib" ARCH=arm64
INSTALL_MOD_PATH=/home/johnsonb/buildroot1/output/target
CROSS_COMPILE="/home/johnsonb/buildroot1/output/host/bin/aarch64-buildroot-linux-uclibc-"
WERROR=0 REGENERATE_PARSERS=1
DEPMOD=/home/johnsonb/buildroot1/output/host/sbin/depmod
INSTALL_MOD_STRIP=1
KERNELDIR=/home/johnsonb/buildroot1/output/build/linux-custom
BUILD="release" PVR_BUILD_DIR="am62_linux" WINDOW_SYSTEM="wayland"
make[1]: Entering directory
'/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2'
../config/preconfig.mk:316: Could not determine TARGET_OS so assuming Linux
../config/compiler.mk:217:
******************************************************
../config/compiler.mk:217: Compiler target
'aarch64-buildroot-linux-uclibc' not recognised
../config/compiler.mk:217: (missing
../config/compilers/aarch64-buildroot-linux-uclibc.mk file)
../config/compiler.mk:217:
******************************************************
../config/compiler.mk:217: *** Compiler
'aarch64-buildroot-linux-uclibc' not recognised. Stop.
make[1]: *** [Makefile:54: build] Error 2
make[1]: Leaving directory
'/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2'
make: *** [package/pkg-generic.mk:293:
/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2/.stamp_built]
Error 2

Also got a similiar error with musl

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

ti-rogue-km 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2 Patching ti-rogue-km 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2 Configuring ti-rogue-km 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2 Building

PATH="/home/johnsonb/buildroot1/output/host/bin:/home/johnsonb/buildroot1/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/wsl/lib:/snap/bin:/home/johnsonb/bin" /usr/bin/make -j21 -C
/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2
HOSTCC="/usr/bin/gcc -O2 -isystem
/home/johnsonb/buildroot1/output/host/include
-L/home/johnsonb/buildroot1/output/host/lib
-Wl,-rpath,/home/johnsonb/buildroot1/output/host/lib" ARCH=arm64
INSTALL_MOD_PATH=/home/johnsonb/buildroot1/output/target
CROSS_COMPILE="/home/johnsonb/buildroot1/output/host/bin/aarch64-buildroot-linux-musl-"
WERROR=0 REGENERATE_PARSERS=1
DEPMOD=/home/johnsonb/buildroot1/output/host/sbin/depmod
INSTALL_MOD_STRIP=1
KERNELDIR=/home/johnsonb/buildroot1/output/build/linux-custom
BUILD="release" PVR_BUILD_DIR="am62_linux" WINDOW_SYSTEM="wayland"
make[1]: Entering directory
'/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2'
../config/preconfig.mk:316: Could not determine TARGET_OS so assuming Linux
../config/compiler.mk:217:
******************************************************
../config/compiler.mk:217: Compiler target
'aarch64-buildroot-linux-musl' not recognised
../config/compiler.mk:217: (missing
../config/compilers/aarch64-buildroot-linux-musl.mk file)
../config/compiler.mk:217:
******************************************************
../config/compiler.mk:217: *** Compiler 'aarch64-buildroot-linux-musl'
not recognised. Stop.
make[1]: *** [Makefile:54: build] Error 2
make[1]: Leaving directory
'/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2'
make: *** [package/pkg-generic.mk:293:
/home/johnsonb/buildroot1/output/build/ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2/.stamp_built]
Error 2

If glibc is required I think there is a BR2_TOOLCHAIN_USES_GLIBC you can add to the config.in for that package.

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

#40 lore raw

PATCH v9 10/11 package/ti-rogue-um: new package

In reply to Andreas Dannenberg via buildroot

This package adds the userspace libraries for the Rogue graphics accelerator of the following Texas Instruments SoCs: AM62, J721E, J721S2, and J784S4.

---
 package/Config.in                             |   1 +
 .../0001-all-drop-the-init-script.patch       | 832 ++++++++++++++++++
 package/ti-rogue-um/Config.in                 |  52 ++
 package/ti-rogue-um/ti-rogue-um.hash          |   3 +
 package/ti-rogue-um/ti-rogue-um.mk            |  38 +
 5 files changed, 926 insertions(+)
 create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
package/Config.in +1 -0
index 96ef0d72de..0bff1135aa 100644
@@ -614,6 +614,7 @@ endmenu
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
 	source "package/ti-rogue-km/Config.in"
+	source "package/ti-rogue-um/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-rogue-um/0001-all-drop-the-init-script.patch new file +832 -0

832 lines not on this page · raw message

package/ti-rogue-um/Config.in new file +52 -0

52 lines not on this page · raw message

package/ti-rogue-um/ti-rogue-um.hash new file +3 -0
new file mode 100644
index 0000000000..a41bf33145
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  2e1bd1a5ab0ad2db1b9164d028a94f8f9d20743131f337a817fd1c8f9ddd4cbe  ti-rogue-um-5977e82b96028f783d39c7219f016c1faf8dc5f5-br1.tar.gz
+sha256  37507b462edf97b59717d2d144daaac85fbca6080c3602b5128e446e97f9ad47  LICENSE
package/ti-rogue-um/ti-rogue-um.mk new file +38 -0
new file mode 100644
index 0000000000..fa29638fa7
@@ -0,0 +1,38 @@
+################################################################################
+#
+# ti-rogue-um
+#
+################################################################################
+
+# This corresponds to SDK 08.06.00
+TI_ROGUE_UM_VERSION = 5977e82b96028f783d39c7219f016c1faf8dc5f5
+TI_ROGUE_UM_SITE = https://git.ti.com/git/graphics/ti-img-rogue-umlibs.git
+TI_ROGUE_UM_SITE_METHOD = git
+TI_ROGUE_UM_LICENSE = TI TSPA License
+TI_ROGUE_UM_LICENSE_FILES = LICENSE
+TI_ROGUE_UM_INSTALL_STAGING = YES
+TI_ROGUE_UM_PROVIDES = libegl libgbm libgles powervr
+
+# ti-rogue-um is a egl/gles provider only if libdrm is installed
+TI_ROGUE_UM_DEPENDENCIES = libdrm wayland
+
+PVR_BUILD = "release"
+PVR_WS = "wayland"
+
+define TI_ROGUE_UM_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		DESTDIR=$(STAGING_DIR) \
+		TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+		BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+		install
+endef
+
+define TI_ROGUE_UM_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		DESTDIR=$(TARGET_DIR) \
+		TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+		BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+		install
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.34.1

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

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

Quoted 157 lines · Andreas Dannenberg via buildroot

This package adds the userspace libraries for the Rogue graphics accelerator of the following Texas Instruments SoCs: AM62, J721E, J721S2, and J784S4.

---
 package/Config.in                             |   1 +
 .../0001-all-drop-the-init-script.patch       | 832 ++++++++++++++++++
 package/ti-rogue-um/Config.in                 |  52 ++
 package/ti-rogue-um/ti-rogue-um.hash          |   3 +
 package/ti-rogue-um/ti-rogue-um.mk            |  38 +
 5 files changed, 926 insertions(+)
 create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
package/Config.in +1 -0
index 96ef0d72de..0bff1135aa 100644
@@ -614,6 +614,7 @@ endmenu
        source "package/targetcli-fb/Config.in"
        source "package/ti-gfx/Config.in"
        source "package/ti-rogue-km/Config.in"
+       source "package/ti-rogue-um/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-rogue-um/0001-all-drop-the-init-script.patch new file +19 -0
new file mode 100644
index 0000000000..4f3dd1cbb1
@@ -0,0 +1,832 @@
+From 99e0da8a1c08818c59680f726e11a84b26daf29f Mon Sep 17 00:00:00 2001
+From: Randolph Sapp <[email protected]>
+Date: Thu, 25 May 2023 18:59:26 -0500
+Subject: [PATCH] all: drop the init script
+
+Nobody should be using this anymore. It's sysVinit and it's just a fancy
+wrapper around modprobe anyway. We'll be dropping it from our build
+tools soon.
+
+Signed-off-by: Randolph Sapp <[email protected]>
+---
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ 4 files changed, 784 deletions(-)
+ delete mode 100755 targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755 targetfs/j721e_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755

targetfs/j721s2_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755 targetfs/j784s4_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +2 -0
+
+diff --git a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

b/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +6 -0
+deleted file mode 100755
+index 428cd86..0000000
+--- a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
++++ /dev/null
+2.34.1
+
package/ti-rogue-um/Config.in new file +52 -0
new file mode 100644
index 0000000000..15257858c2
@@ -0,0 +1,52 @@
+comment "ti-rogue-um needs udev and a glibc toolchain w/ threads"
+       depends on BR2_aarch64
+       depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC \
+               || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_TI_ROGUE_UM
+       bool "ti-rogue-um"
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+       depends on BR2_PACKAGE_HAS_UDEV
+       # pre-built binaries
+       depends on BR2_TOOLCHAIN_USES_GLIBC
+       depends on BR2_aarch64
+       select BR2_PACKAGE_LIBDRM
+       select BR2_PACKAGE_HAS_LIBEGL
+       select BR2_PACKAGE_HAS_LIBGBM
+       select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
+       select BR2_PACKAGE_HAS_LIBGLES
+       select BR2_PACKAGE_HAS_POWERVR
+       select BR2_PACKAGE_LIBFFI
+       select BR2_PACKAGE_WAYLAND
+       select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+       select BR2_PACKAGE_TI_ROGUE_KM if BR2_LINUX_KERNEL
+       help
+         Graphics libraries for TI SoCs with Rogue GPU.
+         This package supports AM62, J721E, J721S2, and J784S4
+         SoCs only.
+
+         https://git.ti.com/cgit/graphics/ti-img-rogue-umlibs
+
+if BR2_PACKAGE_TI_ROGUE_UM
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGBM
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_POWERVR
+       default "ti-rogue-um"
+
+config BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT
+       string "UM driver target product"
+       default "am62_linux"
+       help
+         Select target product to be used for UM libraries. This needs to
+         match one of the SoC-specific folders within the root/targetfs
+         folder of the ti-img-rogue-umlibs Git repository.
+
+endif
package/ti-rogue-um/ti-rogue-um.hash new file +2 -0
new file mode 100644
index 0000000000..a41bf33145
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  2e1bd1a5ab0ad2db1b9164d028a94f8f9d20743131f337a817fd1c8f9ddd4cbe

ti-rogue-um-5977e82b96028f783d39c7219f016c1faf8dc5f5-br1.tar.gz +sha256 37507b462edf97b59717d2d144daaac85fbca6080c3602b5128e446e97f9ad47 LICENSE

package/ti-rogue-um/ renamed from package/ti-rogue-um/ti-rogue-um.mk +0 -0

ti-rogue-um.mk
new file mode 100644
index 0000000000..fa29638fa7

package/ti-rogue-um/ti-rogue-um.mk new file +9 -0
@@ -0,0 +1,38 @@
 
+################################################################################
+#
+# ti-rogue-um
+#
 
+################################################################################
+
+# This corresponds to SDK 08.06.00
+TI_ROGUE_UM_VERSION = 5977e82b96028f783d39c7219f016c1faf8dc5f5
+TI_ROGUE_UM_SITE =

https://git.ti.com/git/graphics/ti-img-rogue-umlibs.git

package/ti-rogue-um/ti-rogue-um.mk line 17

Quoted 8 lines
package/ti-rogue-um/ti-rogue-um.mk new file +8 -0
+TI_ROGUE_UM_SITE_METHOD = git
+TI_ROGUE_UM_LICENSE = TI TSPA License
+TI_ROGUE_UM_LICENSE_FILES = LICENSE
+TI_ROGUE_UM_INSTALL_STAGING = YES
+TI_ROGUE_UM_PROVIDES = libegl libgbm libgles powervr
+
+# ti-rogue-um is a egl/gles provider only if libdrm is installed
+TI_ROGUE_UM_DEPENDENCIES = libdrm wayland

useless built dependencies (nothing is built, blobs are copied), runtime dependencies in Config.in are enough.

+

package/ti-rogue-um/ti-rogue-um.mk line 21

Quoted 4 lines
package/ti-rogue-um/ti-rogue-um.mk new file +3 -0
+PVR_BUILD = "release"
+PVR_WS = "wayland"
+
TI_ROGUE_UM_MAKE_OPTS = \
      TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
      BUILD=release \
      WINDOW_SYSTEM=wayland

define TI_ROGUE_UM_INSTALL_STAGING_CMDS

     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
          $(TI_ROGUE_UM_MAKE_OPTS) \
          DESTDIR=$(STAGING_DIR) \
          install

endef
by this way, all variables are prefixed by TI_ROGUE_UM_.

François

Quoted 20 lines
package/ti-rogue-um/ti-rogue-um.mk new file +17 -1
+define TI_ROGUE_UM_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(STAGING_DIR) \
+               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+define TI_ROGUE_UM_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(TARGET_DIR) \
+               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+$(eval $(generic-package))
--

2.34.1

Quoted 5 lines

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

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

#42 lore raw

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

Hi François,

Quoted 163 lines · François Perrad
Quoted 160 lines · Andreas Dannenberg via buildroot

This package adds the userspace libraries for the Rogue graphics accelerator of the following Texas Instruments SoCs: AM62, J721E, J721S2, and J784S4.

---
 package/Config.in                             |   1 +
 .../0001-all-drop-the-init-script.patch       | 832 ++++++++++++++++++
 package/ti-rogue-um/Config.in                 |  52 ++
 package/ti-rogue-um/ti-rogue-um.hash          |   3 +
 package/ti-rogue-um/ti-rogue-um.mk            |  38 +
 5 files changed, 926 insertions(+)
 create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
package/Config.in +1 -0
index 96ef0d72de..0bff1135aa 100644
@@ -614,6 +614,7 @@ endmenu
        source "package/targetcli-fb/Config.in"
        source "package/ti-gfx/Config.in"
        source "package/ti-rogue-km/Config.in"
+       source "package/ti-rogue-um/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-rogue-um/0001-all-drop-the-init-script.patch new file +19 -0
new file mode 100644
index 0000000000..4f3dd1cbb1
@@ -0,0 +1,832 @@
+From 99e0da8a1c08818c59680f726e11a84b26daf29f Mon Sep 17 00:00:00 2001
+From: Randolph Sapp <[email protected]>
+Date: Thu, 25 May 2023 18:59:26 -0500
+Subject: [PATCH] all: drop the init script
+
+Nobody should be using this anymore. It's sysVinit and it's just a fancy
+wrapper around modprobe anyway. We'll be dropping it from our build
+tools soon.
+
+Signed-off-by: Randolph Sapp <[email protected]>
+---
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ 4 files changed, 784 deletions(-)
+ delete mode 100755 targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755 targetfs/j721e_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755

targetfs/j721s2_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755 targetfs/j784s4_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +2 -0
+
+diff --git a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

b/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +6 -0
+deleted file mode 100755
+index 428cd86..0000000
+--- a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
++++ /dev/null
+2.34.1
+
package/ti-rogue-um/Config.in new file +52 -0
new file mode 100644
index 0000000000..15257858c2
@@ -0,0 +1,52 @@
+comment "ti-rogue-um needs udev and a glibc toolchain w/ threads"
+       depends on BR2_aarch64
+       depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC \
+               || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_TI_ROGUE_UM
+       bool "ti-rogue-um"
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+       depends on BR2_PACKAGE_HAS_UDEV
+       # pre-built binaries
+       depends on BR2_TOOLCHAIN_USES_GLIBC
+       depends on BR2_aarch64
+       select BR2_PACKAGE_LIBDRM
+       select BR2_PACKAGE_HAS_LIBEGL
+       select BR2_PACKAGE_HAS_LIBGBM
+       select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
+       select BR2_PACKAGE_HAS_LIBGLES
+       select BR2_PACKAGE_HAS_POWERVR
+       select BR2_PACKAGE_LIBFFI
+       select BR2_PACKAGE_WAYLAND
+       select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+       select BR2_PACKAGE_TI_ROGUE_KM if BR2_LINUX_KERNEL
+       help
+         Graphics libraries for TI SoCs with Rogue GPU.
+         This package supports AM62, J721E, J721S2, and J784S4
+         SoCs only.
+
+         https://git.ti.com/cgit/graphics/ti-img-rogue-umlibs
+
+if BR2_PACKAGE_TI_ROGUE_UM
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGBM
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_POWERVR
+       default "ti-rogue-um"
+
+config BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT
+       string "UM driver target product"
+       default "am62_linux"
+       help
+         Select target product to be used for UM libraries. This needs to
+         match one of the SoC-specific folders within the root/targetfs
+         folder of the ti-img-rogue-umlibs Git repository.
+
+endif
package/ti-rogue-um/ti-rogue-um.hash new file +2 -0
new file mode 100644
index 0000000000..a41bf33145
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  2e1bd1a5ab0ad2db1b9164d028a94f8f9d20743131f337a817fd1c8f9ddd4cbe

ti-rogue-um-5977e82b96028f783d39c7219f016c1faf8dc5f5-br1.tar.gz +sha256 37507b462edf97b59717d2d144daaac85fbca6080c3602b5128e446e97f9ad47 LICENSE

package/ti-rogue-um/ renamed from package/ti-rogue-um/ti-rogue-um.mk +0 -0

ti-rogue-um.mk
new file mode 100644
index 0000000000..fa29638fa7

package/ti-rogue-um/ti-rogue-um.mk new file +9 -0
@@ -0,0 +1,38 @@
 
+################################################################################
+#
+# ti-rogue-um
+#
 
+################################################################################
+
+# This corresponds to SDK 08.06.00
+TI_ROGUE_UM_VERSION = 5977e82b96028f783d39c7219f016c1faf8dc5f5
+TI_ROGUE_UM_SITE =

https://git.ti.com/git/graphics/ti-img-rogue-umlibs.git

package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+TI_ROGUE_UM_SITE_METHOD = git
+TI_ROGUE_UM_LICENSE = TI TSPA License
+TI_ROGUE_UM_LICENSE_FILES = LICENSE
+TI_ROGUE_UM_INSTALL_STAGING = YES
Quoted 8 lines

package/ti-rogue-um/ti-rogue-um.mk line 17

Quoted 5 lines
package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+TI_ROGUE_UM_PROVIDES = libegl libgbm libgles powervr
+
+# ti-rogue-um is a egl/gles provider only if libdrm is installed
+TI_ROGUE_UM_DEPENDENCIES = libdrm wayland

useless built dependencies (nothing is built, blobs are copied), runtime dependencies in Config.in are enough.

Understood, will fix it. Btw this was a carry-over from package/ti-sgx-um/ti-sgx-um.mk which I used to model this new package after, so opportunity for improvement there as well...

Quoted 11 lines

+

package/ti-rogue-um/ti-rogue-um.mk line 21

Quoted 4 lines
package/ti-rogue-um/ti-rogue-um.mk new file +3 -0
+PVR_BUILD = "release"
+PVR_WS = "wayland"
+
TI_ROGUE_UM_MAKE_OPTS = \
      TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
      BUILD=release \
      WINDOW_SYSTEM=wayland
Quoted 7 lines

define TI_ROGUE_UM_INSTALL_STAGING_CMDS

     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
          $(TI_ROGUE_UM_MAKE_OPTS) \
          DESTDIR=$(STAGING_DIR) \
          install

endef
by this way, all variables are prefixed by TI_ROGUE_UM_.

Good idea, will factor-out the make options. Thanks for taking the time to review & improve this patch.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 24 lines

François

Quoted 20 lines
package/ti-rogue-um/ti-rogue-um.mk new file +17 -1
+define TI_ROGUE_UM_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(STAGING_DIR) \
+               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+define TI_ROGUE_UM_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(TARGET_DIR) \
+               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+$(eval $(generic-package))
--

2.34.1

Quoted 5 lines
Quoted 5 lines

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

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

#43 lore raw

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

Le ven. 23 juin 2023 à 16:59, Andreas Dannenberg <[email protected]> a écrit :

Quoted 99 lines

Hi François,

Quoted 7 lines · François Perrad
Quoted 4 lines · Andreas Dannenberg via buildroot

This package adds the userspace libraries for the Rogue graphics accelerator of the following Texas Instruments SoCs: AM62, J721E, J721S2, and J784S4.

Quoted 9 lines
Quoted 9 lines
---
 package/Config.in                             |   1 +
 .../0001-all-drop-the-init-script.patch       | 832 ++++++++++++++++++
 package/ti-rogue-um/Config.in                 |  52 ++
 package/ti-rogue-um/ti-rogue-um.hash          |   3 +
 package/ti-rogue-um/ti-rogue-um.mk            |  38 +
 5 files changed, 926 insertions(+)
 create mode 100644

package/ti-rogue-um/0001-all-drop-the-init-script.patch

Quoted 21 lines
Quoted 21 lines
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
package/Config.in +1 -0
index 96ef0d72de..0bff1135aa 100644
@@ -614,6 +614,7 @@ endmenu
        source "package/targetcli-fb/Config.in"
        source "package/ti-gfx/Config.in"
        source "package/ti-rogue-km/Config.in"
+       source "package/ti-rogue-um/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-rogue-um/0001-all-drop-the-init-script.patch new file +0 -1
new file mode 100644
index 0000000000..4f3dd1cbb1
--- /dev/null
Quoted 8 lines

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 6

Quoted 8 lines

+++ b/package/ti-rogue-um/0001-all-drop-the-init-script.patch

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +6 -0
@@ -0,0 +1,832 @@
+From 99e0da8a1c08818c59680f726e11a84b26daf29f Mon Sep 17 00:00:00 2001
+From: Randolph Sapp <[email protected]>
+Date: Thu, 25 May 2023 18:59:26 -0500
+Subject: [PATCH] all: drop the init script
+
+Nobody should be using this anymore. It's sysVinit and it's just a

fancy

Quoted 6 lines

package/ti-rogue-um/0001-all-drop-the-init-script.patch

Quoted 6 lines
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +6 -0
+wrapper around modprobe anyway. We'll be dropping it from our build
+tools soon.
+
+Signed-off-by: Randolph Sapp <[email protected]>
+---
+ .../wayland/release/etc/init.d/rc.pvr         | 196

------------------

Quoted 1 line

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 13

Quoted 1 line
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +1 -0
+ .../wayland/release/etc/init.d/rc.pvr         | 196

------------------

Quoted 1 line

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 14

Quoted 1 line
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +1 -0
+ .../wayland/release/etc/init.d/rc.pvr         | 196

------------------

Quoted 1 line

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 15

Quoted 1 line
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +1 -0
+ .../wayland/release/etc/init.d/rc.pvr         | 196

------------------

Quoted 2 lines

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 17

Quoted 2 lines
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +2 -0
+ 4 files changed, 784 deletions(-)
+ delete mode 100755

targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

Quoted 1 line

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 18

Quoted 1 line
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +1 -0
+ delete mode 100755

targetfs/j721e_linux/wayland/release/etc/init.d/rc.pvr

Quoted 6 lines
Quoted 6 lines
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +1 -0
+ delete mode 100755

targetfs/j721s2_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755 targetfs/j784s4_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +2 -0
+
+diff --git a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
Quoted 8 lines

Review

Quoted 8 lines

b/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +6 -0
+deleted file mode 100755
+index 428cd86..0000000
+--- a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
++++ /dev/null
+2.34.1
+
(quoted diff) +0 -0

b/package/ti-rogue-um/Config.in

Quoted 16 lines
Quoted 16 lines

new file mode 100644
index 0000000000..15257858c2

package/ti-rogue-um/Config.in new file +11 -0
@@ -0,0 +1,52 @@
+comment "ti-rogue-um needs udev and a glibc toolchain w/ threads"
+       depends on BR2_aarch64
+       depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC \
+               || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_TI_ROGUE_UM
+       bool "ti-rogue-um"
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+       depends on BR2_PACKAGE_HAS_UDEV
+       # pre-built binaries
+       depends on BR2_TOOLCHAIN_USES_GLIBC
Quoted 9 lines
Quoted 8 lines

package/ti-rogue-um/Config.in line 19

Quoted 8 lines
package/ti-rogue-um/Config.in new file +8 -0
+       depends on BR2_aarch64
+       select BR2_PACKAGE_LIBDRM
+       select BR2_PACKAGE_HAS_LIBEGL
+       select BR2_PACKAGE_HAS_LIBGBM
+       select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
+       select BR2_PACKAGE_HAS_LIBGLES
+       select BR2_PACKAGE_HAS_POWERVR
+       select BR2_PACKAGE_LIBFFI

BR2_PACKAGE_LIBFFI is useless (already selected by the package wayland).

François.

Quoted 141 lines
Quoted 21 lines
Quoted 21 lines
package/ti-rogue-um/Config.in new file +21 -0
+       select BR2_PACKAGE_WAYLAND
+       select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+       select BR2_PACKAGE_TI_ROGUE_KM if BR2_LINUX_KERNEL
+       help
+         Graphics libraries for TI SoCs with Rogue GPU.
+         This package supports AM62, J721E, J721S2, and J784S4
+         SoCs only.
+
+         https://git.ti.com/cgit/graphics/ti-img-rogue-umlibs
+
+if BR2_PACKAGE_TI_ROGUE_UM
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGBM
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+       default "ti-rogue-um"
+
Quoted 8 lines

package/ti-rogue-um/Config.in

Quoted 8 lines
package/ti-rogue-um/Config.in new file +8 -0
+config BR2_PACKAGE_PROVIDES_POWERVR
+       default "ti-rogue-um"
+
+config BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT
+       string "UM driver target product"
+       default "am62_linux"
+       help
+         Select target product to be used for UM libraries. This

needs to

Quoted 1 line

package/ti-rogue-um/Config.in line 49

Quoted 1 line
package/ti-rogue-um/Config.in new file +1 -0
+         match one of the SoC-specific folders within the

root/targetfs

Quoted 4 lines
Quoted 4 lines
package/ti-rogue-um/Config.in new file +3 -0
+         folder of the ti-img-rogue-umlibs Git repository.
+
+endif
(quoted diff) +0 -0
Quoted 8 lines

package/ti-rogue-um/ti-rogue-um.hash line 2

Quoted 8 lines

b/package/ti-rogue-um/ti-rogue-um.hash
new file mode 100644
index 0000000000..a41bf33145

package/ti-rogue-um/ti-rogue-um.hash new file +2 -0
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256

2e1bd1a5ab0ad2db1b9164d028a94f8f9d20743131f337a817fd1c8f9ddd4cbe

Quoted 2 lines
Quoted 2 lines

ti-rogue-um-5977e82b96028f783d39c7219f016c1faf8dc5f5-br1.tar.gz +sha256

37507b462edf97b59717d2d144daaac85fbca6080c3602b5128e446e97f9ad47

Quoted 10 lines

package/ti-rogue-um/ti-rogue-um.mk

Quoted 10 lines

LICENSE

package/ti-rogue-um/ renamed from package/ti-rogue-um/ti-rogue-um.mk +0 -0

ti-rogue-um.mk
new file mode 100644
index 0000000000..fa29638fa7

package/ti-rogue-um/ti-rogue-um.mk new file +0 -0
@@ -0,0 +1,38 @@

+################################################################################

Quoted 5 lines

package/ti-rogue-um/ti-rogue-um.mk line 4

Quoted 5 lines
package/ti-rogue-um/ti-rogue-um.mk new file +3 -0
+#
+# ti-rogue-um
+#

+################################################################################

Quoted 9 lines
Quoted 9 lines
package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+
+# This corresponds to SDK 08.06.00
+TI_ROGUE_UM_VERSION = 5977e82b96028f783d39c7219f016c1faf8dc5f5
+TI_ROGUE_UM_SITE =

https://git.ti.com/git/graphics/ti-img-rogue-umlibs.git

package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+TI_ROGUE_UM_SITE_METHOD = git
+TI_ROGUE_UM_LICENSE = TI TSPA License
+TI_ROGUE_UM_LICENSE_FILES = LICENSE
+TI_ROGUE_UM_INSTALL_STAGING = YES
Quoted 8 lines

package/ti-rogue-um/ti-rogue-um.mk line 17

Quoted 5 lines
package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+TI_ROGUE_UM_PROVIDES = libegl libgbm libgles powervr
+
+# ti-rogue-um is a egl/gles provider only if libdrm is installed
+TI_ROGUE_UM_DEPENDENCIES = libdrm wayland

useless built dependencies (nothing is built, blobs are copied), runtime dependencies in Config.in are enough.

Understood, will fix it. Btw this was a carry-over from package/ti-sgx-um/ti-sgx-um.mk which I used to model this new package after, so opportunity for improvement there as well...

Quoted 11 lines

+

package/ti-rogue-um/ti-rogue-um.mk line 21

Quoted 4 lines
package/ti-rogue-um/ti-rogue-um.mk new file +3 -0
+PVR_BUILD = "release"
+PVR_WS = "wayland"
+
TI_ROGUE_UM_MAKE_OPTS = \
      TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
      BUILD=release \
      WINDOW_SYSTEM=wayland
Quoted 7 lines

define TI_ROGUE_UM_INSTALL_STAGING_CMDS

     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
          $(TI_ROGUE_UM_MAKE_OPTS) \
          DESTDIR=$(STAGING_DIR) \
          install

endef
by this way, all variables are prefixed by TI_ROGUE_UM_.

Good idea, will factor-out the make options. Thanks for taking the time to review & improve this patch.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 8 lines

François

package/ti-rogue-um/ti-rogue-um.mk line 29

Quoted 4 lines
package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+define TI_ROGUE_UM_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(STAGING_DIR) \
+

TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \

Quoted 8 lines

package/ti-rogue-um/ti-rogue-um.mk line 37

Quoted 8 lines
package/ti-rogue-um/ti-rogue-um.mk new file +8 -0
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+define TI_ROGUE_UM_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(TARGET_DIR) \
+

TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \

Quoted 8 lines
Quoted 8 lines
package/ti-rogue-um/ti-rogue-um.mk new file +5 -1
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+$(eval $(generic-package))
--

2.34.1

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

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

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

#44 lore raw

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

François, All,

On 2023-06-25 07:37 +0200, François Perrad spake thusly:

Quoted 4 lines

Le ven. 23 juin 2023 à 16:59, Andreas Dannenberg < [1][email protected]> a écrit :

Quoted 2 lines · François Perrad

Le jeu. 22 juin 2023 à 18:07, Andreas Dannenberg via buildroot < [2][email protected]> a écrit :

[--SNIP--]

Quoted 6 lines
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +0 -0
new file mode 100644
index 0000000000..4f3dd1cbb1

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 8

Quoted 8 lines
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +8 -0
@@ -0,0 +1,832 @@ 
+From 99e0da8a1c08818c59680f726e11a84b26daf29f Mon Sep 17 00:00:00 2001
+From: Randolph Sapp <[email protected]>
+Date: Thu, 25 May 2023 18:59:26 -0500
+Subject: [PATCH] all: drop the init script
+
+Nobody should be using this anymore. It's sysVinit and it's just a fancy
+wrapper around modprobe anyway. We'll be dropping it from our build
+tools soon.

OK, makes sense. But this is a big patch, and it adds some noise. I'd suggest just adding:

# Usually frowned upon, but much much smaller than a patch to remove # them; anyway, upstream is going to get rid of them in a future # release.
define TI_IMG_ROGUE_UMLIBS_CLEANUP
$(Q)rm -rf $(@D)/targetfs/*/wayland/release/etc/init.d/
endef
TI_IMG_ROGUE_UMLIBS_POST_EXTRACT_HOOKS += TI_IMG_ROGUE_UMLIBS_CLEANUP

package/Config.in endmenu · line 617

Quoted 9 lines
package/Config.in +1 -0
index 96ef0d72de..0bff1135aa 100644
@@ -614,6 +614,7 @@  endmenu
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
 	source "package/ti-rogue-km/Config.in"
+	source "package/ti-rogue-um/Config.in"

We prefer that the package name in Buildroot matches the upstream package name, i.e. ti-img-rogue-umlibs here.

I missed that in the driver package, which should be named as upstream, i.e. ti-img-rogue-driver, rather than ti-rogue-km.

[--SNIP--]

Quoted 7 lines
package/Config.in +0 -0
  > > +config BR2_PACKAGE_TI_ROGUE_UM
  > > +       bool "ti-rogue-um"
  > > +       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
Quoted 4 lines
Quoted 4 lines

+       depends on BR2_PACKAGE_HAS_UDEV
+       # pre-built binaries
+       depends on BR2_TOOLCHAIN_USES_GLIBC
+       depends on BR2_aarch64

If we go as I suggested in the review of a previous patch, then we could hide away that package for SoC that have no userland lis. Indeed, I can see in the source tree that we only have:

    $ tree -d -L 1 targetfs/
    targetfs/
    ├── am62_linux
    ├── j721e_linux
    ├── j721s2_linux
    └── j784s4_linux

So the am62ax, am64x, and am65x, that are referenced in the other patches, do not have user libs here, so the package should not be selected for those SoCs.

i.e.:

config BR2_PACKAGE_TI_IMG_ROGUE_UMLIBS_SOC_SUPPORTS
bool
default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_J721E default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_J721S2 default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_J784S4

config BR2_PACKAGE_TI_IMG_ROGUE_UMLIBS
bool "ti-img-rogue-umlibs"
depends on BR2_PACKAGE_TI_IMG_ROGUE_UMLIBS_SOC_SUPPORTS

Of course, this raises the issue that BR2_TARGET_TI_K3_IMAGE_GEN_SOC_* are no longer specific to ti-k3-image-gen, but are shared with a few packages.

In which case it may make sense to have those moved to a common Config.in, like is done for the freescale-imx stuff.

I.e. add a new BR2_PACKAGE_TI_AM6XX option, and the SoC selection can be moved there, with all common options, and packages (ti-k3-image-gen, ti-core-secdev-k3, etc...) can all depend on that option; packages in package/ can be made to appear in a "TI AM6xx" sub-menu, and packages in boot/ can just depend on it too.

Quoted 9 lines
Quoted 7 lines
Quoted 7 lines

+       select BR2_PACKAGE_LIBDRM
+       select BR2_PACKAGE_HAS_LIBEGL
+       select BR2_PACKAGE_HAS_LIBGBM
+       select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF +       select BR2_PACKAGE_HAS_LIBGLES
+       select BR2_PACKAGE_HAS_POWERVR
+       select BR2_PACKAGE_LIBFFI

BR2_PACKAGE_LIBFFI is useless (already selected by the package wayland). François.

It would have been OK to select it here if a library from ti-img-rogue-umlibs had a direct dependency to libffi, which is not the case, so selecting here is indeed not appropriate.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#45 lore raw

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

Hi Yann,
thanks for your detailed/thoughtful feedback on this patch, and others. Comments inlined...

Quoted 27 lines · Yann E. MORIN

François, All,

On 2023-06-25 07:37 +0200, François Perrad spake thusly:

Quoted 4 lines

Le ven. 23 juin 2023 à 16:59, Andreas Dannenberg < [1][email protected]> a écrit :

Quoted 2 lines · François Perrad

Le jeu. 22 juin 2023 à 18:07, Andreas Dannenberg via buildroot < [2][email protected]> a écrit :

[--SNIP--]

Quoted 6 lines
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +0 -0
new file mode 100644
index 0000000000..4f3dd1cbb1

package/ti-rogue-um/0001-all-drop-the-init-script.patch line 8

Quoted 8 lines
package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +8 -0
@@ -0,0 +1,832 @@ 
+From 99e0da8a1c08818c59680f726e11a84b26daf29f Mon Sep 17 00:00:00 2001
+From: Randolph Sapp <[email protected]>
+Date: Thu, 25 May 2023 18:59:26 -0500
+Subject: [PATCH] all: drop the init script
+
+Nobody should be using this anymore. It's sysVinit and it's just a fancy
+wrapper around modprobe anyway. We'll be dropping it from our build
+tools soon.

OK, makes sense. But this is a big patch, and it adds some noise. I'd suggest just adding:

Quoted 7 lines

# Usually frowned upon, but much much smaller than a patch to remove # them; anyway, upstream is going to get rid of them in a future # release.
define TI_IMG_ROGUE_UMLIBS_CLEANUP
$(Q)rm -rf $(@D)/targetfs/*/wayland/release/etc/init.d/
endef
TI_IMG_ROGUE_UMLIBS_POST_EXTRACT_HOOKS += TI_IMG_ROGUE_UMLIBS_CLEANUP

Yeah I thought about this too, but just adding the patch resulting from 'git revert' seemed the easiest. Will make it smaller in next rev.

Quoted 13 lines

package/Config.in endmenu · line 617

Quoted 9 lines
package/Config.in +1 -0
index 96ef0d72de..0bff1135aa 100644
@@ -614,6 +614,7 @@  endmenu
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
 	source "package/ti-rogue-km/Config.in"
+	source "package/ti-rogue-um/Config.in"

We prefer that the package name in Buildroot matches the upstream package name, i.e. ti-img-rogue-umlibs here.

Quoted 2 lines

I missed that in the driver package, which should be named as upstream, i.e. ti-img-rogue-driver, rather than ti-rogue-km.

This was modeled after the existing sgx package (also based on IMG stuff), see package/ti-sgx-* so I just followed that naming scheme for consistency sake so I'd rather leave it alone unless you/others feel strongly about it (I'm not a Buildroot guy so I'm definitely willing to change my ways here ;)

Quoted 33 lines

[--SNIP--]

Quoted 7 lines
package/Config.in +0 -0
  > > +config BR2_PACKAGE_TI_ROGUE_UM
  > > +       bool "ti-rogue-um"
  > > +       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
Quoted 4 lines
Quoted 4 lines

+       depends on BR2_PACKAGE_HAS_UDEV
+       # pre-built binaries
+       depends on BR2_TOOLCHAIN_USES_GLIBC
+       depends on BR2_aarch64

If we go as I suggested in the review of a previous patch, then we could hide away that package for SoC that have no userland lis. Indeed, I can see in the source tree that we only have:

    $ tree -d -L 1 targetfs/
    targetfs/
    ├── am62_linux
    ├── j721e_linux
    ├── j721s2_linux
    └── j784s4_linux

So the am62ax, am64x, and am65x, that are referenced in the other patches, do not have user libs here, so the package should not be selected for those SoCs.

i.e.:

config BR2_PACKAGE_TI_IMG_ROGUE_UMLIBS_SOC_SUPPORTS
bool
default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_J721E default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_J721S2 default y if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_J784S4

Quoted 7 lines

config BR2_PACKAGE_TI_IMG_ROGUE_UMLIBS
bool "ti-img-rogue-umlibs"
depends on BR2_PACKAGE_TI_IMG_ROGUE_UMLIBS_SOC_SUPPORTS

Of course, this raises the issue that BR2_TARGET_TI_K3_IMAGE_GEN_SOC_* are no longer specific to ti-k3-image-gen, but are shared with a few packages.

Yeah agreed this can be made a lot more "intelligent" but my approach was more along the lines of a "lean and mean" (but clean) minimum viable product, so I put more responsibility onto the user to select the right things, which usually during board port happens by creating your own config based on an existing config as a known-good starting point. From my experience, anways. But then of course things could always be improved with follow-on commits.

The concern with making things dependent on BR2_TARGET_TI_K3_IMAGE_GEN_* is that this package will actually go away in certain cases, as more/all of this is being absorbed into upstream U-Boot over time.

Quoted 2 lines

In which case it may make sense to have those moved to a common Config.in, like is done for the freescale-imx stuff.

I do think there's real need to bring in the SoC variant concept into the configs, as there are many device-specific features well beyond GFX that should be enabled/supported in future such as AI accelerators, PRU real-time cores, other MCU cores w/ remote firmware capability etc. Let me look at the imx stuff, that seems like really worth exploring. But back to my previous point I'd rather limit additional work on this _initial_ AM6x enablement series if at all possible....

Quoted 16 lines

I.e. add a new BR2_PACKAGE_TI_AM6XX option, and the SoC selection can be moved there, with all common options, and packages (ti-k3-image-gen, ti-core-secdev-k3, etc...) can all depend on that option; packages in package/ can be made to appear in a "TI AM6xx" sub-menu, and packages in boot/ can just depend on it too.

Quoted 9 lines
Quoted 7 lines
Quoted 7 lines

+       select BR2_PACKAGE_LIBDRM
+       select BR2_PACKAGE_HAS_LIBEGL
+       select BR2_PACKAGE_HAS_LIBGBM
+       select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF +       select BR2_PACKAGE_HAS_LIBGLES
+       select BR2_PACKAGE_HAS_POWERVR
+       select BR2_PACKAGE_LIBFFI

BR2_PACKAGE_LIBFFI is useless (already selected by the package wayland). François.

Quoted 3 lines

It would have been OK to select it here if a library from ti-img-rogue-umlibs had a direct dependency to libffi, which is not the case, so selecting here is indeed not appropriate.

Understood, thanks for confirming.

I ran out of time today to digest all of the feedback on the series but should be able to spend more quality time on this over the next day or two.

Thanks, Andreas

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 11 lines

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

#46 lore raw

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

In reply to Yann E. MORIN
Quoted 7 lines · On Sun, 25 Jun 2023 12:15:07 +0200 "Yann E. MORIN" <[email protected]>…

# Usually frowned upon, but much much smaller than a patch to remove # them; anyway, upstream is going to get rid of them in a future # release.
define TI_IMG_ROGUE_UMLIBS_CLEANUP
$(Q)rm -rf $(@D)/targetfs/*/wayland/release/etc/init.d/
endef
TI_IMG_ROGUE_UMLIBS_POST_EXTRACT_HOOKS += TI_IMG_ROGUE_UMLIBS_CLEANUP

Why don't we simply not install it?

Quoted 4 lines

Of course, this raises the issue that BR2_TARGET_TI_K3_IMAGE_GEN_SOC_* are no longer specific to ti-k3-image-gen, but are shared with a few packages.

Quoted 8 lines

In which case it may make sense to have those moved to a common Config.in, like is done for the freescale-imx stuff.

I.e. add a new BR2_PACKAGE_TI_AM6XX option, and the SoC selection can be moved there, with all common options, and packages (ti-k3-image-gen, ti-core-secdev-k3, etc...) can all depend on that option; packages in package/ can be made to appear in a "TI AM6xx" sub-menu, and packages in boot/ can just depend on it too.

I did indeed add a choice of SoC within the ti-k3-image-gen package, and I rely on it in the u-boot package to know which DM firwmare to use. While doing this, I was wondering if it wouldn't make sense to promote this SoC selection at a higher-level. Indeed, we have more and more packages that are platform-specific (OpenGL implementation, weird firmware stuff), and many of those need to have details on the specific SoC being used.

So would it make sense, at least for some platforms to have some sort of top-level option where we could say "I have a Freescale i.MX6ULL" or "I have a Broadcom BCM2835" so that packages can then do what they think they should do? Of course, the idea is not to list the zillions of ARM SoCs that exist, but only the ones for which we have specific packages. We would have a default "Generic" platform if none of the SoC known by Buildroot fits what the user has.

I can probably cook some initial prototype, just to give a more specific idea of what I'm talking about.

Thoughts?

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#47 lore raw

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

In reply to Andreas Dannenberg via buildroot

Hi François,

Quoted 175 lines · Andreas Dannenberg via buildroot

Hi François,

Quoted 163 lines · François Perrad
Quoted 160 lines · Andreas Dannenberg via buildroot

This package adds the userspace libraries for the Rogue graphics accelerator of the following Texas Instruments SoCs: AM62, J721E, J721S2, and J784S4.

---
 package/Config.in                             |   1 +
 .../0001-all-drop-the-init-script.patch       | 832 ++++++++++++++++++
 package/ti-rogue-um/Config.in                 |  52 ++
 package/ti-rogue-um/ti-rogue-um.hash          |   3 +
 package/ti-rogue-um/ti-rogue-um.mk            |  38 +
 5 files changed, 926 insertions(+)
 create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
package/Config.in +1 -0
index 96ef0d72de..0bff1135aa 100644
@@ -614,6 +614,7 @@ endmenu
        source "package/targetcli-fb/Config.in"
        source "package/ti-gfx/Config.in"
        source "package/ti-rogue-km/Config.in"
+       source "package/ti-rogue-um/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-rogue-um/0001-all-drop-the-init-script.patch new file +19 -0
new file mode 100644
index 0000000000..4f3dd1cbb1
@@ -0,0 +1,832 @@
+From 99e0da8a1c08818c59680f726e11a84b26daf29f Mon Sep 17 00:00:00 2001
+From: Randolph Sapp <[email protected]>
+Date: Thu, 25 May 2023 18:59:26 -0500
+Subject: [PATCH] all: drop the init script
+
+Nobody should be using this anymore. It's sysVinit and it's just a fancy
+wrapper around modprobe anyway. We'll be dropping it from our build
+tools soon.
+
+Signed-off-by: Randolph Sapp <[email protected]>
+---
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
+ 4 files changed, 784 deletions(-)
+ delete mode 100755 targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755 targetfs/j721e_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755

targetfs/j721s2_linux/wayland/release/etc/init.d/rc.pvr
+ delete mode 100755 targetfs/j784s4_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +2 -0
+
+diff --git a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

b/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr

package/ti-rogue-um/0001-all-drop-the-init-script.patch new file +6 -0
+deleted file mode 100755
+index 428cd86..0000000
+--- a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
++++ /dev/null
+2.34.1
+
package/ti-rogue-um/Config.in new file +52 -0
new file mode 100644
index 0000000000..15257858c2
@@ -0,0 +1,52 @@
+comment "ti-rogue-um needs udev and a glibc toolchain w/ threads"
+       depends on BR2_aarch64
+       depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC \
+               || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_TI_ROGUE_UM
+       bool "ti-rogue-um"
+       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+       depends on BR2_PACKAGE_HAS_UDEV
+       # pre-built binaries
+       depends on BR2_TOOLCHAIN_USES_GLIBC
+       depends on BR2_aarch64
+       select BR2_PACKAGE_LIBDRM
+       select BR2_PACKAGE_HAS_LIBEGL
+       select BR2_PACKAGE_HAS_LIBGBM
+       select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
+       select BR2_PACKAGE_HAS_LIBGLES
+       select BR2_PACKAGE_HAS_POWERVR
+       select BR2_PACKAGE_LIBFFI
+       select BR2_PACKAGE_WAYLAND
+       select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
+       select BR2_PACKAGE_TI_ROGUE_KM if BR2_LINUX_KERNEL
+       help
+         Graphics libraries for TI SoCs with Rogue GPU.
+         This package supports AM62, J721E, J721S2, and J784S4
+         SoCs only.
+
+         https://git.ti.com/cgit/graphics/ti-img-rogue-umlibs
+
+if BR2_PACKAGE_TI_ROGUE_UM
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGBM
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+       default "ti-rogue-um"
+
+config BR2_PACKAGE_PROVIDES_POWERVR
+       default "ti-rogue-um"
+
+config BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT
+       string "UM driver target product"
+       default "am62_linux"
+       help
+         Select target product to be used for UM libraries. This needs to
+         match one of the SoC-specific folders within the root/targetfs
+         folder of the ti-img-rogue-umlibs Git repository.
+
+endif
package/ti-rogue-um/ti-rogue-um.hash new file +2 -0
new file mode 100644
index 0000000000..a41bf33145
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  2e1bd1a5ab0ad2db1b9164d028a94f8f9d20743131f337a817fd1c8f9ddd4cbe

ti-rogue-um-5977e82b96028f783d39c7219f016c1faf8dc5f5-br1.tar.gz +sha256 37507b462edf97b59717d2d144daaac85fbca6080c3602b5128e446e97f9ad47 LICENSE

package/ti-rogue-um/ renamed from package/ti-rogue-um/ti-rogue-um.mk +0 -0

ti-rogue-um.mk
new file mode 100644
index 0000000000..fa29638fa7

package/ti-rogue-um/ti-rogue-um.mk new file +9 -0
@@ -0,0 +1,38 @@
 
+################################################################################
+#
+# ti-rogue-um
+#
 
+################################################################################
+
+# This corresponds to SDK 08.06.00
+TI_ROGUE_UM_VERSION = 5977e82b96028f783d39c7219f016c1faf8dc5f5
+TI_ROGUE_UM_SITE =

https://git.ti.com/git/graphics/ti-img-rogue-umlibs.git

package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+TI_ROGUE_UM_SITE_METHOD = git
+TI_ROGUE_UM_LICENSE = TI TSPA License
+TI_ROGUE_UM_LICENSE_FILES = LICENSE
+TI_ROGUE_UM_INSTALL_STAGING = YES
Quoted 8 lines

package/ti-rogue-um/ti-rogue-um.mk line 17

Quoted 5 lines
package/ti-rogue-um/ti-rogue-um.mk new file +4 -0
+TI_ROGUE_UM_PROVIDES = libegl libgbm libgles powervr
+
+# ti-rogue-um is a egl/gles provider only if libdrm is installed
+TI_ROGUE_UM_DEPENDENCIES = libdrm wayland

useless built dependencies (nothing is built, blobs are copied), runtime dependencies in Config.in are enough.

Quoted 3 lines

Understood, will fix it. Btw this was a carry-over from package/ti-sgx-um/ti-sgx-um.mk which I used to model this new package after, so opportunity for improvement there as well...

I experimented with this today, and removing either libdrm _or_ wayland from TI_ROGUE_UM_DEPENDENCIES causes the build to fail in two different ways. Note that I'm using my "test defconfig" that turns on the following extras in configs/am62x_sk_defconfig...

+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_PACKAGE_PULSEAUDIO=y
+BR2_PACKAGE_CHOCOLATE_DOOM=y
+BR2_PACKAGE_DOOM_WAD=y
+BR2_PACKAGE_SDL2_KMSDRM=y
+BR2_PACKAGE_SDL2_OPENGLES=y
+BR2_PACKAGE_WESTON=y
+BR2_PACKAGE_ALSA_LIB=y

===Test 1: Removing libdrm===
<snip>
In file included from /home/a0797059/git/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/egl.h:39,

                 from cairo-gl.h:130,
                 from cairo-gl-private.h:51,
                 from cairo-gl-traps-compositor.c:44:
/home/a0797059/git/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:134:10: fatal error: X11/Xlib.h: No such file or directory
  134 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~

compilation terminated.
make[5]: *** [Makefile:2358: cairo-gl-shaders.lo] Error 1
make[5]: *** [Makefile:2358: cairo-gl-traps-compositor.lo] Error 1
make[4]: *** [Makefile:1955: all] Error 2
make[3]: *** [Makefile:910: all-recursive] Error 1
make[2]: *** [Makefile:761: all] Error 2
make[1]: *** [package/pkg-generic.mk:293: /home/a0797059/git/buildroot/output/build/cairo-1.16.0/.stamp_built] Error 2
make: *** [Makefile:82: _all] Error 2

===Test 2: Removing wayland===
<snip>
/home/a0797059/git/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/11.4.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/a0797059/git/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libEGL.so: undefined reference to `wl_display_roundtrip_queue' /home/a0797059/git/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/11.4.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/a0797059/git/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libEGL.so: undefined reference to `wl_proxy_marshal_constructor_versioned' /home/a0797059/git/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/11.4.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/a0797059/git/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libEGL.so: undefined reference to `wl_display_create_queue'
collect2: error: ld returned 1 exit status
make[6]: *** [Makefile:1795: cairo-test-suite] Error 1
make[5]: *** [Makefile:8375: all-recursive] Error 1
make[4]: *** [Makefile:1736: all] Error 2
make[3]: *** [Makefile:910: all-recursive] Error 1
make[2]: *** [Makefile:761: all] Error 2
make[1]: *** [package/pkg-generic.mk:293: /home/a0797059/git/buildroot/output/build/cairo-1.16.0/.stamp_built] Error 2
make: *** [Makefile:82: _all] Error 2

Note that for the tests I did a full build, starting out with a completely clean state (rm -rf output/* before the build).

With this finding, I'm inclined to leave TI_ROGUE_UM_DEPENDENCIES as I had it, unless there's a better way to deal with this build dependency?

Thanks, Andreas

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 53 lines
Quoted 12 lines

+

package/ti-rogue-um/ti-rogue-um.mk line 21

Quoted 4 lines
package/ti-rogue-um/ti-rogue-um.mk new file +3 -0
+PVR_BUILD = "release"
+PVR_WS = "wayland"
+
TI_ROGUE_UM_MAKE_OPTS = \
      TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
      BUILD=release \
      WINDOW_SYSTEM=wayland
Quoted 7 lines

define TI_ROGUE_UM_INSTALL_STAGING_CMDS

     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
          $(TI_ROGUE_UM_MAKE_OPTS) \
          DESTDIR=$(STAGING_DIR) \
          install

endef
by this way, all variables are prefixed by TI_ROGUE_UM_.

Good idea, will factor-out the make options. Thanks for taking the time to review & improve this patch.

--
Andreas Dannenberg
Texas Instruments Inc

Quoted 24 lines

François

Quoted 20 lines
package/ti-rogue-um/ti-rogue-um.mk new file +17 -1
+define TI_ROGUE_UM_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(STAGING_DIR) \
+               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+define TI_ROGUE_UM_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+               DESTDIR=$(TARGET_DIR) \
+               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
+               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
+               install
+endef
+
+$(eval $(generic-package))
--

2.34.1

Quoted 9 lines
Quoted 5 lines
Quoted 5 lines

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

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

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

#48 lore raw

Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package

In reply to François Perrad
Quoted 5 lines · On Fri, 23 Jun 2023 09:30:39 +0200 François Perrad <[email protected]>…

package/ti-rogue-um/ti-rogue-um.mk line 17

Quoted 2 lines
package/ti-rogue-um/ti-rogue-um.mk new file +2 -0
+# ti-rogue-um is a egl/gles provider only if libdrm is installed
+TI_ROGUE_UM_DEPENDENCIES = libdrm wayland

useless built dependencies (nothing is built, blobs are copied), runtime dependencies in Config.in are enough.

I haven't checked in detail, but these may in fact be build dependencies, and often are. If the ti-rogue-um package consists of closed-source user-space libraries that are linked against libdrm or libwayland, then libdrm and wayland indeed need to be build dependencies of ti-rogue-um. You're going to ask me: but why, if ti-rogue-um comes as pre-compiled binary blobs?

Because things that are going to link against ti-rogue-um will fail.

Typically:

qt5 -> libgles -> ti-rogue-um

When Qt5 will link against libOpenGLES.so provided by ti-rogue-um, if libdrm.so and libwayland.so are not available, that link stage will fail.

So libdrm and wayland are not just runtime dependencies. They are build-time dependencies.

We have the same situation with a number of other closed-source OpenGL implementations packaged in Buildroot (look at gcnano-binaries for example).

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#49 lore raw

PATCH v9 11/11 configs/am62x_sk_defconfig: enable IMG Rogue graphics driver

In reply to Andreas Dannenberg via buildroot

Enable the IMG Rogue graphics driver for use on SK-AM62 by enabling the ti-rogue-um package containing the usermode libraries, which in turn will enable the ti-rogue-km package with the Kernel driver. Furthermore BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is enabled for automatic Kernel module loading to allow loading the graphics driver (and others) during startup.

With this configuration a simple graphics test can be performed on the target platform by running 'rgx_triangle_test -pxfmt argb8888' from the commandline, showing rotating triangles on an HDMI-connected monitor.

Based on this basic graphics enablement, the Buildroot-included Weston and Chocolate Doom packages can now be enabled and run successfully. However since extending/adding features is heavily use-case dependent this task is left to follow-on commits or user-derived custom configs for now.

---
 configs/am62x_sk_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/am62x_sk_defconfig +2 -0
index 17855bc743..9dbc6adbf2 100644
@@ -1,5 +1,6 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
 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
@@ -12,6 +13,7 @@ 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_ROGUE_UM=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#50 lore raw
In reply to Andreas Dannenberg via buildroot
Quoted 25 lines · Andreas Dannenberg via buildroot

This series introduces support for TI's AM64x and AM62x SK boards.

This updated series introduces an additional package to abstract the signing process for TI K3 "high security" devices to enable a better out-of-box experience and has some other smaller improvements, see change log.

For more on the background and future plans of this overall effort please refer to the cover letter of PATCH v8, see [5].

Changes in v9:
- adds new ti-core-secdev-k3 package to manage they binary boot artifact signing as required on secure HS-FS and HS-SE device variants. With this the user no longer needs to provide the location of the underlying core-secdev-k3 TI tool through the TI_SECURE_DEV_PKG environmental variable using the extra step that was required in PATCH v8, enabling an easier out-of-box experience for "fresh" SK-AM62B / SK-AM64B TI boards which now all come with "HS-FS" devices. Note that once keys/certificates are programmed into an HS-FS device, effectively turning them into HS-SE devices, the user will then need to provide their private keys for signing which from our experience is best done through the TI_SECURE_DEV_PKG env variable, in analogy also with the TI Yocto-based SDK [4]. This is also the reason this package doesn't

Quoted 8 lines

introduce any hard dependencies at this time. Thanks François Perrad and Arnout Vandecappelle for feedback/suggestions here.
- added Kconfig multiple-choice support for picking the SoC security type (GP, HS-FS, and HS-SE) for better ease-of-use
- fixed an issue with the hash check for the ti-k3-r5-loader as identified by Patrick Oppenlander
- added Tested-by: Julien Olivain tag for build/boot testing the solution on an SK-AM64B board

Hi Andreas,

I have tested this on
* TI SK-AM64B board
* PHYTEC phyBOARD®-AM64x (GP silicon, different U-Boot verson).

I will post patches for the PHYTEC board once this is merged. Current version rebased on this patch set is at [1].

[1] https://github.com/relectrify/buildroot/commit/5b9a913022da50a80691baa3ba2f0105d0c7e5bf

Patrick

Quoted 165 lines

Changes in v8:
- extended to also include AM62 devices (somewhat similar device as AM64, but with graphics)
- added IMG Rogue graphics driver KM/UM packages supporting AM62 and other TI K3 platform devices
- uses U-Boot/Kernel/ATF/OPTEE and various device firmwares from TI's Processor SDK Linux v8.6 [2][3] to achieve a similar level of basic platform feature-completeness and quality as the official SDK
- supports SK-AM62B with AM62 HS-FS and SK-AM64B with AM64 HS-FS High Security device variants by default. The switch to HS-FS devices was made through follow-on commit to document in the Git history how this is done (also allowing somebody to unroll it for a quick test on a GP device). Note that this requires the TI_SECURE_DEV_PKG environmental variable to be defined at build time pointing to a valid core-secdev-k3 folder location, otherwise the build will fail.
- extended ti-k3-r5-loader package to allow for full build source customization
- extended the ti-k3-image-gen package to accommodate the different classes of device firmware types used on TI K3 SoC like AM62 (TIFS) vs. AM64 (TISCI). With this support any TI K3 device including AM65, AM68, AM69, J721E etc. should now be enabled by this package.
- extended the uboot package to allow building a Device Manager (DM) firmware into the U-Boot SPL image as required on certain TI K3 SoCs like AM62, AM62A, etc.
- incorporated Thomas Petazzoni's feedback into k3-image-gen. Also this package no longer downloads stuff during build (ugh!!), thanks to changes as proposed by François Perrad.
- incorporated some cleanup feedback on k3-image-gen from Julien Olivain such as missing hash on LICENSE file and a later image Generator Git tag is now used (that is matching the TISDK v8.6 baseline equivalent that is being implemented).
- improved wording/descriptions in the 'board/ti/am64x_sk: add new board' commit as suggested by Thomas Petazzoni. Did not make the change regarding explicitly specifying the Cortex-A53 core as it seems to be implied and is not emitted by 'make savedefconfig'. Also using a fixed version of OPTEE as per TI SDK v8.6 baseline addresses Thomas' the desire to build with a known-good version.

Changes in v7:
- changes per François Perrad's review comments

Changes in v6:
- rebased to latest next branch and retested
- updated u-boot and kernel to latest released versions as of today From Andrew's comments:
- added a new SOC_TYPE option for k3-image-gen, as requested by Andrew Davis in a review comment.
From Romain's comments:
- use "if" instead of "depends on" for sub-options
- move TI K3 R5 Loader defconfig selection to Kconfig
- use $(HOST_DIR) instead of $(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR)
- Retain Xuanhao's gmail ID in the MAINTAINERs file, but drop his TI email from CC list as it will be inactive till he rejoins TI
- Add a plain-text license file into the k3-image-gen repository and use it instead of the HTML manifest file. Confirmed that this is still BSD-3-Clause license.
- Add comments in the ti-k3-image-gen.mk file for a couple of options

Changes in v5:
- None (resubmission of Xuanhao's series)

Changes in v4:
- rebased to latest master and retested
- dropped OPTEE CUSTOM* options as we don't need them.

Changes in v3:
- Fix boot/ti-k3-r5-loader package's build options and dependencies.
- Fix boot/ti-k3-image-gen package's config
- Add more details in board/ti/am64x_sk's readme
- Trim configs/am64x_sk's toolchain options and
fix uboot and genimage dependencies.
- Remove board/ti/am62x_sk and configs/am62x_sk for now due to some firmware dependency problems. Will be added back in the future.

Changes in v2:
- Revert arm-gnu-toolchain back to version 10.x due to a bug. When the pre-packaged GCC was built, it could be targeting a newer x86_64 architecture than the processor being used.
- Add boot/ti-k3-r5-loader package that builds a separate U-Boot for the R5 cores on TI's K3 devices.
- Add boot/ti-k3-image-gen package that builds the full boot binary tiboot3.bin from the spl built from ti-k3-r5-loader.
- Add board/ti directory to include sdcard config and board information for AM64x_sk and AM62x_sk boards.
- Add the Buildroot defconfigs for AM64x_sk and AM62x_sk.
- Add to DEVELOPERS list.

[1] https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am64x-devices
[2] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM64X/08.06.00.42
[3] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62X/08.06.00.42
[4] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/linux/Overview_Building_the_SDK.html#build-steps
[5] https://lore.kernel.org/buildroot/20230618134308.p3ehslp5s2j36dqi@dasso/T/

Andreas Dannenberg (8):
boot/ti-k3-r5-loader: allow for full build source customization boot/uboot: add support for building the TI K3 DM into U-Boot board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources package/ti-core-secdev-k3: new package board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants package/ti-rogue-km: new package
package/ti-rogue-um: new package configs/am62x_sk_defconfig: enable IMG Rogue graphics driver

Xuanhao Shi (3):
boot/ti-k3-image-gen: new package
board/ti/am64x_sk: add new board
board/ti/am62x_sk: add new board

 DEVELOPERS                                    |   10 +
 board/ti/am62x_sk/genimage.cfg                |   27 +
 board/ti/am62x_sk/readme.txt                  |   26 +
 .../ti/am62x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am62x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 board/ti/am64x_sk/genimage.cfg                |   27 +
 board/ti/am64x_sk/readme.txt                  |   26 +
 .../ti/am64x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am64x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 boot/Config.in                                |    1 +
 boot/ti-k3-image-gen/Config.in                |   57 +
 boot/ti-k3-image-gen/ti-k3-image-gen.hash     |   17 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       |   91 +
 boot/ti-k3-r5-loader/Config.in                |   65 +-
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       |   42 +-
 boot/uboot/Config.in                          |   17 +
 boot/uboot/uboot.mk                           |   26 +
 configs/am62x_sk_defconfig                    |   56 +
 configs/am64x_sk_defconfig                    |   53 +
 package/Config.in                             |    2 +
 package/Config.in.host                        |    1 +
 package/ti-core-secdev-k3/Config.in.host      |   11 +
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |    3 +
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    |   31 +
 package/ti-rogue-km/Config.in                 |   28 +
 package/ti-rogue-km/ti-rogue-km.hash          |    3 +
 package/ti-rogue-km/ti-rogue-km.mk            |   37 +
 .../0001-all-drop-the-init-script.patch       |  832 +++++++
 package/ti-rogue-um/Config.in                 |   52 +
 package/ti-rogue-um/ti-rogue-um.hash          |    3 +
 package/ti-rogue-um/ti-rogue-um.mk            |   38 +
 31 files changed, 9348 insertions(+), 4 deletions(-)
 create mode 100644 board/ti/am62x_sk/genimage.cfg
 create mode 100644 board/ti/am62x_sk/readme.txt
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_release_defconfig
 create mode 100644 board/ti/am64x_sk/genimage.cfg
 create mode 100644 board/ti/am64x_sk/readme.txt
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_release_defconfig
 create mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
 create mode 100644 configs/am62x_sk_defconfig
 create mode 100644 configs/am64x_sk_defconfig
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
 create mode 100644 package/ti-rogue-km/Config.in
 create mode 100644 package/ti-rogue-km/ti-rogue-km.hash
 create mode 100644 package/ti-rogue-km/ti-rogue-km.mk
 create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
Quoted 7 lines

--
2.34.1

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

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

#51 lore raw

Hi Patrick,

Quoted 38 lines · Patrick Oppenlander
Quoted 25 lines · Andreas Dannenberg via buildroot

This series introduces support for TI's AM64x and AM62x SK boards.

This updated series introduces an additional package to abstract the signing process for TI K3 "high security" devices to enable a better out-of-box experience and has some other smaller improvements, see change log.

For more on the background and future plans of this overall effort please refer to the cover letter of PATCH v8, see [5].

Changes in v9:
- adds new ti-core-secdev-k3 package to manage they binary boot artifact signing as required on secure HS-FS and HS-SE device variants. With this the user no longer needs to provide the location of the underlying core-secdev-k3 TI tool through the TI_SECURE_DEV_PKG environmental variable using the extra step that was required in PATCH v8, enabling an easier out-of-box experience for "fresh" SK-AM62B / SK-AM64B TI boards which now all come with "HS-FS" devices. Note that once keys/certificates are programmed into an HS-FS device, effectively turning them into HS-SE devices, the user will then need to provide their private keys for signing which from our experience is best done through the TI_SECURE_DEV_PKG env variable, in analogy also with the TI Yocto-based SDK [4]. This is also the reason this package doesn't

Quoted 8 lines

introduce any hard dependencies at this time. Thanks François Perrad and Arnout Vandecappelle for feedback/suggestions here.
- added Kconfig multiple-choice support for picking the SoC security type (GP, HS-FS, and HS-SE) for better ease-of-use
- fixed an issue with the hash check for the ti-k3-r5-loader as identified by Patrick Oppenlander
- added Tested-by: Julien Olivain tag for build/boot testing the solution on an SK-AM64B board

Hi Andreas,

Quoted 8 lines

I have tested this on
* TI SK-AM64B board
* PHYTEC phyBOARD®-AM64x (GP silicon, different U-Boot verson).

I will post patches for the PHYTEC board once this is merged. Current version rebased on this patch set is at [1].

[1] https://github.com/relectrify/buildroot/commit/5b9a913022da50a80691baa3ba2f0105d0c7e5bf

I'm excited to see the enthusiasm already wanting to add additional boards!!! And glad to see you seem to be able to easily switch between GP and HS-FS device variants. This is something that currently gives us headache with our Yocto-based SDKs (TI SDK v8.5, v8.6), that dropped support for GP devices for the out-of-the-box image builds/demos (you can still run those on GP but is a real struggle, and takes away from the "ease of use" experience).

So I always keep telling folks internally in Buildroot we can just make this a simple Kconfig option and we are done with it. You are proof it is working ;)

Regards, Andreas

Quoted 175 lines

Patrick

Quoted 172 lines

Changes in v8:
- extended to also include AM62 devices (somewhat similar device as AM64, but with graphics)
- added IMG Rogue graphics driver KM/UM packages supporting AM62 and other TI K3 platform devices
- uses U-Boot/Kernel/ATF/OPTEE and various device firmwares from TI's Processor SDK Linux v8.6 [2][3] to achieve a similar level of basic platform feature-completeness and quality as the official SDK
- supports SK-AM62B with AM62 HS-FS and SK-AM64B with AM64 HS-FS High Security device variants by default. The switch to HS-FS devices was made through follow-on commit to document in the Git history how this is done (also allowing somebody to unroll it for a quick test on a GP device). Note that this requires the TI_SECURE_DEV_PKG environmental variable to be defined at build time pointing to a valid core-secdev-k3 folder location, otherwise the build will fail.
- extended ti-k3-r5-loader package to allow for full build source customization
- extended the ti-k3-image-gen package to accommodate the different classes of device firmware types used on TI K3 SoC like AM62 (TIFS) vs. AM64 (TISCI). With this support any TI K3 device including AM65, AM68, AM69, J721E etc. should now be enabled by this package.
- extended the uboot package to allow building a Device Manager (DM) firmware into the U-Boot SPL image as required on certain TI K3 SoCs like AM62, AM62A, etc.
- incorporated Thomas Petazzoni's feedback into k3-image-gen. Also this package no longer downloads stuff during build (ugh!!), thanks to changes as proposed by François Perrad.
- incorporated some cleanup feedback on k3-image-gen from Julien Olivain such as missing hash on LICENSE file and a later image Generator Git tag is now used (that is matching the TISDK v8.6 baseline equivalent that is being implemented).
- improved wording/descriptions in the 'board/ti/am64x_sk: add new board' commit as suggested by Thomas Petazzoni. Did not make the change regarding explicitly specifying the Cortex-A53 core as it seems to be implied and is not emitted by 'make savedefconfig'. Also using a fixed version of OPTEE as per TI SDK v8.6 baseline addresses Thomas' the desire to build with a known-good version.

Changes in v7:
- changes per François Perrad's review comments

Changes in v6:
- rebased to latest next branch and retested
- updated u-boot and kernel to latest released versions as of today From Andrew's comments:
- added a new SOC_TYPE option for k3-image-gen, as requested by Andrew Davis in a review comment.
From Romain's comments:
- use "if" instead of "depends on" for sub-options
- move TI K3 R5 Loader defconfig selection to Kconfig
- use $(HOST_DIR) instead of $(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR)
- Retain Xuanhao's gmail ID in the MAINTAINERs file, but drop his TI email from CC list as it will be inactive till he rejoins TI
- Add a plain-text license file into the k3-image-gen repository and use it instead of the HTML manifest file. Confirmed that this is still BSD-3-Clause license.
- Add comments in the ti-k3-image-gen.mk file for a couple of options

Changes in v5:
- None (resubmission of Xuanhao's series)

Changes in v4:
- rebased to latest master and retested
- dropped OPTEE CUSTOM* options as we don't need them.

Changes in v3:
- Fix boot/ti-k3-r5-loader package's build options and dependencies.
- Fix boot/ti-k3-image-gen package's config
- Add more details in board/ti/am64x_sk's readme
- Trim configs/am64x_sk's toolchain options and
fix uboot and genimage dependencies.
- Remove board/ti/am62x_sk and configs/am62x_sk for now due to some firmware dependency problems. Will be added back in the future.

Changes in v2:
- Revert arm-gnu-toolchain back to version 10.x due to a bug. When the pre-packaged GCC was built, it could be targeting a newer x86_64 architecture than the processor being used.
- Add boot/ti-k3-r5-loader package that builds a separate U-Boot for the R5 cores on TI's K3 devices.
- Add boot/ti-k3-image-gen package that builds the full boot binary tiboot3.bin from the spl built from ti-k3-r5-loader.
- Add board/ti directory to include sdcard config and board information for AM64x_sk and AM62x_sk boards.
- Add the Buildroot defconfigs for AM64x_sk and AM62x_sk.
- Add to DEVELOPERS list.

[1] https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am64x-devices
[2] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM64X/08.06.00.42
[3] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62X/08.06.00.42
[4] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/linux/Overview_Building_the_SDK.html#build-steps
[5] https://lore.kernel.org/buildroot/20230618134308.p3ehslp5s2j36dqi@dasso/T/

Andreas Dannenberg (8):
boot/ti-k3-r5-loader: allow for full build source customization boot/uboot: add support for building the TI K3 DM into U-Boot board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources package/ti-core-secdev-k3: new package board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants package/ti-rogue-km: new package
package/ti-rogue-um: new package configs/am62x_sk_defconfig: enable IMG Rogue graphics driver

Xuanhao Shi (3):
boot/ti-k3-image-gen: new package
board/ti/am64x_sk: add new board
board/ti/am62x_sk: add new board

 DEVELOPERS                                    |   10 +
 board/ti/am62x_sk/genimage.cfg                |   27 +
 board/ti/am62x_sk/readme.txt                  |   26 +
 .../ti/am62x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am62x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 board/ti/am64x_sk/genimage.cfg                |   27 +
 board/ti/am64x_sk/readme.txt                  |   26 +
 .../ti/am64x_sk/ti_sdk_arm64_debug_defconfig  | 1991 +++++++++++++++++
 .../am64x_sk/ti_sdk_arm64_release_defconfig   | 1894 ++++++++++++++++
 boot/Config.in                                |    1 +
 boot/ti-k3-image-gen/Config.in                |   57 +
 boot/ti-k3-image-gen/ti-k3-image-gen.hash     |   17 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       |   91 +
 boot/ti-k3-r5-loader/Config.in                |   65 +-
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       |   42 +-
 boot/uboot/Config.in                          |   17 +
 boot/uboot/uboot.mk                           |   26 +
 configs/am62x_sk_defconfig                    |   56 +
 configs/am64x_sk_defconfig                    |   53 +
 package/Config.in                             |    2 +
 package/Config.in.host                        |    1 +
 package/ti-core-secdev-k3/Config.in.host      |   11 +
 .../ti-core-secdev-k3/ti-core-secdev-k3.hash  |    3 +
 .../ti-core-secdev-k3/ti-core-secdev-k3.mk    |   31 +
 package/ti-rogue-km/Config.in                 |   28 +
 package/ti-rogue-km/ti-rogue-km.hash          |    3 +
 package/ti-rogue-km/ti-rogue-km.mk            |   37 +
 .../0001-all-drop-the-init-script.patch       |  832 +++++++
 package/ti-rogue-um/Config.in                 |   52 +
 package/ti-rogue-um/ti-rogue-um.hash          |    3 +
 package/ti-rogue-um/ti-rogue-um.mk            |   38 +
 31 files changed, 9348 insertions(+), 4 deletions(-)
 create mode 100644 board/ti/am62x_sk/genimage.cfg
 create mode 100644 board/ti/am62x_sk/readme.txt
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_release_defconfig
 create mode 100644 board/ti/am64x_sk/genimage.cfg
 create mode 100644 board/ti/am64x_sk/readme.txt
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_debug_defconfig
 create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_release_defconfig
 create mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
 create mode 100644 configs/am62x_sk_defconfig
 create mode 100644 configs/am64x_sk_defconfig
 create mode 100644 package/ti-core-secdev-k3/Config.in.host
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash
 create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk
 create mode 100644 package/ti-rogue-km/Config.in
 create mode 100644 package/ti-rogue-km/ti-rogue-km.hash
 create mode 100644 package/ti-rogue-km/ti-rogue-km.mk
 create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
 create mode 100644 package/ti-rogue-um/Config.in
 create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
 create mode 100644 package/ti-rogue-um/ti-rogue-um.mk

--
2.34.1

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

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

#52 lore raw
In reply to Andreas Dannenberg via buildroot

Hello Andreas,

Quoted 10 lines · On Thu, 22 Jun 2023 11:02:01 -0500 Andreas Dannenberg via buildroot…

Andreas Dannenberg (8):
boot/ti-k3-r5-loader: allow for full build source customization boot/uboot: add support for building the TI K3 DM into U-Boot board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources package/ti-core-secdev-k3: new package board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants package/ti-rogue-km: new package
package/ti-rogue-um: new package configs/am62x_sk_defconfig: enable IMG Rogue graphics driver

Quoted 4 lines

Xuanhao Shi (3):
boot/ti-k3-image-gen: new package
board/ti/am64x_sk: add new board
board/ti/am62x_sk: add new board

So, I have just merged the first 5 patches of this series... but actually in its v8 iteration because the v8 is the one that was still pending in patchwork, and I realize only now that there was a v9. How well, too late, I already pushed to our next branch, so any additional change will have to be done on top of what's in the next branch.

I'll therefore reply to the v8 patches that I have merged and explain the numerous changes I did.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#53 lore raw

Hello Andreas,

Quoted 8 lines · On Tue, 22 Aug 2023 12:14:07 +0200 Thomas Petazzoni via buildroot…

So, I have just merged the first 5 patches of this series... but actually in its v8 iteration because the v8 is the one that was still pending in patchwork, and I realize only now that there was a v9. How well, too late, I already pushed to our next branch, so any additional change will have to be done on top of what's in the next branch.

I'll therefore reply to the v8 patches that I have merged and explain the numerous changes I did.

Now that I have merged the first chunk of your v8. Could you rebase the remaining commits of your v9 on top of the latest next branch, take into account the comments received, and submit an updated v10, so that we can move forward with AM62/AM64 support?

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot