mbox series

[00/21] Add ti_j721e_sk_defconfig

Message ID 20240213172817.2872849-1-romain.naour@smile.fr
Headers show
Series Add ti_j721e_sk_defconfig | expand

Message

Romain Naour Feb. 13, 2024, 5:27 p.m. UTC
This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.

This series start by adding U-boot binman support already submitted in the
preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
[1], with small improvements.
See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]

With binman support, we can add the TI K3 j721e SoC support by
providing all required firmware generated by the build.

Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
boot the board (serial debug and ethernet working).

Thanks to binman support, we can remove the ti-k3-image-gen tool from
Buildroot. To do that, we have to update existing defconfig (am62, am64).

Followup commits can improve TI K3 HS-FS devices based on binman instead
of legacy core-secdev-k3 tool.

[1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
[2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf

Best regards,
Romain

Dario Binacchi (5):
  package/python-attrs: add host variant
  package/python-rpds-py: add host variant
  package/python-referencing: add host variant
  package/python-jsonschema-specifications: add host variant
  package/python-jsonschema: add host variant

Romain Naour (16):
  DEVELOPERS: add Romain Naour for am574x_idk_defconfig
  configs/ti_am62x_sk_defconfig: fix optee-os plateform
  configs/ti_am64x_sk_defconfig: fix optee-os plateform
  boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
  boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
  boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
    BINARIES_DIR
  boot/ti-k3-boot-firmware: introduce
    BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
  boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
    package
  boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
  boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
  boot/uboot: enable TI K3 Device Manager (DM) for j721e
  boot/ti-k3-boot-firmware: bump to version 09.02.00.004
  configs/ti_j721e_sk_defconfig: new defconfig
  configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
    tool
  configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
    tool
  boot/ti-k3-image-gen: remove package

 Config.in.legacy                              |  7 ++
 DEVELOPERS                                    |  6 +-
 board/ti/j721e-sk/genimage.cfg                | 28 +++++++
 board/ti/j721e-sk/post-build.sh               | 16 ++++
 board/ti/j721e-sk/readme.txt                  | 34 ++++++++
 boot/Config.in                                |  1 -
 boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
 .../ti-k3-boot-firmware.hash                  |  2 +-
 .../ti-k3-boot-firmware.mk                    | 16 ++--
 boot/ti-k3-image-gen/Config.in                | 77 -------------------
 boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
 boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
 boot/ti-k3-r5-loader/Config.in                |  8 ++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
 boot/uboot/Config.in                          | 27 ++++---
 boot/uboot/uboot.mk                           | 10 ++-
 configs/ti_am62x_sk_defconfig                 | 14 ++--
 configs/ti_am64x_sk_defconfig                 | 14 ++--
 ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
 package/python-attrs/python-attrs.mk          |  6 ++
 .../python-jsonschema-specifications.mk       | 10 +++
 .../python-jsonschema/python-jsonschema.mk    | 14 ++++
 .../python-referencing/python-referencing.mk  | 11 +++
 package/python-rpds-py/python-rpds-py.mk      |  1 +
 24 files changed, 275 insertions(+), 180 deletions(-)
 create mode 100644 board/ti/j721e-sk/genimage.cfg
 create mode 100755 board/ti/j721e-sk/post-build.sh
 create mode 100644 board/ti/j721e-sk/readme.txt
 delete mode 100644 boot/ti-k3-image-gen/Config.in
 delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
 copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)

--
2.43.0

Comments

Alexander Sverdlin Feb. 15, 2024, 10:13 a.m. UTC | #1
Hi Romain,

On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
> > This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> > 
> > This series start by adding U-boot binman support already submitted in the
> > preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> > [1], with small improvements.
> > See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > 
> > With binman support, we can add the TI K3 j721e SoC support by
> > providing all required firmware generated by the build.
> > 
> > Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> > boot the board (serial debug and ethernet working).
> > 
> > Thanks to binman support, we can remove the ti-k3-image-gen tool from
> > Buildroot. To do that, we have to update existing defconfig (am62, am64).
> > 
> > Followup commits can improve TI K3 HS-FS devices based on binman instead
> > of legacy core-secdev-k3 tool.
> > 
> > [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> > [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> > 
> > Best regards,
> > Romain

I have mixed feelings after testing the patchset on SK-AM62B...
It doesn't quite boot, refer to the boot log [1].
Seems that U-Boot env is missing, maybe I'm missing some installation
step, but I do not see it mentioned in the documetation (for instance
of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").

I'm not sure if this is a result of U-Boot update or if the current
master is broken as well. I'll be retesting it today and will get back to
you.

Fortunately this patchset is actually about building the images differently
and this part actually went smoothly, which is good.

> > Dario Binacchi (5):
> >   package/python-attrs: add host variant
> >   package/python-rpds-py: add host variant
> >   package/python-referencing: add host variant
> >   package/python-jsonschema-specifications: add host variant
> >   package/python-jsonschema: add host variant
> > 
> > Romain Naour (16):
> >   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
> >   configs/ti_am62x_sk_defconfig: fix optee-os plateform
> >   configs/ti_am64x_sk_defconfig: fix optee-os plateform
> >   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
> >   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> >   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
> >     BINARIES_DIR
> >   boot/ti-k3-boot-firmware: introduce
> >     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
> >   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
> >     package
> >   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
> >   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
> >   boot/uboot: enable TI K3 Device Manager (DM) for j721e
> >   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
> >   configs/ti_j721e_sk_defconfig: new defconfig
> >   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
> >     tool
> >   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
> >     tool
> >   boot/ti-k3-image-gen: remove package
> > 
> >  Config.in.legacy                              |  7 ++
> >  DEVELOPERS                                    |  6 +-
> >  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
> >  board/ti/j721e-sk/post-build.sh               | 16 ++++
> >  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
> >  boot/Config.in                                |  1 -
> >  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
> >  .../ti-k3-boot-firmware.hash                  |  2 +-
> >  .../ti-k3-boot-firmware.mk                    | 16 ++--
> >  boot/ti-k3-image-gen/Config.in                | 77 -------------------
> >  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
> >  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
> >  boot/ti-k3-r5-loader/Config.in                |  8 ++
> >  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
> >  boot/uboot/Config.in                          | 27 ++++---
> >  boot/uboot/uboot.mk                           | 10 ++-
> >  configs/ti_am62x_sk_defconfig                 | 14 ++--
> >  configs/ti_am64x_sk_defconfig                 | 14 ++--
> >  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
> >  package/python-attrs/python-attrs.mk          |  6 ++
> >  .../python-jsonschema-specifications.mk       | 10 +++
> >  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
> >  .../python-referencing/python-referencing.mk  | 11 +++
> >  package/python-rpds-py/python-rpds-py.mk      |  1 +
> >  24 files changed, 275 insertions(+), 180 deletions(-)
> >  create mode 100644 board/ti/j721e-sk/genimage.cfg
> >  create mode 100755 board/ti/j721e-sk/post-build.sh
> >  create mode 100644 board/ti/j721e-sk/readme.txt
> >  delete mode 100644 boot/ti-k3-image-gen/Config.in
> >  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
> >  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> >  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> > 
> > --
> > 2.43.0
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot

1. Boot log:

U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
SPL initial stack usage: 13400 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.10.0  (release):v2.10
NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
I/TC: 
I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
I/TC: HUK Initialized
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: SA2UL TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
SPL initial stack usage: 1872 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed


U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
DRAM:  2 GiB
Core:  56 devices, 23 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1 is current device
SD/MMC found on device 1
Failed to load 'uEnv.txt'
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev 'mmc@fa00000.bootdev':
Scanning bootdev 'mmc@fa10000.bootdev':
Unknown uclass 'usb' in label
link up on port 1, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
Romain Naour Feb. 15, 2024, 11:23 a.m. UTC | #2
Hi Alexander,

Le 15/02/2024 à 11:13, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
>>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
>>>
>>> This series start by adding U-boot binman support already submitted in the
>>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
>>> [1], with small improvements.
>>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
>>>
>>> With binman support, we can add the TI K3 j721e SoC support by
>>> providing all required firmware generated by the build.
>>>
>>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
>>> boot the board (serial debug and ethernet working).
>>>
>>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
>>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
>>>
>>> Followup commits can improve TI K3 HS-FS devices based on binman instead
>>> of legacy core-secdev-k3 tool.
>>>
>>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
>>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
>>>
>>> Best regards,
>>> Romain
> 
> I have mixed feelings after testing the patchset on SK-AM62B...
> It doesn't quite boot, refer to the boot log [1].
> Seems that U-Boot env is missing, maybe I'm missing some installation
> step, but I do not see it mentioned in the documetation (for instance
> of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").
> 
> I'm not sure if this is a result of U-Boot update or if the current
> master is broken as well. I'll be retesting it today and will get back to
> you.

It seems you are testing on a HS-FS device "AM62X SR1.0 HS-FS" while I only
runtime tested this series on a SK-TDA4VM (GP: general pupose).

Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
customize the image generated in a post-build script?

Maybe you have to replace the tiboot3.bin binary included by genimage with the
one for the HS-FS variant ?

for j721e:
    285449 13 févr. 17:27 tiboot3.bin
    285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
    286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
    286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin

for am62x:
    tiboot3.bin << should be the gp variant by default
    tiboot3-am62x-gp-evm.bin
    tiboot3-am62x-hs-fs-evm.bin

Also, did you have the ti-k3-core-secdev package locally, it seems it's required
for HS-FS SoC but the package is currently missing:

http://lists.busybox.net/pipermail/buildroot/2024-February/685383.html

Is ti-k3-core-secdev really required fllowing the switch to binman?
(binman should sign all firmware binaries itself).

> 
> Fortunately this patchset is actually about building the images differently
> and this part actually went smoothly, which is good.

Thank you for testing, it help a lot!

Maybe something is missing in this series to handle HS-FS device properly.

> 
>>> Dario Binacchi (5):
>>>   package/python-attrs: add host variant
>>>   package/python-rpds-py: add host variant
>>>   package/python-referencing: add host variant
>>>   package/python-jsonschema-specifications: add host variant
>>>   package/python-jsonschema: add host variant
>>>
>>> Romain Naour (16):
>>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>>>     BINARIES_DIR
>>>   boot/ti-k3-boot-firmware: introduce
>>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>>>     package
>>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>>>   configs/ti_j721e_sk_defconfig: new defconfig
>>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>>>     tool
>>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>>>     tool
>>>   boot/ti-k3-image-gen: remove package
>>>
>>>  Config.in.legacy                              |  7 ++
>>>  DEVELOPERS                                    |  6 +-
>>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>>>  boot/Config.in                                |  1 -
>>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>>>  .../ti-k3-boot-firmware.hash                  |  2 +-
>>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>>>  boot/uboot/Config.in                          | 27 ++++---
>>>  boot/uboot/uboot.mk                           | 10 ++-
>>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>>>  package/python-attrs/python-attrs.mk          |  6 ++
>>>  .../python-jsonschema-specifications.mk       | 10 +++
>>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>>>  .../python-referencing/python-referencing.mk  | 11 +++
>>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>>>  24 files changed, 275 insertions(+), 180 deletions(-)
>>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>>>  create mode 100755 board/ti/j721e-sk/post-build.sh
>>>  create mode 100644 board/ti/j721e-sk/readme.txt
>>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
>>>
>>> --
>>> 2.43.0
>>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot@buildroot.org
>>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
> 1. Boot log:
> 
> U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> SPL initial stack usage: 13400 bytes
> Trying to boot from MMC2
> Authentication passed
> Authentication passed
> Authentication passed
> Authentication passed
> Authentication passed
> Starting ATF on ARM64 core...
> 
> NOTICE:  BL31: v2.10.0  (release):v2.10
> NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
> I/TC: 
> I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
> I/TC: WARNING: This OP-TEE configuration might be insecure!
> I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
> I/TC: Primary CPU initializing
> I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> I/TC: HUK Initialized
> I/TC: Activated SA2UL device
> I/TC: Enabled firewalls for SA2UL TRNG device
> I/TC: SA2UL TRNG initialized
> I/TC: SA2UL Drivers initialized
> I/TC: Primary CPU switching to normal world boot
> 
> U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> SPL initial stack usage: 1872 bytes
> Trying to boot from MMC2
> Authentication passed
> Authentication passed
> 
> 
> U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> 
> SoC:   AM62X SR1.0 HS-FS
> Model: Texas Instruments AM625 SK
> DRAM:  2 GiB
> Core:  56 devices, 23 uclasses, devicetree: separate
> MMC:   mmc@fa10000: 0, mmc@fa00000: 1
> Loading Environment from nowhere... OK
> In:    serial@2800000
> Out:   serial@2800000
> Err:   serial@2800000
> Net:   eth0: ethernet@8000000port@1
> Hit any key to stop autoboot:  0 
> switch to partitions #0, OK
> mmc1 is current device
> SD/MMC found on device 1
> Failed to load 'uEnv.txt'

Can you access to the mmc1 content manually ?
I had to create a symlink due to "dtb" subdirectory expected by u-boot
u-boot is looking at /boot/dtb/ti for devicetree.

Best regards,
Romain


> Scanning for bootflows in all bootdevs
> Seq  Method       State   Uclass    Part  Name                      Filename
> ---  -----------  ------  --------  ----  ------------------------  ----------------
> Scanning global bootmeth 'efi_mgr':
> No EFI system partition
> No EFI system partition
> Failed to persist EFI variables
> Scanning bootdev 'mmc@fa00000.bootdev':
> Scanning bootdev 'mmc@fa10000.bootdev':
> Unknown uclass 'usb' in label
> link up on port 1, speed 100, full duplex
> BOOTP broadcast 1
> BOOTP broadcast 2
> BOOTP broadcast 3
> BOOTP broadcast 4
> BOOTP broadcast 5
> BOOTP broadcast 6
> BOOTP broadcast 7
> BOOTP broadcast 8
> BOOTP broadcast 9
> BOOTP broadcast 10
> BOOTP broadcast 11
> BOOTP broadcast 12
> BOOTP broadcast 13
> BOOTP broadcast 14
> BOOTP broadcast 15
> BOOTP broadcast 16
> BOOTP broadcast 17
> 
> Retry time exceeded; starting again
> 
> 
>
Alexander Sverdlin Feb. 15, 2024, 9:14 p.m. UTC | #3
Hi Romain,

On Thu, 2024-02-15 at 12:23 +0100, Romain Naour wrote:
> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
> customize the image generated in a post-build script?
> 
> Maybe you have to replace the tiboot3.bin binary included by genimage with the
> one for the HS-FS variant ?
> 
> for j721e:
>     285449 13 févr. 17:27 tiboot3.bin
>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
> 
> for am62x:
>     tiboot3.bin << should be the gp variant by default
>     tiboot3-am62x-gp-evm.bin
>     tiboot3-am62x-hs-fs-evm.bin

That's not the case any more, after
make clean; make ti_am62x_sk_defconfig; make

I get:

 images]$ ls -l
...
-rw-r--r-- 1 ...    282545 Feb 15 21:24 tiboot3-am62x-gp-evm.bin
-rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-evm.bin
-rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-fs-evm.bin
-rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3.bin

But, well, this seems to be an upstream change in U-Boot.

However, there seems to be no alternative to

BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE, after removal of 
boot/ti-k3-image-gen package. People with SK-AM62 will find
their boards silently broken (GP variants).
Romain Naour Feb. 15, 2024, 10:13 p.m. UTC | #4
Hello Alexander,

Le 15/02/2024 à 22:14, Alexander Sverdlin a écrit :
> Hi Romain,
> 
> On Thu, 2024-02-15 at 12:23 +0100, Romain Naour wrote:
>> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
>> customize the image generated in a post-build script?
>>
>> Maybe you have to replace the tiboot3.bin binary included by genimage with the
>> one for the HS-FS variant ?
>>
>> for j721e:
>>     285449 13 févr. 17:27 tiboot3.bin
>>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
>>
>> for am62x:
>>     tiboot3.bin << should be the gp variant by default
>>     tiboot3-am62x-gp-evm.bin
>>     tiboot3-am62x-hs-fs-evm.bin
> 
> That's not the case any more, after
> make clean; make ti_am62x_sk_defconfig; make
> 
> I get:
> 
>  images]$ ls -l
> ...
> -rw-r--r-- 1 ...    282545 Feb 15 21:24 tiboot3-am62x-gp-evm.bin
> -rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-evm.bin
> -rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3-am62x-hs-fs-evm.bin
> -rw-r--r-- 1 ...    285134 Feb 15 21:24 tiboot3.bin
> 
> But, well, this seems to be an upstream change in U-Boot.

Good catch!

Indeed, there is an inconsistency between K3 SoC support in binman, the j721e by
default is GP while other are hs-fs.

It seems related to *-binman.dtsi file (notice were is placed the property
symlink = "tiboot3.bin";)

&binman {
	tiboot3-am62x-hs-fs-evm.bin {
		filename = "tiboot3-am62x-hs-fs-evm.bin";
		symlink = "tiboot3.bin";

https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/arch/arm/dts/k3-am625-sk-binman.dtsi?ref_type=tags#L58

&binman {
	tiboot3-am64x_sr2-hs-fs-evm.bin {
		filename = "tiboot3-am64x_sr2-hs-fs-evm.bin";
		symlink = "tiboot3.bin";


https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/arch/arm/dts/k3-am64x-binman.dtsi?ref_type=tags#L50

&binman {
	tiboot3-j721e-gp-evm.bin {
		filename = "tiboot3-j721e-gp-evm.bin";
		symlink = "tiboot3.bin";

https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/arch/arm/dts/k3-j721e-binman.dtsi?ref_type=tags#L210

Maybe it would be a good idea to ignore the symlink created by uboot and create
the symlink ourself in BINARIES_DIR.

> 
> However, there seems to be no alternative to
> 
> BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE, after removal of 
> boot/ti-k3-image-gen package. People with SK-AM62 will find
> their boards silently broken (GP variants).
> 

What about BR2_TARGET_TI_K3_R5_LOADER_SECTYPE option to select the default
tiboot3.bin (and sysfw.itb if any)?

Best regards,
Romain
Alexander Sverdlin Feb. 15, 2024, 10:22 p.m. UTC | #5
Hi Romain,

On Thu, 2024-02-15 at 23:13 +0100, Romain Naour wrote:
> Maybe it would be a good idea to ignore the symlink created by uboot and create
> the symlink ourself in BINARIES_DIR.
> 
> > 
> > However, there seems to be no alternative to
> > 
> > BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE, after removal of 
> > boot/ti-k3-image-gen package. People with SK-AM62 will find
> > their boards silently broken (GP variants).
> > 
> 
> What about BR2_TARGET_TI_K3_R5_LOADER_SECTYPE option to select the default
> tiboot3.bin (and sysfw.itb if any)?

Makes sense to me.
Andreas Dannenberg Feb. 16, 2024, 8:13 p.m. UTC | #6
On Thu, Feb 15, 2024 at 12:23:21PM +0100, Romain Naour wrote:
> Hi Alexander,
> 
> Le 15/02/2024 à 11:13, Alexander Sverdlin a écrit :
> > Hi Romain,
> > 
> > On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
> >>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> >>>
> >>> This series start by adding U-boot binman support already submitted in the
> >>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> >>> [1], with small improvements.
> >>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> >>>
> >>> With binman support, we can add the TI K3 j721e SoC support by
> >>> providing all required firmware generated by the build.
> >>>
> >>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> >>> boot the board (serial debug and ethernet working).
> >>>
> >>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
> >>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
> >>>
> >>> Followup commits can improve TI K3 HS-FS devices based on binman instead
> >>> of legacy core-secdev-k3 tool.
> >>>
> >>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> >>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> >>>
> >>> Best regards,
> >>> Romain
> > 
> > I have mixed feelings after testing the patchset on SK-AM62B...
> > It doesn't quite boot, refer to the boot log [1].
> > Seems that U-Boot env is missing, maybe I'm missing some installation
> > step, but I do not see it mentioned in the documetation (for instance
> > of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").
> > 
> > I'm not sure if this is a result of U-Boot update or if the current
> > master is broken as well. I'll be retesting it today and will get back to
> > you.
> 
> It seems you are testing on a HS-FS device "AM62X SR1.0 HS-FS" while I only
> runtime tested this series on a SK-TDA4VM (GP: general pupose).
> 
> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
> customize the image generated in a post-build script?
> 
> Maybe you have to replace the tiboot3.bin binary included by genimage with the
> one for the HS-FS variant ?
> 
> for j721e:
>     285449 13 févr. 17:27 tiboot3.bin
>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
> 
> for am62x:
>     tiboot3.bin << should be the gp variant by default
>     tiboot3-am62x-gp-evm.bin
>     tiboot3-am62x-hs-fs-evm.bin
> 
> Also, did you have the ti-k3-core-secdev package locally, it seems it's required
> for HS-FS SoC but the package is currently missing:
> 
> http://lists.busybox.net/pipermail/buildroot/2024-February/685383.html
> 
> Is ti-k3-core-secdev really required fllowing the switch to binman?
> (binman should sign all firmware binaries itself).

We should see that we can remove/obsolete the ti-k3-core-secdev package
alongside the ti-k3-image-gen package, those are no longer needed since
we started using binman for the building the initial boot stage.

--
Andreas Dannenberg
Texas Instruments Inc

> 
> > 
> > Fortunately this patchset is actually about building the images differently
> > and this part actually went smoothly, which is good.
> 
> Thank you for testing, it help a lot!
> 
> Maybe something is missing in this series to handle HS-FS device properly.
> 
> > 
> >>> Dario Binacchi (5):
> >>>   package/python-attrs: add host variant
> >>>   package/python-rpds-py: add host variant
> >>>   package/python-referencing: add host variant
> >>>   package/python-jsonschema-specifications: add host variant
> >>>   package/python-jsonschema: add host variant
> >>>
> >>> Romain Naour (16):
> >>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
> >>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
> >>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
> >>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
> >>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> >>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
> >>>     BINARIES_DIR
> >>>   boot/ti-k3-boot-firmware: introduce
> >>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
> >>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
> >>>     package
> >>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
> >>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
> >>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
> >>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
> >>>   configs/ti_j721e_sk_defconfig: new defconfig
> >>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
> >>>     tool
> >>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
> >>>     tool
> >>>   boot/ti-k3-image-gen: remove package
> >>>
> >>>  Config.in.legacy                              |  7 ++
> >>>  DEVELOPERS                                    |  6 +-
> >>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
> >>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
> >>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
> >>>  boot/Config.in                                |  1 -
> >>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
> >>>  .../ti-k3-boot-firmware.hash                  |  2 +-
> >>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
> >>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
> >>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
> >>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
> >>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
> >>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
> >>>  boot/uboot/Config.in                          | 27 ++++---
> >>>  boot/uboot/uboot.mk                           | 10 ++-
> >>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
> >>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
> >>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
> >>>  package/python-attrs/python-attrs.mk          |  6 ++
> >>>  .../python-jsonschema-specifications.mk       | 10 +++
> >>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
> >>>  .../python-referencing/python-referencing.mk  | 11 +++
> >>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
> >>>  24 files changed, 275 insertions(+), 180 deletions(-)
> >>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
> >>>  create mode 100755 board/ti/j721e-sk/post-build.sh
> >>>  create mode 100644 board/ti/j721e-sk/readme.txt
> >>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
> >>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
> >>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> >>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> >>>
> >>> --
> >>> 2.43.0
> >>>
> >>> _______________________________________________
> >>> buildroot mailing list
> >>> buildroot@buildroot.org
> >>> https://lists.buildroot.org/mailman/listinfo/buildroot
> > 
> > 1. Boot log:
> > 
> > U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
> > SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> > SPL initial stack usage: 13400 bytes
> > Trying to boot from MMC2
> > Authentication passed
> > Authentication passed
> > Authentication passed
> > Authentication passed
> > Authentication passed
> > Starting ATF on ARM64 core...
> > 
> > NOTICE:  BL31: v2.10.0  (release):v2.10
> > NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
> > I/TC: 
> > I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
> > I/TC: WARNING: This OP-TEE configuration might be insecure!
> > I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
> > I/TC: Primary CPU initializing
> > I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> > I/TC: HUK Initialized
> > I/TC: Activated SA2UL device
> > I/TC: Enabled firewalls for SA2UL TRNG device
> > I/TC: SA2UL TRNG initialized
> > I/TC: SA2UL Drivers initialized
> > I/TC: Primary CPU switching to normal world boot
> > 
> > U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> > SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
> > SPL initial stack usage: 1872 bytes
> > Trying to boot from MMC2
> > Authentication passed
> > Authentication passed
> > 
> > 
> > U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)
> > 
> > SoC:   AM62X SR1.0 HS-FS
> > Model: Texas Instruments AM625 SK
> > DRAM:  2 GiB
> > Core:  56 devices, 23 uclasses, devicetree: separate
> > MMC:   mmc@fa10000: 0, mmc@fa00000: 1
> > Loading Environment from nowhere... OK
> > In:    serial@2800000
> > Out:   serial@2800000
> > Err:   serial@2800000
> > Net:   eth0: ethernet@8000000port@1
> > Hit any key to stop autoboot:  0 
> > switch to partitions #0, OK
> > mmc1 is current device
> > SD/MMC found on device 1
> > Failed to load 'uEnv.txt'
> 
> Can you access to the mmc1 content manually ?
> I had to create a symlink due to "dtb" subdirectory expected by u-boot
> u-boot is looking at /boot/dtb/ti for devicetree.
> 
> Best regards,
> Romain
> 
> 
> > Scanning for bootflows in all bootdevs
> > Seq  Method       State   Uclass    Part  Name                      Filename
> > ---  -----------  ------  --------  ----  ------------------------  ----------------
> > Scanning global bootmeth 'efi_mgr':
> > No EFI system partition
> > No EFI system partition
> > Failed to persist EFI variables
> > Scanning bootdev 'mmc@fa00000.bootdev':
> > Scanning bootdev 'mmc@fa10000.bootdev':
> > Unknown uclass 'usb' in label
> > link up on port 1, speed 100, full duplex
> > BOOTP broadcast 1
> > BOOTP broadcast 2
> > BOOTP broadcast 3
> > BOOTP broadcast 4
> > BOOTP broadcast 5
> > BOOTP broadcast 6
> > BOOTP broadcast 7
> > BOOTP broadcast 8
> > BOOTP broadcast 9
> > BOOTP broadcast 10
> > BOOTP broadcast 11
> > BOOTP broadcast 12
> > BOOTP broadcast 13
> > BOOTP broadcast 14
> > BOOTP broadcast 15
> > BOOTP broadcast 16
> > BOOTP broadcast 17
> > 
> > Retry time exceeded; starting again
> > 
> > 
> > 
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Andreas Dannenberg Feb. 16, 2024, 8:19 p.m. UTC | #7
On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> 
> This series start by adding U-boot binman support already submitted in the
> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> [1], with small improvements.
> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]

Thanks Romain and Dario for all the work on this, and submitting this.
Will be spending some time over the next few days to see how I can help
out with this effort. I can already see many great improvements since
the last time I worked on AM62x/AM64x support last year.

--
Andreas Dannenberg
Texas Instruments Inc



> 
> With binman support, we can add the TI K3 j721e SoC support by
> providing all required firmware generated by the build.
> 
> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> boot the board (serial debug and ethernet working).
> 
> Thanks to binman support, we can remove the ti-k3-image-gen tool from
> Buildroot. To do that, we have to update existing defconfig (am62, am64).
> 
> Followup commits can improve TI K3 HS-FS devices based on binman instead
> of legacy core-secdev-k3 tool.
> 
> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> 
> Best regards,
> Romain
> 
> Dario Binacchi (5):
>   package/python-attrs: add host variant
>   package/python-rpds-py: add host variant
>   package/python-referencing: add host variant
>   package/python-jsonschema-specifications: add host variant
>   package/python-jsonschema: add host variant
> 
> Romain Naour (16):
>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>     BINARIES_DIR
>   boot/ti-k3-boot-firmware: introduce
>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>     package
>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>   configs/ti_j721e_sk_defconfig: new defconfig
>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>     tool
>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>     tool
>   boot/ti-k3-image-gen: remove package
> 
>  Config.in.legacy                              |  7 ++
>  DEVELOPERS                                    |  6 +-
>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>  boot/Config.in                                |  1 -
>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>  .../ti-k3-boot-firmware.hash                  |  2 +-
>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>  boot/uboot/Config.in                          | 27 ++++---
>  boot/uboot/uboot.mk                           | 10 ++-
>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>  package/python-attrs/python-attrs.mk          |  6 ++
>  .../python-jsonschema-specifications.mk       | 10 +++
>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>  .../python-referencing/python-referencing.mk  | 11 +++
>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>  24 files changed, 275 insertions(+), 180 deletions(-)
>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>  create mode 100755 board/ti/j721e-sk/post-build.sh
>  create mode 100644 board/ti/j721e-sk/readme.txt
>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> 
> --
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Romain Naour Feb. 16, 2024, 9:17 p.m. UTC | #8
Hello Andreas,

Le 16/02/2024 à 21:13, Andreas Dannenberg a écrit :
> On Thu, Feb 15, 2024 at 12:23:21PM +0100, Romain Naour wrote:
>> Hi Alexander,
>>
>> Le 15/02/2024 à 11:13, Alexander Sverdlin a écrit :
>>> Hi Romain,
>>>
>>> On Tue, 2024-02-13 at 18:27 +0100, Romain Naour wrote:
>>>>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
>>>>>
>>>>> This series start by adding U-boot binman support already submitted in the
>>>>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
>>>>> [1], with small improvements.
>>>>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
>>>>>
>>>>> With binman support, we can add the TI K3 j721e SoC support by
>>>>> providing all required firmware generated by the build.
>>>>>
>>>>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
>>>>> boot the board (serial debug and ethernet working).
>>>>>
>>>>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
>>>>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
>>>>>
>>>>> Followup commits can improve TI K3 HS-FS devices based on binman instead
>>>>> of legacy core-secdev-k3 tool.
>>>>>
>>>>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
>>>>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
>>>>>
>>>>> Best regards,
>>>>> Romain
>>>
>>> I have mixed feelings after testing the patchset on SK-AM62B...
>>> It doesn't quite boot, refer to the boot log [1].
>>> Seems that U-Boot env is missing, maybe I'm missing some installation
>>> step, but I do not see it mentioned in the documetation (for instance
>>> of original commit 4b8fddb060fb ("configs/ti_am62x_sk: new defconfig").
>>>
>>> I'm not sure if this is a result of U-Boot update or if the current
>>> master is broken as well. I'll be retesting it today and will get back to
>>> you.
>>
>> It seems you are testing on a HS-FS device "AM62X SR1.0 HS-FS" while I only
>> runtime tested this series on a SK-TDA4VM (GP: general pupose).
>>
>> Also the ti_am62x_sk_defconfig is expecting a GP SoC so you may have to
>> customize the image generated in a post-build script?
>>
>> Maybe you have to replace the tiboot3.bin binary included by genimage with the
>> one for the HS-FS variant ?
>>
>> for j721e:
>>     285449 13 févr. 17:27 tiboot3.bin
>>     285449 13 févr. 17:27 tiboot3-j721e-gp-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr1_1-hs-evm.bin
>>     286224 13 févr. 17:27 tiboot3-j721e_sr2-hs-fs-evm.bin
>>
>> for am62x:
>>     tiboot3.bin << should be the gp variant by default
>>     tiboot3-am62x-gp-evm.bin
>>     tiboot3-am62x-hs-fs-evm.bin
>>
>> Also, did you have the ti-k3-core-secdev package locally, it seems it's required
>> for HS-FS SoC but the package is currently missing:
>>
>> http://lists.busybox.net/pipermail/buildroot/2024-February/685383.html
>>
>> Is ti-k3-core-secdev really required fllowing the switch to binman?
>> (binman should sign all firmware binaries itself).
> 
> We should see that we can remove/obsolete the ti-k3-core-secdev package
> alongside the ti-k3-image-gen package, those are no longer needed since
> we started using binman for the building the initial boot stage.

Thank you for the clarification.

Best regards,
Romain


> 
> --
> Andreas Dannenberg
> Texas Instruments Inc
> 
>>
>>>
>>> Fortunately this patchset is actually about building the images differently
>>> and this part actually went smoothly, which is good.
>>
>> Thank you for testing, it help a lot!
>>
>> Maybe something is missing in this series to handle HS-FS device properly.
>>
>>>
>>>>> Dario Binacchi (5):
>>>>>   package/python-attrs: add host variant
>>>>>   package/python-rpds-py: add host variant
>>>>>   package/python-referencing: add host variant
>>>>>   package/python-jsonschema-specifications: add host variant
>>>>>   package/python-jsonschema: add host variant
>>>>>
>>>>> Romain Naour (16):
>>>>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>>>>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>>>>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>>>>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>>>>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>>>>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>>>>>     BINARIES_DIR
>>>>>   boot/ti-k3-boot-firmware: introduce
>>>>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>>>>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>>>>>     package
>>>>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>>>>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>>>>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>>>>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>>>>>   configs/ti_j721e_sk_defconfig: new defconfig
>>>>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>>>>>     tool
>>>>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>>>>>     tool
>>>>>   boot/ti-k3-image-gen: remove package
>>>>>
>>>>>  Config.in.legacy                              |  7 ++
>>>>>  DEVELOPERS                                    |  6 +-
>>>>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>>>>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>>>>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>>>>>  boot/Config.in                                |  1 -
>>>>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>>>>>  .../ti-k3-boot-firmware.hash                  |  2 +-
>>>>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>>>>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>>>>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>>>>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>>>>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>>>>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>>>>>  boot/uboot/Config.in                          | 27 ++++---
>>>>>  boot/uboot/uboot.mk                           | 10 ++-
>>>>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>>>>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>>>>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>>>>>  package/python-attrs/python-attrs.mk          |  6 ++
>>>>>  .../python-jsonschema-specifications.mk       | 10 +++
>>>>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>>>>>  .../python-referencing/python-referencing.mk  | 11 +++
>>>>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>>>>>  24 files changed, 275 insertions(+), 180 deletions(-)
>>>>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>>>>>  create mode 100755 board/ti/j721e-sk/post-build.sh
>>>>>  create mode 100644 board/ti/j721e-sk/readme.txt
>>>>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>>>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>>>>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>>>>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
>>>>>
>>>>> --
>>>>> 2.43.0
>>>>>
>>>>> _______________________________________________
>>>>> buildroot mailing list
>>>>> buildroot@buildroot.org
>>>>> https://lists.buildroot.org/mailman/listinfo/buildroot
>>>
>>> 1. Boot log:
>>>
>>> U-Boot SPL 2024.01 (Feb 15 2024 - 01:42:12 +0100)
>>> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
>>> SPL initial stack usage: 13400 bytes
>>> Trying to boot from MMC2
>>> Authentication passed
>>> Authentication passed
>>> Authentication passed
>>> Authentication passed
>>> Authentication passed
>>> Starting ATF on ARM64 core...
>>>
>>> NOTICE:  BL31: v2.10.0  (release):v2.10
>>> NOTICE:  BL31: Built : 01:28:38, Feb 15 2024
>>> I/TC: 
>>> I/TC: OP-TEE version: Unknown_4.0 (gcc version 12.3.0 (Buildroot 2023.11-1198-g18ff6d2643)) #1 Thu Feb 15 00:28:27 UTC 2024 aarch64
>>> I/TC: WARNING: This OP-TEE configuration might be insecure!
>>> I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
>>> I/TC: Primary CPU initializing
>>> I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
>>> I/TC: HUK Initialized
>>> I/TC: Activated SA2UL device
>>> I/TC: Enabled firewalls for SA2UL TRNG device
>>> I/TC: SA2UL TRNG initialized
>>> I/TC: SA2UL Drivers initialized
>>> I/TC: Primary CPU switching to normal world boot
>>>
>>> U-Boot SPL 2024.01 (Feb 15 2024 - 01:43:17 +0100)
>>> SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
>>> SPL initial stack usage: 1872 bytes
>>> Trying to boot from MMC2
>>> Authentication passed
>>> Authentication passed
>>>
>>>
>>> U-Boot 2024.01 (Feb 15 2024 - 01:43:17 +0100)
>>>
>>> SoC:   AM62X SR1.0 HS-FS
>>> Model: Texas Instruments AM625 SK
>>> DRAM:  2 GiB
>>> Core:  56 devices, 23 uclasses, devicetree: separate
>>> MMC:   mmc@fa10000: 0, mmc@fa00000: 1
>>> Loading Environment from nowhere... OK
>>> In:    serial@2800000
>>> Out:   serial@2800000
>>> Err:   serial@2800000
>>> Net:   eth0: ethernet@8000000port@1
>>> Hit any key to stop autoboot:  0 
>>> switch to partitions #0, OK
>>> mmc1 is current device
>>> SD/MMC found on device 1
>>> Failed to load 'uEnv.txt'
>>
>> Can you access to the mmc1 content manually ?
>> I had to create a symlink due to "dtb" subdirectory expected by u-boot
>> u-boot is looking at /boot/dtb/ti for devicetree.
>>
>> Best regards,
>> Romain
>>
>>
>>> Scanning for bootflows in all bootdevs
>>> Seq  Method       State   Uclass    Part  Name                      Filename
>>> ---  -----------  ------  --------  ----  ------------------------  ----------------
>>> Scanning global bootmeth 'efi_mgr':
>>> No EFI system partition
>>> No EFI system partition
>>> Failed to persist EFI variables
>>> Scanning bootdev 'mmc@fa00000.bootdev':
>>> Scanning bootdev 'mmc@fa10000.bootdev':
>>> Unknown uclass 'usb' in label
>>> link up on port 1, speed 100, full duplex
>>> BOOTP broadcast 1
>>> BOOTP broadcast 2
>>> BOOTP broadcast 3
>>> BOOTP broadcast 4
>>> BOOTP broadcast 5
>>> BOOTP broadcast 6
>>> BOOTP broadcast 7
>>> BOOTP broadcast 8
>>> BOOTP broadcast 9
>>> BOOTP broadcast 10
>>> BOOTP broadcast 11
>>> BOOTP broadcast 12
>>> BOOTP broadcast 13
>>> BOOTP broadcast 14
>>> BOOTP broadcast 15
>>> BOOTP broadcast 16
>>> BOOTP broadcast 17
>>>
>>> Retry time exceeded; starting again
>>>
>>>
>>>
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
Romain Naour Feb. 16, 2024, 9:52 p.m. UTC | #9
Hello Andreas,

Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
>> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
>>
>> This series start by adding U-boot binman support already submitted in the
>> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
>> [1], with small improvements.
>> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> 
> Thanks Romain and Dario for all the work on this, and submitting this.
> Will be spending some time over the next few days to see how I can help
> out with this effort. I can already see many great improvements since
> the last time I worked on AM62x/AM64x support last year.

Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
helped on AM62x.

Maybe if you can also test on AM64x just to be sure the defconfig is working.

For now, I need to rework AM64x/AM62x support since Alexander reported that his
board doesn't boot the kernel.

Best regards,
Romain


> 
> --
> Andreas Dannenberg
> Texas Instruments Inc
> 
> 
> 
>>
>> With binman support, we can add the TI K3 j721e SoC support by
>> providing all required firmware generated by the build.
>>
>> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
>> boot the board (serial debug and ethernet working).
>>
>> Thanks to binman support, we can remove the ti-k3-image-gen tool from
>> Buildroot. To do that, we have to update existing defconfig (am62, am64).
>>
>> Followup commits can improve TI K3 HS-FS devices based on binman instead
>> of legacy core-secdev-k3 tool.
>>
>> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
>> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
>>
>> Best regards,
>> Romain
>>
>> Dario Binacchi (5):
>>   package/python-attrs: add host variant
>>   package/python-rpds-py: add host variant
>>   package/python-referencing: add host variant
>>   package/python-jsonschema-specifications: add host variant
>>   package/python-jsonschema: add host variant
>>
>> Romain Naour (16):
>>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
>>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
>>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
>>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
>>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
>>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
>>     BINARIES_DIR
>>   boot/ti-k3-boot-firmware: introduce
>>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
>>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
>>     package
>>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
>>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
>>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
>>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
>>   configs/ti_j721e_sk_defconfig: new defconfig
>>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
>>     tool
>>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
>>     tool
>>   boot/ti-k3-image-gen: remove package
>>
>>  Config.in.legacy                              |  7 ++
>>  DEVELOPERS                                    |  6 +-
>>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
>>  board/ti/j721e-sk/post-build.sh               | 16 ++++
>>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
>>  boot/Config.in                                |  1 -
>>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
>>  .../ti-k3-boot-firmware.hash                  |  2 +-
>>  .../ti-k3-boot-firmware.mk                    | 16 ++--
>>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
>>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
>>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
>>  boot/ti-k3-r5-loader/Config.in                |  8 ++
>>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
>>  boot/uboot/Config.in                          | 27 ++++---
>>  boot/uboot/uboot.mk                           | 10 ++-
>>  configs/ti_am62x_sk_defconfig                 | 14 ++--
>>  configs/ti_am64x_sk_defconfig                 | 14 ++--
>>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
>>  package/python-attrs/python-attrs.mk          |  6 ++
>>  .../python-jsonschema-specifications.mk       | 10 +++
>>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
>>  .../python-referencing/python-referencing.mk  | 11 +++
>>  package/python-rpds-py/python-rpds-py.mk      |  1 +
>>  24 files changed, 275 insertions(+), 180 deletions(-)
>>  create mode 100644 board/ti/j721e-sk/genimage.cfg
>>  create mode 100755 board/ti/j721e-sk/post-build.sh
>>  create mode 100644 board/ti/j721e-sk/readme.txt
>>  delete mode 100644 boot/ti-k3-image-gen/Config.in
>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
>>
>> --
>> 2.43.0
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
Andreas Dannenberg Feb. 16, 2024, 10:20 p.m. UTC | #10
On Fri, Feb 16, 2024 at 10:52:21PM +0100, Romain Naour wrote:
> Hello Andreas,
> 
> Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> > On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> >> This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> >>
> >> This series start by adding U-boot binman support already submitted in the
> >> preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> >> [1], with small improvements.
> >> See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > 
> > Thanks Romain and Dario for all the work on this, and submitting this.
> > Will be spending some time over the next few days to see how I can help
> > out with this effort. I can already see many great improvements since
> > the last time I worked on AM62x/AM64x support last year.
> 
> Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
> helped on AM62x.
> 
> Maybe if you can also test on AM64x just to be sure the defconfig is working.

I'm planning on testing the entire series here pretty soon and will
provide feedback (I have access to any and all boards:)

One of the things I'm trying to assess is what's still missing vs. the
previous attempt I made upstreaming this. For example, AM62x graphics
isn't there yet (ti-rogue-km / ti-rogue-um).


--
Andreas Dannenberg
Texas Instruments Inc


> 
> For now, I need to rework AM64x/AM62x support since Alexander reported that his
> board doesn't boot the kernel.
> 
> Best regards,
> Romain
> 
> 
> > 
> > --
> > Andreas Dannenberg
> > Texas Instruments Inc
> > 
> > 
> > 
> >>
> >> With binman support, we can add the TI K3 j721e SoC support by
> >> providing all required firmware generated by the build.
> >>
> >> Add the new ti_j721e_sk_defconfig file to build a basic SD card image to
> >> boot the board (serial debug and ethernet working).
> >>
> >> Thanks to binman support, we can remove the ti-k3-image-gen tool from
> >> Buildroot. To do that, we have to update existing defconfig (am62, am64).
> >>
> >> Followup commits can improve TI K3 HS-FS devices based on binman instead
> >> of legacy core-secdev-k3 tool.
> >>
> >> [1] http://lists.busybox.net/pipermail/buildroot/2023-December/681139.html
> >> [2] https://fosdem.org/2024/events/attachments/fosdem-2024-3067-standardizing-the-generation-and-signing-of-boot-images/slides/22808/FOSDEM24_Speaker_Slides_y7FsIKM.pdf
> >>
> >> Best regards,
> >> Romain
> >>
> >> Dario Binacchi (5):
> >>   package/python-attrs: add host variant
> >>   package/python-rpds-py: add host variant
> >>   package/python-referencing: add host variant
> >>   package/python-jsonschema-specifications: add host variant
> >>   package/python-jsonschema: add host variant
> >>
> >> Romain Naour (16):
> >>   DEVELOPERS: add Romain Naour for am574x_idk_defconfig
> >>   configs/ti_am62x_sk_defconfig: fix optee-os plateform
> >>   configs/ti_am64x_sk_defconfig: fix optee-os plateform
> >>   boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option
> >>   boot/ti-k3-r5-loader: add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> >>   boot/ti-k3-r5-loader: install tiboot3.bin and sysfw.itb to
> >>     BINARIES_DIR
> >>   boot/ti-k3-boot-firmware: introduce
> >>     BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_{AM62AX,AM62X,AM64X,AM65X}
> >>   boot/uboot: use DM firmware name defined by ti-k3-boot-firmware
> >>     package
> >>   boot/ti-k3-boot-firmware: add BR2_TARGET_TI_K3_BOOT_FIRMWARE_SOC_J721E
> >>   boot/uboot: replace ti-k3-image-gen options by ti-k3-firmware options
> >>   boot/uboot: enable TI K3 Device Manager (DM) for j721e
> >>   boot/ti-k3-boot-firmware: bump to version 09.02.00.004
> >>   configs/ti_j721e_sk_defconfig: new defconfig
> >>   configs/ti_am62x_sk_defconfig: update to uboot 2024.01 to use binman
> >>     tool
> >>   configs/ti_am64x_sk_defconfig: update to uboot 2024.01 to use binman
> >>     tool
> >>   boot/ti-k3-image-gen: remove package
> >>
> >>  Config.in.legacy                              |  7 ++
> >>  DEVELOPERS                                    |  6 +-
> >>  board/ti/j721e-sk/genimage.cfg                | 28 +++++++
> >>  board/ti/j721e-sk/post-build.sh               | 16 ++++
> >>  board/ti/j721e-sk/readme.txt                  | 34 ++++++++
> >>  boot/Config.in                                |  1 -
> >>  boot/ti-k3-boot-firmware/Config.in            | 39 ++++++++++
> >>  .../ti-k3-boot-firmware.hash                  |  2 +-
> >>  .../ti-k3-boot-firmware.mk                    | 16 ++--
> >>  boot/ti-k3-image-gen/Config.in                | 77 -------------------
> >>  boot/ti-k3-image-gen/ti-k3-image-gen.hash     |  3 -
> >>  boot/ti-k3-image-gen/ti-k3-image-gen.mk       | 54 -------------
> >>  boot/ti-k3-r5-loader/Config.in                |  8 ++
> >>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk       | 23 ++++++
> >>  boot/uboot/Config.in                          | 27 ++++---
> >>  boot/uboot/uboot.mk                           | 10 ++-
> >>  configs/ti_am62x_sk_defconfig                 | 14 ++--
> >>  configs/ti_am64x_sk_defconfig                 | 14 ++--
> >>  ...62x_sk_defconfig => ti_j721e_sk_defconfig} | 34 ++++----
> >>  package/python-attrs/python-attrs.mk          |  6 ++
> >>  .../python-jsonschema-specifications.mk       | 10 +++
> >>  .../python-jsonschema/python-jsonschema.mk    | 14 ++++
> >>  .../python-referencing/python-referencing.mk  | 11 +++
> >>  package/python-rpds-py/python-rpds-py.mk      |  1 +
> >>  24 files changed, 275 insertions(+), 180 deletions(-)
> >>  create mode 100644 board/ti/j721e-sk/genimage.cfg
> >>  create mode 100755 board/ti/j721e-sk/post-build.sh
> >>  create mode 100644 board/ti/j721e-sk/readme.txt
> >>  delete mode 100644 boot/ti-k3-image-gen/Config.in
> >>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
> >>  delete mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> >>  copy configs/{ti_am62x_sk_defconfig => ti_j721e_sk_defconfig} (54%)
> >>
> >> --
> >> 2.43.0
> >>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot@buildroot.org
> >> https://lists.buildroot.org/mailman/listinfo/buildroot
>
Alexander Sverdlin Feb. 17, 2024, 3:13 a.m. UTC | #11
Hello Andreas,

On Fri, 2024-02-16 at 16:20 -0600, Andreas Dannenberg wrote:
> On Fri, Feb 16, 2024 at 10:52:21PM +0100, Romain Naour wrote:
> > Hello Andreas,
> > 
> > Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> > > On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> > > > This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> > > > 
> > > > This series start by adding U-boot binman support already submitted in the
> > > > preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> > > > [1], with small improvements.
> > > > See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > > 
> > > Thanks Romain and Dario for all the work on this, and submitting this.
> > > Will be spending some time over the next few days to see how I can help
> > > out with this effort. I can already see many great improvements since
> > > the last time I worked on AM62x/AM64x support last year.
> > 
> > Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
> > helped on AM62x.
> > 
> > Maybe if you can also test on AM64x just to be sure the defconfig is working.
> 
> I'm planning on testing the entire series here pretty soon and will
> provide feedback (I have access to any and all boards:)
> 
> One of the things I'm trying to assess is what's still missing vs. the
> previous attempt I made upstreaming this. For example, AM62x graphics
> isn't there yet (ti-rogue-km / ti-rogue-um).

maybe you could shed some light onto the AM62x situation. My conclusion
is that since your initial buildroot BSP U-Boot has been switched
to standard boot (CONFIG_BOOTSTD), refer to (U-Boot repo):

commit 355c0afcd4b7c8c442c4d03e07649c24194b8e06
Author: Nishanth Menon <nm@ti.com>
Date:   Fri Aug 25 13:02:52 2023 -0500

    configs: am62x_evm_a53_defconfig: Switch to bootstd

and

commit ab54d9b28d8578cc43b214d39009e7b1def797e4
Author: Roger Quadros <rogerq@kernel.org>
Date:   Thu Oct 5 16:06:41 2023 +0300

    board: ti: am62x: am62x.env: Fix boot_targets
    
    ti_mmc is not a valid boot_target for standard boot flow so

I suppose TI's BSP still uses older U-Boot and is still not affected.
Do we need uEnv.txt now? Do you have an idea which distro Nishanth may
have tested with BOOTSTD change?
Andreas Dannenberg Feb. 19, 2024, 7:59 p.m. UTC | #12
Hi Alexander,

On Sat, Feb 17, 2024 at 04:13:16AM +0100, Alexander Sverdlin wrote:
> Hello Andreas,
> 
> On Fri, 2024-02-16 at 16:20 -0600, Andreas Dannenberg wrote:
> > On Fri, Feb 16, 2024 at 10:52:21PM +0100, Romain Naour wrote:
> > > Hello Andreas,
> > > 
> > > Le 16/02/2024 à 21:19, Andreas Dannenberg a écrit :
> > > > On Tue, Feb 13, 2024 at 06:27:56PM +0100, Romain Naour wrote:
> > > > > This series aim to add the SK-TDA4VM board support based on TI K3 j721e SoC.
> > > > > 
> > > > > This series start by adding U-boot binman support already submitted in the
> > > > > preview series "Add support for AM62x-SK HS-FS devices" from Dario Binacchi
> > > > > [1], with small improvements.
> > > > > See the FOSDEM 2024 talk "Standardizing the generation and signing of boot images" [2]
> > > > 
> > > > Thanks Romain and Dario for all the work on this, and submitting this.
> > > > Will be spending some time over the next few days to see how I can help
> > > > out with this effort. I can already see many great improvements since
> > > > the last time I worked on AM62x/AM64x support last year.
> > > 
> > > Your feed back on HS-FS devices is really helpful. Alexander Sverdlin also
> > > helped on AM62x.
> > > 
> > > Maybe if you can also test on AM64x just to be sure the defconfig is working.
> > 
> > I'm planning on testing the entire series here pretty soon and will
> > provide feedback (I have access to any and all boards:)
> > 
> > One of the things I'm trying to assess is what's still missing vs. the
> > previous attempt I made upstreaming this. For example, AM62x graphics
> > isn't there yet (ti-rogue-km / ti-rogue-um).
> 
> maybe you could shed some light onto the AM62x situation. My conclusion
> is that since your initial buildroot BSP U-Boot has been switched
> to standard boot (CONFIG_BOOTSTD), refer to (U-Boot repo):
> 
> commit 355c0afcd4b7c8c442c4d03e07649c24194b8e06
> Author: Nishanth Menon <nm@ti.com>
> Date:   Fri Aug 25 13:02:52 2023 -0500
> 
>     configs: am62x_evm_a53_defconfig: Switch to bootstd
> 
> and
> 
> commit ab54d9b28d8578cc43b214d39009e7b1def797e4
> Author: Roger Quadros <rogerq@kernel.org>
> Date:   Thu Oct 5 16:06:41 2023 +0300
> 
>     board: ti: am62x: am62x.env: Fix boot_targets
>     
>     ti_mmc is not a valid boot_target for standard boot flow so
> 
> I suppose TI's BSP still uses older U-Boot and is still not affected.
> Do we need uEnv.txt now? Do you have an idea which distro Nishanth may
> have tested with BOOTSTD change?

I wasn't aware of those changes but I just looked at some of them. Looks
like most of the effort was targeted around the BeaglePlay board.

And this was tested with Debian. You can find one of Nishanth's boot
logs here [1]. It was referenced in the cover letter [2] of the U-Boot
series that introduced the 'Switch to bootstd' change you pointed out.

If this indeed causes some widespread breakage including Buildroot we
need to understand and think about how to best resolve this. Will dig
into this some more as I'm trying to get back into helping with the
Buildroot effort here.

Thanks, Andreas



[1] https://gist.github.com/nmenon/c74acb3a895053e05623e886df77c8fe
[2] https://lore.kernel.org/all/20230824031101.3460411-1-nm@ti.com/



> 
> -- 
> Alexander Sverdlin.
>