mbox series

[v9,00/11] add support for TI's AM64x and AM62x boards

Message ID 20230622160212.2063472-1-dannenberg@ti.com
Headers show
Series add support for TI's AM64x and AM62x boards | expand

Message

Andreas Dannenberg June 22, 2023, 4:02 p.m. UTC
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

Comments

Patrick Oppenlander June 23, 2023, 4:02 a.m. UTC | #1
On Fri, Jun 23, 2023 at 2:08 AM Andreas Dannenberg via buildroot
<buildroot@buildroot.org> wrote:
>
> 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

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

> 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
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Andreas Dannenberg June 23, 2023, 3:04 p.m. UTC | #2
Hi Patrick,

On Fri, Jun 23, 2023 at 02:02:17PM +1000, Patrick Oppenlander wrote:
> On Fri, Jun 23, 2023 at 2:08 AM Andreas Dannenberg via buildroot
> <buildroot@buildroot.org> wrote:
> >
> > 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
> 
> 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

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

> 
> Patrick
> 
> > 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
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni Aug. 22, 2023, 10:14 a.m. UTC | #3
Hello Andreas,

On Thu, 22 Jun 2023 11:02:01 -0500
Andreas Dannenberg via buildroot <buildroot@buildroot.org> wrote:

> 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

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
Thomas Petazzoni Aug. 22, 2023, 6:05 p.m. UTC | #4
Hello Andreas,

On Tue, 22 Aug 2023 12:14:07 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> 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