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.

AM3358: SD card boot issue on Beaglebone Black

Part Number: AM3358

Hi

We are Planing to Design our IoT Gateway and for this, we are planning to us AM335x Processor and We are developing our Proto Model in Beaglebone Black and we are facing lot of issue in booting from SD card please have a look into the Build process and U-boot log 

Toolchain Used for Compiling - gcc-linaro-6.5.0-2018.12- arm-linux-gnueabihf


For Cloning the U-Boot We used - git clone git://git.denx.de/u-boot.git u-boot/

For Compiling U-Boot we Follow below-listed steps - 

1. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean

2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_evm_defconfig

3.make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

after that, we successfully generate the required MLO and u-boot.img file and copy it to the boot partition (FAT32) of the SD Card 

but we can't access the u-boot terminal 

Please find the log 

Trying to boot from MMC1


U-Boot 2020.01-00613-gd7bb6aceb2-dirty (Jan 23 2020 - 13:46:53 +0530)

CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
WDT: Started with servicing (60s timeout)
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
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 c8:df:84:c9:7d:06
, eth1: usb_ether
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
370 bytes read in 5 ms (72.3 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc0 ...
Running uenvcmd ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!
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
mmc_init_stream: timedout waiting for cc!
omap_hsmmc_send_cmd : timeout: No status update
mmc_init_stream: timedout waiting for cc!
omap_hsmmc_send_cmd : timeout: No status update
SD/MMC found on device 1
mmc_init_stream: timedout waiting for cc!
omap_hsmmc_send_cmd : timeout: No status update
## Error: "bootcmd_nand0" not defined
starting USB...
Bus usb@47401800: Port not available.
ethernet@4a100000 Waiting for PHY auto negotiation to complete.....................................................................................................................................................

Thanks in advance 

  • Saikat,

    can you please use our production Linux SDK for AM335x, available for download at: http://software-dl.ti.com/processor-sdk-linux/esd/AM335X/latest/index_FDS.html

    It includes an SD card image (can be programmed to a card via the included bin/create_sd_card.sh script) as well as "TI U-Boot" and "TI Kernel" source trees that we regression test for many use cases and scenarios across an entire farm of boards. Using this as a known-good starting point you can then build your own solution on top of that.

    Also while "pure" upstream support for AM335x in U-Boot is quite good and rather full-featured this is not what we test and would recommend for production. We do however every year use the latest U-Boot/Kernel (LTS) trees to re-base our TI customizations, such as for example our upcoming Processor SDK v7.xx series will be based on the 2020 U-Boot, so you should never really get stuck with an "old" U-Boot or Kernel.

    Regards, Andreas

  • Hi Andreas

    Thanks for your reply. it was really helpfull

    Action 1 - I have followed all the steps as per instruction in getting started guide and fundamental Components and build a custom image for u-boot.img and MLO and copied it to boot partition (FAT) of the SD Card and try to boot but the same thing is happening like previous.

    Observation 1 - I copied the kernel image into the rootfs partition and try to boot from SD card and Then it successfully boots the kernel.

    Expectation 1 - I am very new in embedded Linux and As per my knowledge and understanding - When the MLO hands off to u-boot then u-boot start looking for uEnv.txt for environmental variable and boot command and kernel location for booting. We can also configure this manually into the u-boot command line Like - U-Boot # but in beaglebone black every time if I am not providing the kernel then it start looking for kernel in different location like USB etc. but ideally it should not behave like that.

    Observation 2 - I also copied the prebuild image and test the same thing but the result is the same.

    Observation 3 - I don't find any uEnv.txt in the prebuild image. 

    Please Guide me if I am doing anything wrong 

    Waiting for valuable feedback 

  • Saikat,

    Saikat Jana1 said:

    Observation 2 - I also copied the prebuild image and test the same thing but the result is the same.

    Observation 3 - I don't find any uEnv.txt in the prebuild image.

    I assume you are are using the SD card image created with the bin/create-sdcard.sh script from the AM335x Processor SDK. That image is tested to be able to boot to Kernel without any further interaction required (just tested it myself actually).

    Another thing to look into, the BBB has an on-board eMMC, which might be what your U-Boot gets loaded from, resulting in some kind of incompatibility with the SD card image. With the current SDK your initial boot prints should look like this (note the U-Boot version number and git tag):

    U-Boot SPL 2019.01-g029e4c009a (Oct 19 2019 - 23:14:52 +0000)
    Trying to boot from MMC1
    
    
    U-Boot 2019.01-g029e4c009a (Oct 19 2019 - 23:14:52 +0000)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    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  38:d2:69:62:73:e4
    , eth1: usb_ether
    Hit any key to stop autoboot:  0

    If that is not the case try erasing the eMMC boot sector as follows, and then reset the board and re-try.

    => mmc dev 1:0 && mmc erase 0 c00
    switch to partitions #0, OK
    mmc1(part 0) is current device
    
    MMC erase: dev # 1, block # 0, count 3072 ... 3072 blocks erased: OK
    => 
    

    Regards, Andreas

  • Hi Andreas

    Thanks for the help

    Now I am successfully boot up the kernel and also I have tested the u boot console and boot manually.

    As I describe in the Previously we are planing to build our custom board so in that case we need to change various part of uboot and I alrady check with different uboot driver code like gpio/i2c etc and modifi the board init routine but I dint find anything related to RAM or emmc driver

    Please suggest me something for further reading and how to get into internal details of uboot working and source code

  • Hi Saikat,

    Saikat Jana1 said:
    Now I am successfully boot up the kernel and also I have tested the u boot console and boot manually.

    Glad to hear you got this working now. As for further reading I suggest to review the SDK documentation in detail:
    http://software-dl.ti.com/processor-sdk-linux/esd/docs/06_01_00_08/linux/Overview.html

    Then, I would also encourage you searching on the Internet for common U-Boot related questions, approaches, and solutions. There is a wealth of information out there. Also please try to limit your questions on the E2E to topics specifically around our devices, SDKs, and tools (also please start a new thread if you have a specific question, as these threads are not meant to be an ongoing communications channel of sorts). I'm going to close this one now since your original question has been resolved.

    Regards, Andreas