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.

AM335x DT not found loading U-boot from SD card

Good evening,

I'm developing on a custom AM3351-based board, and at this stage have SPL and U-boot running properly through my JTAG interface. I can also boot succesfully through UART0 interface. I'm now trying to get the SD card to work properly, but am running into trouble and am not able to find the correct device tree. Here's the output from my UART0 console when trying to boot from the SD card:

U-Boot SPL 2016.05-00230-g120a8a3-dirty (Oct 25 2016 - 09:46:05)

Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus 0 are properly configured
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus 0 are properly configured
Trying to boot from MMC2
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
reading u-boot.img
No matching DT out of these options:
<NULL>
<NULL>
<NULL>
<NULL>
<NULL>
<NULL>
<NULL>
spl_load_image_fat: error reading image u-boot.img, err - -2
Failed to mount ext2 filesystem...
spl_load_image_ext_os: ext4fs mount err - 0
Failed to mount ext2 filesystem...
spl_load_image_ext: ext4fs mount err - 0

First question, how come it prints that I'm trying to boot from MMC2, when the SD card is located on mmc1 (and the boot sequence is MMC1->MMC0->UART0->USB0. Is it 1-based indexing for this print statement? Or is this an error?

Second, I compiled a custom dtb file "am335x-zc.dtb" for this board based on my pin mappings. I modified am335x_evm_defconfig to reference this file with the define

CONFIG_DEFAULT_DEVICE_TREE="am335x-zc"

