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.

AM3354: U-Boot Board Port

Part Number: AM3354

Hi,

Customer ports customized UBOOT to his custom board (Based on GP EVM) referring to software-dl.ti.com/.../U-Boot.html. It failed when booting from SD card.

U-Boot SPL 2019.01-gc14892445a-dirty (Nov 13 2020 - 10:04:39 +0800)

Trying to boot from MMC1


U-Boot 2019.01-gc14892445a-dirty (Nov 13 2020 - 10:04:39 +0800)

CPU : AM335X-GP rev 2.1
Model: TI AM335x EVM
DRAM: 512 MiB
NAND: 1024 MiB
MMC: OMAP SD/MMC: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

<ethaddr> not set. Validating first E-fuse MAC
Net: eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is de:ad:be:ef:00:01
Address in environment is 0c:b2:b7:9d:8f:c8
, eth1: usb_ether
Hit any key to stop autoboot: 0
WARNING: Could not determine device tree to use
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
** Unable to read file uEnv.txt **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Invalid partition 2 **
** Invalid partition 2 **
MMC Device 1 not found
no mmc device at slot 1
MMC Device 1 not found
no mmc device at slot 1
SD/MMC found on device 1
## Error: "bootcmd_nand0" not defined
starting USB...
USB0: Port not available.
ethernet@4a100000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready\

He replaces DDR part number with MT41K256M16, flash part number with MT29F8G08ABACA, power management part number with TPS65910, ethernet part number with KSZ9031RNX, and removes audio module/ wifi module.

  • From the u-boot log, there seems some issue with kernel dtb file detected, and access to kernel image and dtb file from rootfs partition.
    Can we run the following cmds @u-boot prompt?

    1/. check dtb file
    => run findfdt
    => printenv fdtfile
    2/. check kernel uImage, dtb file
    => mmc part
    => fstype mmc 0:2
    => ls mmc 0:2			
    => ls mmc 0:2 boot	

  • WARNING: Could not determine device tree to use
    => printenv fdtfile
    fdtfile=undefined
    => mmc part

    Partition Map for MMC device 0 -- Partition Type: DOS

    Part Start Sector Num Sectors UUID Type
    1 2048 143360 cc3ffb49-01 0c Boot
    2 145408 122210304 cc3ffb49-02 83
    => fstype mmc 0:2
    ext4
    => ls mmc 0:2
    <DIR> 4096 .
    <DIR> 4096 ..
    <DIR> 4096 lib
    <DIR> 4096 media
    <DIR> 4096 home
    <DIR> 4096 proc
    <DIR> 4096 dev
    <SYM> 19 linuxrc
    <DIR> 4096 tmp
    <DIR> 4096 www
    <DIR> 4096 boot
    <DIR> 4096 include
    <DIR> 4096 var
    <DIR> 4096 sys
    <DIR> 4096 sbin
    <DIR> 4096 mnt
    <DIR> 4096 bin
    <DIR> 4096 usr
    <DIR> 4096 srv
    <DIR> 4096 etc
    <DIR> 4096 run
    <DIR> 4096 opt
    => ls mmc 0:2 boot
    <DIR> 4096 .
    <DIR> 4096 ..
    37965 am335x-boneblack-prusuart.dtb
    37192 am335x-boneblack-pru-adc.dtb
    37566 am335x-icev2-prueth-pps.dtb
    54744 am335x-evm.dtb
    35001 am335x-bone.dtb
    35225 am335x-bonegreen.dtb
    37124 am335x-icev2.dtb
    34055 am335x-pocketbeagle.dtb
    36717 am335x-boneblack.dtb
    15894420 vmlinux-4.19.94-gbe5389fd85
    39511 am335x-icev2-pru-excl-uio.dtb
    40236 am335x-evmsk.dtb
    36352 am335x-boneblue.dtb
    37305 am335x-sancloud-bbe.dtb
    37166 am335x-icev2-prueth.dtb
    37092 am335x-boneblack-iot-cape.dtb
    <SYM> 26 zImage
    37934 am335x-boneblack-wireless.dtb
    36542 am335x-bonegreen-wireless.dtb
    4280832 zImage-4.19.94-gbe5389fd85
    =>

  • Below is the latest log:

    CCCCCCCC
    U-Boot SPL 2019.01-gc14892445a-dirty (Nov 16 2020 - 17:20:03 +0800)
    Trying to boot from MMC1


    U-Boot 2019.01-gc14892445a-dirty (Nov 16 2020 - 17:20:03 +0800)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM
    DRAM: 512 MiB
    NAND: 1024 MiB
    MMC: OMAP SD/MMC: 0
    Loading Environment from FAT... *** Warning - bad CRC, using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is de:ad:be:ef:00:01
    Address in environment is 0c:b2:b7:9d:8f:c8
    , eth1: usb_ether
    Hit any key to stop autoboot: 0
    WARNING: Could not determine device tree to use
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** Unable to read file boot.scr **
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    4280832 bytes read in 367 ms (11.1 MiB/s)
    ** File not found /boot/undefined **

    Starting kernel ...

    CCCCCCCCCCCCCCCC
    U-Boot SPL 2019.01-gc14892445a-dirty (Nov 16 2020 - 17:20:03 +0800)
    Trying to boot from MMC1


    U-Boot 2019.01-gc14892445a-dirty (Nov 16 2020 - 17:20:03 +0800)

    CPU : AM335X-GP rev 2.1

    Model: TI AM335x EVM
    DRAM: 512 MiB
    NAND: 1024 MiB
    MMC: OMAP SD/MMC: 0
    Loading Environment from FAT... *** Warning - bad CRC, using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is de:ad:be:ef:00:01
    Address in environment is 0c:b2:b7:9d:8f:c8
    , eth1: usb_ether
    Hit any key to stop autoboot: 0 
    WARNING: Could not determine device tree to use
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** Unable to read file boot.scr **
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    4280832 bytes read in 367 ms (11.1 MiB/s)
    ** File not found /boot/undefined **

    Starting kernel ...

  • Hi Nancy,
    The issue seems being triggered from undefined kernel dtb file.
    I'm listing below "findfdt" u-boot environment variable definition in file "/include/configs/am335x_evm.h".

    	"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 $fdtfile = undefined; then " \
    			"echo WARNING: Could not determine device tree to use; fi; \0" \

    where "fdtfile" is set to the matching dtb file based on the "board_name" which is detected in SPL via reading EEPROM on TI reference boards.
    Depending on your design, one option is to simplify "findfdt" to select your own kernel dtb file as
    "findfdt=setenv fdtfile am335x-<xyz_board>.dtb\0"
    Also copy the am335x-<xyz_board>.dtb to the boot partition of rootfs.

    Best,

    -Hong