[v10,00/12] Add support for AM62x-SK HS-FS devices
mbox series

Message ID 20240330160244.3214733-1-dario.binacchi@amarulasolutions.com
Headers show
Series
  • Add support for AM62x-SK HS-FS devices
Related show

Message

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

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

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

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

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

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

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

Comments

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

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

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

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

~Bryan
Romain Naour April 3, 2024, 9:17 a.m. UTC | #2
Hello Dario, All,

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

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

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

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

Best regards,
Romain

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

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

Great, thanks!

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

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

-michael