I then followed the instructions for creating an SD card image (http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_create_SD_card_scriptand placed the dtb file in the /rootfs/boot/ directory on my SD card. Do I need to modify headers in any other locations to specify the dtb file location?

Next, I loaded SPL and u-boot through the JTAG interface and aborted the autoboot sequence. I then queried mmc devices but found the error message

=> mmc rescan
Card did not respond to voltage select!
=> mmc list
OMAP SD/MMC: 0

It also seems to be using MMC0 and not MMC1. Please let me know if you have any suggestions. Thank you so much for your support.

Best regards,

Chris

P.s. Here's the console output when loading SPL and u-boot through CCS debugging interface:

U-Boot SPL 2016.05-00230-g120a8a3-dirty (Oct 25 2016 - 09:46:05)
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus 0 are properly configured
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus 0 are properly configured
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

U-Boot 2016.05-00230-g120a8a3-dirty (Oct 25 2016 - 09:46:45 -0400)

I2C: ready
DRAM: 64 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0
Card did not respond to voltage select!
** Bad device mmc 0 **
Using default environment

Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus 0 are properly configured
Could not get board ID.
<ethaddr> not set. Validating first E-fuse MAC
Net:
Warning: usb_ether MAC addresses don't match:
Address in SROM is de:ad:be:ef:00:01
Address in environment is a0:f6:fd:27:f2:11
eth0: usb_ether
Press SPACE to abort autoboot in 2 seconds
=> mmc rescan
Card did not respond to voltage select!
=> mmc list
OMAP SD/MMC: 0

  • I will forward this to the software team. They will respond here.
  • Hi Chris,

    Second, I compiled a custom dtb file "am335x-zc.dtb" for this board based on my pin mappings. I modified am335x_evm_defconfig to reference this file with the define

    CONFIG_DEFAULT_DEVICE_TREE="am335x-zc"

    I then followed the instructions for creating an SD card image (processors.wiki.ti.com/.../Processor_SDK_Linux_create_SD_card_scriptand placed the dtb file in the /rootfs/boot/ directory on my SD card. Do I need to modify headers in any other locations to specify the dtb file location?


    Yes, you should modify the include/configs/am335x_evm.h file, the part, where the environment variables are defined:
    #define CONFIG_EXTRA_ENV_SETTINGS \
    DEFAULT_LINUX_BOOT_ENV \
    DEFAULT_MMC_TI_ARGS \
    "boot_fdt=try\0" \
    "bootpart=0:2\0" \
    "bootdir=/boot\0" \
    "bootfile=zImage\0" \
    "fdtfile=undefined\0" \
    "console=ttyO0,115200n8\0" \

    Especially the part of the ENV_SETTINGS, that figures out which dtb should be used:
    "findfdt="\
    "if test $board_name = A335BONE; then " \
    "setenv fdtfile am335x-bone.dtb; fi; " \
    "if test $board_name = A335BNLT; then " \
    "setenv fdtfile am335x-boneblack.dtb; fi; " \
    "if test $board_name = BBG1; then " \
    "setenv fdtfile am335x-bonegreen.dtb; fi; " \
    "if test $board_name = A33515BB; then " \
    "setenv fdtfile am335x-evm.dtb; fi; " \
    "if test $board_name = A335X_SK; then " \
    "setenv fdtfile am335x-evmsk.dtb; fi; " \
    "if test $board_name = A335_ICE; then " \
    "setenv fdtfile am335x-icev2.dtb; fi; " \
    "if test $fdtfile = undefined; then " \
    "echo WARNING: Could not determine device tree to use; fi; \0" \
    You should add your custom dtb file in the above fragment.

    Best Regards,
    Yordan
  • Hi Yordan,

    As you suggested, I modifed the ENV_SETTINGS to add the fdtfile and specify mmc1 as the default, e.g.

    "fdtfile=am335x-zc.dtb\0" \

    "if test $board_name = A335_ZC; then " \
    "setenv fdtfile am335x-zc.dtb; fi; " \

    and in ti_armv7_common.h

    #define DEFAULT_MMC_TI_ARGS \
    "mmcdev=1\0" \
    "mmcrootfstype=ext4 rootwait\0" \

    ....

    I'm still seeing the same message when booting from the SD card. I have several questions which will help troubleshoot the issue.

    1) I'm seeing the message "Trying to boot from MMC2" in my UART console. I have nothing connected to MMC0 or MMC2, and I'm trying to boot from the SD card on MMC1. Does MMC2 in UART message correspond to MMC1? I only see defines BOOT_DEVICE_MMC1 and BOOT_DEVICE_MMC2 in the u-boot source code.

    2) Does the message "Trying to boot from MMC2" indicate that I've completed the SPL code and am trying to load u-boot from MMC2? Does the following output and error message indicate that it has found u-boot.img successfully, but fails reading image args? Does this correspond to uEnv.txt file? Or are these boot arguments compiled inside u-boot?

    reading args

    spl_load_image_fat_os: error reading image args, err - -1

    reading u-boot.img
    reading u-boot.img
    reading u-boot.img

    3) When loading SPL and u-boot through the JTAG interface, I'm able to reach the command prompt and query for mmc devices, but it shows the error messages "Card did not respond to voltage select!" and "Bad device mmc 0". Why is it showing MMC: OMAP SD/MMC: 0 when I should be configured to MMC1? And what does the error message "Bad device mmc 0" indicate?

    U-Boot 2016.05-00230-g120a8a3-dirty (Oct 25 2016 - 09:46:45 -0400)

    I2C: ready
    DRAM: 64 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    4) Lastly, after running SPL and u-boot through the JTAG interface, I can query the mmc devices from the command prompt but it is only showing OMAP SD/MMC: 0. Does this indicate that I'm not able to see my SD card? Or does it enumerate MMC devices from a 0-based index?

    => mmc rescan
    Card did not respond to voltage select!
    => mmc list
    OMAP SD/MMC: 0

    Thank you for your support!

    Best regards,

    Chris

    P.S. I've attached the UART0 console output after enabling the #define DEBUG for reference.

    am335x_debug.txt

  • Hi Yordan,

    I've copied the last few messages from the UART output when booting from the SD card after enabling #define CONFIG_MMC_TRACE. Please let me know if you have any suggestions.

    Best regards,

    Chris

    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:18
    ARG 0x00003C0F
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00003FDA
    MMC_RSP_R1,5,6,7 0x00000900
    Size: 724484, got: 497612
    u-boot.bin load: dst = 0x80800000, size = 0x797b4
    No matching DT out of these options:
    <NULL>
    <NULL>
    <NULL>
    <NULL>
    <NULL>
    <NULL>
    <NULL>
    spl_load_image_fat: error reading image u-boot.img, err - -2
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    <2, 0, 1024>
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:18
    ARG 0x00000802
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900
    Failed to mount ext2 filesystem...
    spl_load_image_ext_os: ext4fs mount err - 0
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    <2, 0, 1024>
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:18
    ARG 0x00000802
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900
    Failed to mount ext2 filesystem...
    spl_load_image_ext: ext4fs mount err - 0
    Jumping to U-Boot
    loaded - jumping to U-Boot...image entry point: 0x80800000

  • Hi Yordan,

    Have you had an opportunity to review the log files and my earlier questions? Any suggestions as to why it's hanging when jumping to U-boot at image entry point 0x80800000?

    By the way, this morning I loaded the am335x DDR2 GEL script and verified that my board passed all the DDR2 memory tests.

    Best regards,
    Chris
  • Hi Chris,

    Apologies for the delayed response.

    Your dtb settings in u-boot seem correct (the entry point matches the described in ti_armv7_common.h #define CONFIG_SYS_TEXT_BASE 0x80800000). Could you share how do you build the u-boot image?

    Best Regards,
    Yordan
  • Hi Yordan,

    I've created a make target in CCS with the build command and target

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- u-boot.img 

    It doesn't seem to be adding the dtb as it did with my u-boot.bin file. Please let me know if you have any suggestions.

    11:41:57 **** Build of configuration Default for project u-boot-2016.05+gitAUTOINC+b4e185a8c3-gb4e185a8c3 ****
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- u-boot.img
    CHK include/config/uboot.release
    CHK include/generated/version_autogenerated.h
    CHK include/generated/timestamp_autogenerated.h
    UPD include/generated/timestamp_autogenerated.h
    CHK include/generated/generic-asm-offsets.h
    CHK include/generated/asm-offsets.h
    HOSTCC tools/mkenvimage.o
    HOSTLD tools/mkenvimage
    HOSTCC tools/fit_image.o
    HOSTCC tools/image-host.o
    HOSTCC tools/dumpimage.o
    HOSTLD tools/dumpimage
    HOSTCC tools/mkimage.o
    HOSTLD tools/mkimage
    CC arch/arm/cpu/armv7/am33xx/ddr.o
    CC arch/arm/cpu/armv7/am33xx/emif4.o
    CC arch/arm/cpu/armv7/am33xx/board.o
    LD arch/arm/cpu/armv7/am33xx/built-in.o
    LD arch/arm/cpu/armv7/built-in.o
    CC board/ti/am335x/board.o
    LD board/ti/am335x/built-in.o
    CC cmd/version.o
    LD cmd/built-in.o
    CC common/main.o
    CC common/board_f.o
    LD common/built-in.o
    CC drivers/usb/gadget/f_fastboot.o
    LD drivers/usb/gadget/built-in.o
    CC lib/display_options.o
    LD lib/built-in.o
    LD u-boot
    OBJCOPY u-boot-nodtb.bin
    MKIMAGE u-boot.img

    11:42:09 Build Finished (took 11s.801ms)

  • Hi Yordan,

    Any thoughts on my build process or earlier questions?

    Best regards,

    Chris

  • Hi Chris,

    've created a make target in CCS with the build command and target

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- u-boot.img

    It doesn't seem to be adding the dtb as it did with my u-boot.bin file. Please let me know if you have any suggestions.

    11:41:57 **** Build of configuration Default for project u-boot-2016.05+gitAUTOINC+b4e185a8c3-gb4e185a8c3 ****

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- u-boot.img  

    Your make command does not include the dtc. I usually cross-compile my u-boot & linux kernel on an Ubuntu host machine, using the make system provided with the sdk, like bellow:

     cd ~/ti-processor-sdk-linux-am335x-evm-03.00.00.04

     export ARCH=arm

     export PATH=~/ti-processor-sdk-linux-am335x-evm-03.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

     export CROSS_COMPILE=arm-linux-gnueabihf-

    And then I use the make file provided in ~/ti-processor-sdk-linux-am335x-evm-03.00.00.04:

     make u-boot_clean

     make u-boot

    If you look at this Makefile, you'll see that the command invoked by make u-boot consists of:

     u-boot: linux-dtbs

    @echo ===================================

    @echo    Building U-boot

    @echo ===================================

    $(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) $(UBOOT_MACHINE)

    $(MAKE) -j $(MAKE_JOBS) -C $(TI_SDK_PATH)/board-support/u-boot-* CROSS_COMPILE=$(CROSS_COMPILE) DTC=$(LINUXKERNEL_INSTALL_DIR)/scripts/dtc/dtc


    As you see the last part of the command: DTC=$(LINUXKERNEL_INSTALL_DIR)/scripts/dtc/dtc includes the device tree compiler, which adds the dtb in u-boot.img

    So my suggestion is to try the cross-compilation on a linux machine OR add the DTC variable to your environment & see if your board will boot successfully. 


    Best Regards, 
    Yordan

  • Hi Yordan,

    The warning message regarding the missing DT no longer appears on startup, but I'm still not able to jump to u-boot at entry point 0x80800000. How come it shows the message "Trying to boot from MMC2"? Does MMC2 in my console output refer to an mmc1 device? Why would it try to boot from MMC2?

    Thanks,

    Chris

    U-Boot SPL 2016.05-00236-ga206331-dirty (Nov 03 2016 - 15:44:55)

    musb-hdrc:ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    musb-hdrc: hw_ep 0shared, max 64
    musb-hdrc: hw_ep 1tx, max 512
    musb-hdrc: hw_ep 1rx, max 512
    musb-hdrc: hw_ep 2tx, max 512
    musb-hdrc: hw_ep 2rx, max 512
    musb-hdrc: hw_ep 3tx, max 512
    musb-hdrc: hw_ep 3rx, max 512
    musb-hdrc: hw_ep 4tx, max 512
    musb-hdrc: hw_ep 4rx, max 512
    musb-hdrc: hw_ep 5tx, max 512
    musb-hdrc: hw_ep 5rx, max 512
    musb-hdrc: hw_ep 6tx, max 512
    musb-hdrc: hw_ep 6rx, max 512
    musb-hdrc: hw_ep 7tx, max 512
    musb-hdrc: hw_ep 7rx, max 512
    musb-hdrc: hw_ep 8tx, max 512
    musb-hdrc: hw_ep 8rx, max 512
    musb-hdrc: hw_ep 9tx, max 512
    musb-hdrc: hw_ep 9rx, max 512
    musb-hdrc: hw_ep 10tx, max 256
    musb-hdrc: hw_ep 10rx, max 64
    musb-hdrc: hw_ep 11tx, max 256
    musb-hdrc: hw_ep 11rx, max 64
    musb-hdrc: hw_ep 12tx, max 256
    musb-hdrc: hw_ep 12rx, max 64
    musb-hdrc: hw_ep 13shared, max 4096
    musb-hdrc: hw_ep 14shared, max 1024
    musb-hdrc: hw_ep 15shared, max 1024
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc:ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    musb-hdrc: hw_ep 0shared, max 64
    musb-hdrc: hw_ep 1tx, max 512
    musb-hdrc: hw_ep 1rx, max 512
    musb-hdrc: hw_ep 2tx, max 512
    musb-hdrc: hw_ep 2rx, max 512
    musb-hdrc: hw_ep 3tx, max 512
    musb-hdrc: hw_ep 3rx, max 512
    musb-hdrc: hw_ep 4tx, max 512
    musb-hdrc: hw_ep 4rx, max 512
    musb-hdrc: hw_ep 5tx, max 512
    musb-hdrc: hw_ep 5rx, max 512
    musb-hdrc: hw_ep 6tx, max 512
    musb-hdrc: hw_ep 6rx, max 512
    musb-hdrc: hw_ep 7tx, max 512
    musb-hdrc: hw_ep 7rx, max 512
    musb-hdrc: hw_ep 8tx, max 512
    musb-hdrc: hw_ep 8rx, max 512
    musb-hdrc: hw_ep 9tx, max 512
    musb-hdrc: hw_ep 9rx, max 512
    musb-hdrc: hw_ep 10tx, max 256
    musb-hdrc: hw_ep 10rx, max 64
    musb-hdrc: hw_ep 11tx, max 256
    musb-hdrc: hw_ep 11rx, max 64
    musb-hdrc: hw_ep 12tx, max 256
    musb-hdrc: hw_ep 12rx, max 64
    musb-hdrc: hw_ep 13shared, max 4096
    musb-hdrc: hw_ep 14shared, max 1024
    musb-hdrc: hw_ep 15shared, max 1024
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Timed out in wait_for_event: status=0000
    Check if pads/pull-ups of bus 0 are properly configured
    Timed out in wait_for_event: status=0000
    Check if pads/pull-ups of bus 0 are properly configured
    Trying to boot from MMC2
    CMD_SEND:0
    ARG 0x00000000
    MMC_RSP_NONE
    CMD_SEND:8
    ARG 0x000001AA
    MMC_RSP_R1,5,6,7 0x000001AA 
    CMD_SEND:55
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000120 
    CMD_SEND:41
    ARG 0x40300000
    MMC_RSP_R3,4 0x00FF8000 
    CMD_SEND:55
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000120 
    CMD_SEND:41
    ARG 0x40300000
    MMC_RSP_R3,4 0xC0FF8000 
    CMD_SEND:2
    ARG 0x00000000
    MMC_RSP_R2 0x02544D53 
    0x41303847 
    0x1137262F 
    0xCD00D99D

    DUMPING DATA
    000 - 02 54 4D 53 
    004 - 41 30 38 47 
    008 - 11 37 26 2F 
    012 - CD 00 D9 9D 
    CMD_SEND:3
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x12340500 
    CMD_SEND:9
    ARG 0x12340000
    MMC_RSP_R2 0x400E0032 
    0x5B590000 
    0x3A477F80 
    0x0A40000B

    DUMPING DATA
    000 - 40 0E 00 32 
    004 - 5B 59 00 00 
    008 - 3A 47 7F 80 
    012 - 0A 40 00 0B 
    CMD_SEND:13
    ARG 0x12340000
    MMC_RSP_R1,5,6,7 0x00000700 
    CURR STATE:3
    CMD_SEND:7
    ARG 0x12340000
    MMC_RSP_R1,5,6,7 0x00000700 
    CMD_SEND:55
    ARG 0x12340000
    MMC_RSP_R1,5,6,7 0x00000920 
    CMD_SEND:51
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000920 
    CMD_SEND:6
    ARG 0x00FFFFF1
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:6
    ARG 0x80FFFFF1
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:55
    ARG 0x12340000
    MMC_RSP_R1,5,6,7 0x00000920 
    CMD_SEND:6
    ARG 0x00000002
    MMC_RSP_R1,5,6,7 0x00000920 
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900 
    part_init: try 'EFI': ret=-1
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900 
    part_init: try 'DOS': ret=0
    mmc_init: 0, time 227
    spl: mmc boot mode: fs
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000800
    MMC_RSP_R1,5,6,7 0x00000900 
    reading args
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000800
    MMC_RSP_R1,5,6,7 0x00000900 
    VFAT Support enabled
    FAT32, fat_sect: 32, fatlength: 1103
    Rootdir begins at cluster: 2, sector: 2238, offset: 117c00
    Data begins at: 2236
    Sector size: 512, cluster size: 1
    FAT read(sect=2238, cnt:1), clust_size=1, DIRENTSPERBLOCK=16
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x000010BE
    MMC_RSP_R1,5,6,7 0x00000900 
    RootMismatch: |mlo||
    Rootvfatname: |u-boot.img|
    RootMismatch: |u-boot.img|u-boot.img|
    RootMismatch: |u-boot.img||
    Rootvfatname: |uenv.txt|
    RootMismatch: |uenv.txt|uenv.txt|
    RootMismatch: |uenv.txt||
    RootDentname == NULL - 6
    spl_load_image_fat_os: error reading image args, err - -1
    reading u-boot.img
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000800
    MMC_RSP_R1,5,6,7 0x00000900 
    VFAT Support enabled
    FAT32, fat_sect: 32, fatlength: 1103
    Rootdir begins at cluster: 2, sector: 2238, offset: 117c00
    Data begins at: 2236
    Sector size: 512, cluster size: 1
    FAT read(sect=2238, cnt:1), clust_size=1, DIRENTSPERBLOCK=16
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x000010BE
    MMC_RSP_R1,5,6,7 0x00000900 
    RootMismatch: |mlo||
    Rootvfatname: |u-boot.img|
    RootName: u-boot.img, start: 0x2b74, size: 0xb0e1c 
    Filesize: 724508 bytes
    64 bytes
    gc - clustnum: 11124, startsect: 13360
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00003C30
    MMC_RSP_R1,5,6,7 0x00000900 
    Size: 724508, got: 64
    Found FIT
    FIT header read: destination = 0x807ff700, size = 898
    reading u-boot.img
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000800
    MMC_RSP_R1,5,6,7 0x00000900 
    VFAT Support enabled
    FAT32, fat_sect: 32, fatlength: 1103
    Rootdir begins at cluster: 2, sector: 2238, offset: 117c00
    Data begins at: 2236
    Sector size: 512, cluster size: 1
    FAT read(sect=2238, cnt:1), clust_size=1, DIRENTSPERBLOCK=16
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x000010BE
    MMC_RSP_R1,5,6,7 0x00000900 
    RootMismatch: |mlo||
    Rootvfatname: |u-boot.img|
    RootName: u-boot.img, start: 0x2b74, size: 0xb0e1c 
    Filesize: 724508 bytes
    2200 bytes
    FAT32: entry: 0x2b74 = 11124, offset: 0x0174 = 372
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:18
    ARG 0x00000874
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900 
    FAT32: ret: 00000000, offset: 0174
    gc - clustnum: 11124, startsect: 13360
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00003C30
    MMC_RSP_R1,5,6,7 0x00000900 
    FAT32: entry: 0x2b74 = 11124, offset: 0x0174 = 372
    FAT32: ret: 00000000, offset: 0174
    curclust: 0x0
    Invalid FAT entry
    Size: 724508, got: 512
    data_offset=0, data_size=797b4
    Temp u-boot.bin read from fit: dst = 0x80800000, file offset = 0x880, size = 0x797b4
    reading u-boot.img
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000800
    MMC_RSP_R1,5,6,7 0x00000900 
    VFAT Support enabled
    FAT32, fat_sect: 32, fatlength: 1103
    Rootdir begins at cluster: 2, sector: 2238, offset: 117c00
    Data begins at: 2236
    Sector size: 512, cluster size: 1
    FAT read(sect=2238, cnt:1), clust_size=1, DIRENTSPERBLOCK=16
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x000010BE
    MMC_RSP_R1,5,6,7 0x00000900 
    RootMismatch: |mlo||
    Rootvfatname: |u-boot.img|
    RootName: u-boot.img, start: 0x2b74, size: 0xb0e1c 
    Filesize: 724508 bytes
    499788 bytes
    FAT32: entry: 0x2b74 = 11124, offset: 0x0174 = 372
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:18
    ARG 0x00000874
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900 
    FAT32: ret: 00000000, offset: 0174
    curclust: 0x0
    Invalid FAT entry
    Size: 724508, got: 0
    spl_load_image_fat: error reading image u-boot.img, err - -5
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900 
    <2, 0, 1024>
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:18
    ARG 0x00000802
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900 
    Failed to mount ext2 filesystem...
    spl_load_image_ext_os: ext4fs mount err - 0
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:17
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900 
    <2, 0, 1024>
    CMD_SEND:16
    ARG 0x00000200
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:18
    ARG 0x00000802
    MMC_RSP_R1,5,6,7 0x00000900 
    CMD_SEND:12
    ARG 0x00000000
    MMC_RSP_R1b 0x00000900 
    Failed to mount ext2 filesystem...
    spl_load_image_ext: ext4fs mount err - 0
    Jumping to U-Boot
    loaded - jumping to U-Boot...image entry point: 0x80800000

  • Hi Chris,

    Can you share the .dts & .dtsi files you're using?
    Also the board.c & mux.c files, where you do the u-boot configuration?

    Best Regards,
    Yordan
  • Hi Yordan,

    We've discovered the problem. During SPL our board was not found in board.c function board_fit_config_name_match(). As a result, SPL was failing while trying to find an appropriate FDT in spl_fit_select_fdt inside the u-boot image. Since we're not currently using the EEPROM to store board name and serial number, we hard-coded these constants using the function ti_i2c_eeprom_am_set(const char *name, const char *rev).

    We're now able to succesfully load u-boot using the SD card. Next, the program hangs when trying to load and transfer control to the Linux kernel. I'll re-post this new issue in another thread as this original topic has been solved.

    Thanks again for your support!

    Best regards,

    Chris

  • Thanks for updating the thread.

    Best Regards,
    Yordan