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.

Linux/AM3358: Custom board without USB boot up issue

Part Number: AM3358

Tool/software: Linux

HI,

I have a custom board using AM3358, and it does not have any USB. I am trying to boot the board with Sitara SDK but it stops at U-boot when it can't find a USB. How can I create a custom boot-loader without USB? 

Thank you

  • Hello Samy,

    Probably your custom board failed to boot from all boot devices and since it tried to boot form USB as a last resort and stuck there, you got that impression that it stuck on USB detection. Can you attach the complete boot log to check this?

    Best regards,
    Kemal
  • Hi Kemal,

    Thanks for quick reply. Following is my boot log:

    U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11 -0400)

    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
    MMC: no card present
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0: Port not available.
    link up on port 0, 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


    I am not sure why the board would not boot from sd-card, since it boots fine with the beaglebone image.

    Thanks
  • Can you enter these commands in U-Boot console and retry?

    => env default -f -a
    => saveenv

  • It did not make a difference. Still says "MMC: no card present"

    Please see the log below:

    U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11 -0400)

    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
    MMC: no card present
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    =>
    => env default -f -a
    ## Resetting to default environment
    => saveenv
    Saving Environment to FAT...
    MMC: no card present
    ** Bad device mmc 0 **
    => reset
    resetting ...

    U-Boot SPL 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11)
    Trying to boot from MMC1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

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


    U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11 -0400)

    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
    MMC: no card present
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0: Port not available.
    link up on port 0, 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
    BOOTP broadcast 18
    DHCP client bound to address 172.16.0.123 (30805 ms)
    Using cpsw device
    TFTP from server 0.0.0.0; our IP address is 172.16.0.123; sending through gatew1
    Filename 'zImage'.
    Load address: 0x82000000
    Loading: *
    TFTP error: 'File not found or No Access' (1)
    Not retrying...
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-30-45-11-78-ae-8b
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC10007B
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC10007
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC1000
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC100
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC10
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC1
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/A
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm-am33xx
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Config file not found
    starting USB...
    USB0: Port not available.
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    DHCP client bound to address 172.16.0.123 (4 ms)
    Using cpsw device
    TFTP from server 0.0.0.0; our IP address is 172.16.0.123; sending through gatew1
    Filename 'boot.scr.uimg'.
    Load address: 0x80000000
    Loading: *
    TFTP error: 'File not found or No Access' (1)
    Not retrying...
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    DHCP client bound to address 172.16.0.123 (4 ms)
    Using cpsw device
    TFTP from server 0.0.0.0; our IP address is 172.16.0.123; sending through gatew1
    Filename 'boot.scr.uimg'.
    Load address: 0x82000000
    Loading: *
    TFTP error: 'File not found or No Access' (1)
    Not retrying...
  • Can you try to boot with the U-Boot from the latest Processor SDK? There was an issue in U-Boot 2017.01 version on eMMC detection which may cause this SD card detection issue on your custom board.

  • I tried the latest SDK and still ended up with the same problem. I even tried setting "env default -f -a" but no luck.
    Following is my boot log:

    U-Boot 2018.01-g313dcd69c2 (Dec 16 2018 - 09:01:09 +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
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc1(part 0) is current device
    ** No partition table - mmc 1 **
    switch to partitions #0, OK
    mmc1(part 0) is current device
    SD/MMC found on device 1
    ** No partition table - mmc 1 **
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0: Port not available.
    link up on port 0, 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
    BOOTP broadcast 18
    DHCP client bound to address 172.16.0.123 (30792 ms)
    Using cpsw device
    TFTP from server 0.0.0.0; our IP address is 172.16.0.123; sending through gatew1
    Filename 'zImage'.
    Load address: 0x82000000
    Loading: *
    TFTP error: 'File not found or No Access' (1)
    Not retrying...
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-30-45-11-78-ae-8b
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC10007B
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC10007
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC1000
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC100
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC10
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC1
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/AC
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/A
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm-am33xx
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default-arm
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Retrieving file: pxelinux.cfg/default
    link up on port 0, speed 100, full duplex
    *** ERROR: `serverip' not set
    Config file not found
    starting USB...
    USB0: Port not available.
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    DHCP client bound to address 172.16.0.123 (2 ms)
    Using cpsw device
    TFTP from server 0.0.0.0; our IP address is 172.16.0.123; sending through gatew1
    Filename 'boot.scr.uimg'.
    Load address: 0x80000000
    Loading: *
    TFTP error: 'File not found or No Access' (1)
    Not retrying...
    link up on port 0, speed 100, full duplex
    BOOTP broadcast 1
    DHCP client bound to address 172.16.0.123 (2 ms)
    Using cpsw device
    TFTP from server 0.0.0.0; our IP address is 172.16.0.123; sending through gatew1
    Filename 'boot.scr.uimg'.
    Load address: 0x82000000
    Loading: *
    TFTP error: 'File not found or No Access' (1)
    Not retrying...
    => env default -f -a
    ## Resetting to default environment
    => saveenv
    Saving Environment to FAT...
    ** Bad device mmc 0 **

    Thanks
  • You are trying to boot from SD card right? Can you share the SD card part of your board's schematic?
  • Yes I am trying to boot from SD card and eMMC is empty in my board. I was able to boot my board successfully from beaglebone's image, but I am not sure why I am having trouble with Sd card detection in TI SDK.

    Here are my SD card and boot sequence schematics.

  • Any suggestions on how to make my board boot on TI SDK would be greatly appreciated!

    Thanks!

  • Post me the processor side where these MMC pins are connected.
  • Processor side is similar to beaglebone.
  • Can you check whether your board boots with these attached images?

    MLO_and_u-boot.img_with_hardcoded_A335BNLT_board_name.tar.xz

  • I tested with the MLO and U-boot you provided and still the same issue. Bad device mmc 0.

  • Have you tried to boot with another SD card?
  • Yes I have tried with multiple SD cards. Same SD card works fine with beaglebone black with the same image. Same SD card also works fine with my custom board on a beaglebone's image. But it just doesn't want to boot with TI SDK.
    Is there any other way I can boot the board like TFTP or NFS and then flash eMMC through that?
  • Yes, there is but, can you post the output of these commands? Do you have the source code of the beaglebone's U-Boot image? Can you compress and attach it?

    => mmc list
    => mmc dev 0
    => mmc part
    => mmc info
    => mmc dev 1
    => mmc part
    => mmc info
    => mmc rescan
    => mmc list
    => mmc dev 0
    => mmc dev 1
  • Here is the output for all these commands:

    => mmc list                                                                    

    OMAP SD/MMC: 0                                                                  

    OMAP SD/MMC: 1 (eMMC)                                                          

    => mmc dev 0                                                                    

    => mmc part                                                                    

    ## Unknown partition table type 0                                              

    => mmc info                                                                    

    Device: OMAP SD/MMC                                                            

    Manufacturer ID: 45                                                            

    OEM: 100                                                                        

    Name: DG400                                                                    

    Bus Speed: 48000000                                                            

    Mode : MMC High Speed (52MHz)                                                  

    Rd Block Len: 512                                                              

    MMC version 5.1                                                                

    High Capacity: Yes                                                              

    Capacity: 7.3 GiB                                                              

    Bus Width: 4-bit                                                                

    Erase Group Size: 512 KiB                                                      

    User Capacity: 7.3 GiB WRREL                                                    

    Boot Capacity: 4 MiB ENH                                                        

    RPMB Capacity: 4 MiB ENH                                                        

    => mmc dev 1                                                                    

    switch to partitions #0, OK                                                    

    mmc1(part 0) is current device                                                  

    => mmc part                                                                    

    ## Unknown partition table type 0                                              

    => mmc info                                                                    

    Device: OMAP SD/MMC                                                            

    Manufacturer ID: 45                                                            

    OEM: 100                                                                        

    Name: DG400                                                                    

    Bus Speed: 48000000                                                            

    Mode : MMC High Speed (52MHz)                                                  

    Rd Block Len: 512                                                              

    MMC version 5.1                                                                

    High Capacity: Yes                                                              

    Capacity: 7.3 GiB                                                              

    Bus Width: 4-bit                                                                

    Erase Group Size: 512 KiB                                                      

    User Capacity: 7.3 GiB WRREL                                                    

    Boot Capacity: 4 MiB ENH                                                        

    RPMB Capacity: 4 MiB ENH                                                        

    => mmc rescan                                                                  

    => mmc list                                                                    

    OMAP SD/MMC: 0                                                                  

    OMAP SD/MMC: 1 (eMMC)                                                          

    => mmc dev 0                                                                    

    => mmc dev 1                                                                    

    switch to partitions #0, OK                                                    

    mmc1(part 0) is current device

    I am not able to attach u-boot as the file size is 170MB even after compressing it. This link here shows how to get u-boot for beaglebone: www.digikey.com/.../BeagleBone Black

  • Can you now boot the board with the beaglebone's U-Boot image, and post the output of these commands again to compare them?

    => mmc list
    => mmc dev 0
    => mmc part
    => mmc info
    => mmc dev 1
    => mmc part
    => mmc info
    => mmc rescan
    => mmc list
    => mmc dev 0
    => mmc dev 1
  • Here it is:

    => mmc list
    OMAP SD/MMC: 0 (SD)
    OMAP SD/MMC: 1
    => mmc dev 0
    switch to partitions #0, OK
    mmc0 is current device
    => mmc part

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

    Part Start Sector Num Sectors UUID Type
    1 8192 6955008 7f863e1e-01 83 Boot
    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 3
    OEM: 5344
    Name: SL08G
    Bus Speed: 48000000
    Mode : SD High Speed (50MHz)
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 7.4 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 3
    OEM: 5344
    Name: SL08G
    Bus Speed: 48000000
    Mode : SD High Speed (50MHz)
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 7.4 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    => mmc dev 1
    switch to partitions #0, OK
    mmc1(part 0) is current device
    => mmc part
    ## Unknown partition table type 0
    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 45
    OEM: 100
    Name: DG400
    Bus Speed: 48000000
    Mode : MMC High Speed (52MHz)
    Rd Block Len: 512
    MMC version 5.1
    High Capacity: Yes
    Capacity: 7.3 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 KiB
    HC WP Group Size: 8 MiB
    User Capacity: 7.3 GiB WRREL
    Boot Capacity: 4 MiB ENH
    RPMB Capacity: 4 MiB ENH
    => mmc rescan
    => mmc list
    OMAP SD/MMC: 0 (SD)
    OMAP SD/MMC: 1 (eMMC)
    => mmc dev 0
    switch to partitions #0, OK
    mmc0 is current device
    => mmc dev 1
    switch to partitions #0, OK
    mmc1(part 0) is current device
  • Please see this message.

    => mmc dev 0
    switch to partitions #0, OK
    mmc0 is current device

    You must see the same message with the Processor SDK too.

    You have the two U-Boot sources right?
    Can you compare the <Processor SDK>/board-support/u-boot-<version>/board/ti/am335x/board.c, <Processor SDK>/board-support/u-boot-<version>/board/ti/am335x/mux.c, <Processor SDK>/board-support/u-boot-<version>/configs/am335x_evm_defconfig, <Processor SDK>/board-support/u-boot-<version>/arch/arm/dts/am335x-boneblack.dts, <Processor SDK>/board-support/u-boot-<version>/arch/arm/dts/am335x-bone-common.dtsi files and see what is different in the beaglebone's U-Boot?

  • I finally got the board to boot up on TI SDK. I used beaglebone's u-boot and added a uEnv.txt and got it working. Now the board is booting but on my HDMI display, red and blue colors are inverted. I tried all the things on the following link but nothing changed:
    software-dl.ti.com/.../Foundational_Components_Graphics.html

    Any suggestion on how to fix this?
  • Please, close this thread by clicking on "This resolved my Issue" button and create a new thread for the inverted red and blue colors.

    Also, did you format the eMMC on your board? Is it working properly?
  • I did not do anything with eMMC and yes it seems to work properly.
    Thank you so much for your help!