This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: Custom Board Boot Errors

Part Number: AM623

Hello, I've designed the custom board based on the SK- AM62 EVK with the same RAM, but AM6234 MPU. Guess that AM6234 and AM6254 have the same image files.

I've tested the following images to boot:

https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-PvdSyIiioq/09.00.00.03/tisdk-default-image-am62xx-evm.wic.xz

https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-PvdSyIiioq/08.06.00.42/tisdk-default-image-am62xx-evm.wic.xz

https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-PvdSyIiioq/08.05.00.21/tisdk-default-image-am62xx-evm.wic.xz

When used this SD card on the EVK, it boots without error.

When trying to boot from SD card at custom board, it fails:

U-Boot SPL 2021.01-g2ee8efd654 (Feb 24 2023 - 05:52:36 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
Trying to boot from MMC2
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Loading Environment from MMC... *** Warning - No MMC card found, using default environment

Starting ATF on ARM64 core...

NOTICE: BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
NOTICE: BL31: Built : 05:06:58, Feb 24 2023

U-Boot SPL 2021.01-g2ee8efd654 (Feb 24 2023 - 05:29:33 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
Trying to boot from MMC2
** Partition 1 not valid on device 1 **
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image u-boot.img, err - -1
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

When switched to DFU Boot mode, it fails at the first file:

On the terminal:

.\dfu-util.exe -R -a 0 -n 15 -D tiboot3-am62x-gp-evm.bin

dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to sourceforge.net/.../

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Copying data from PC to DFU device
Download [=========================] 100% 332430 bytes
Download done.
DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode

But on the serial console:

U-Boot SPL 2021.01-g2ee8efd654 (Feb 24 2023 - 05:52:36 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Please be so kind and try to help me to identify the root cause.

  • But on the serial console:

    U-Boot SPL 2021.01-g2ee8efd654 (Feb 24 2023 - 05:52:36 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    SPL: Unsupported Boot Device!
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    Please be so kind and try to help me to identify the root cause.

    U-Boot SPL (on R5) is complaining about an unsupported boot mode. It is likely that you didn't re-build U-Boot SPL R5 with the "defconfig" as required for USB DFU boot, see https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_00_00_03/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html

    The reason for having a couple of dedicated U-Boot SPL R5 configurations for different boot modes on AM6x is that the memory used for the initial boot stage (internal SRAM) is very limited in size, so not all boot modes can be baked in/supported at the same time. This is different for the follow-on stages of the boot process, where DDR will be up and with this memory no longer is a concern, so all boot modes will use the same defconfig.

    Regards, Andreas

  • Understand to use the dedicated config for DFU booting, but why it fails to boot from the SD Card, when the same card boots at the EVK normally?

    Seems that it somehow looks at the eMMC which is completely blank and without any partitions. But why, if the boot switches are set to SD Card?

    And how to overcome this? Need I build dedicated u-boot with the eMMC lookup somehow disabled?

  • Seems that it somehow looks at the eMMC which is completely blank and without any partitions. But why, if the boot switches are set to SD Card?

    Perhaps there's something wrong with the bootmode pins, so we should double-check that. Can you add a simple print to R5 SPL that prints the CTRLMMR_MAIN_DEVSTAT register contents so we can compare the EVM and your board to see if there are any differences:

    a0797059@dasso:~/git/u-boot (ti-u-boot-2023.04)
    $ git diff
    diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
    index d5d741cb93..d9311c1cfa 100644
    --- a/arch/arm/mach-k3/am625_init.c
    +++ b/arch/arm/mach-k3/am625_init.c
    @@ -223,6 +223,12 @@ void board_init_f(ulong dummy)
            }
    
            spl_enable_dcache();
    +
    +       /*
    +        * Print contents of CTRLMMR_MAIN_DEVSTAT register which contains
    +        * the boot mode settings as latched by the SoC during reset
    +        */
    +       printf("%s: MAIN_DEVSTAT=0x%x\n", __func__, readl(0x43000030));
     }
    
     u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)

    This should add a print like this... (on my machine I use Ethernet boot as primary, and UART as backup boot mode, hence that value -- this is just an example)

    U-Boot SPL 2023.04-00001-gd76d1baa80-dirty (Sep 18 2023 - 15:23:27 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    board_init_f: MAIN_DEVSTAT=0xc23                               <==== We added this print!
    SPL initial stack usage: 13392 bytes
    Trying to boot from eth device
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment

    Regards, Andreas

  • Sorry, but I'm not able to modify related file to generate the report. I'm using only ready made image files.

  • Hi Jan,

    can you please try to re-build U-Boot with the indicated changes, according to the SDK documentation at https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_00_00_03/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html

    Alternatively, you can also use JTAG to read out the contents of the memory address 0x43000030 (CTRLMMR_MAIN_DEVSTAT register).

    Regards, Andreas

  • Hello Andreas,

    I was lucky to upload the image to the internal eMMC and boot from it. For now the SD-Card is not important point for me. Thank you for help.