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.

Booting U-Boot from the console UART on am335x EVM

Hi All,

     1. Using am335x SDK.

     2. As given at the end of this link/wiki --- http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide,

In some cases we support loading SPL and U-Boot over the console UART. You will need to use the spl/u-boot-spl.bin and u-boot.img files to boot. As per the TRM, the file is to be loaded via the X-MODEM protocol at 115200 baud 8 stop bits no parity (same as using it for console). SPL in turn expects to be sent u-boot.img at the same rate but via Y-MODEM. An example session from the host PC, assuming console is on ttyUSB0 and already configured would be and the lrzsz package is installed

I ran the following cmd  on my host,

sx -kb ./MLO ./u-boot.img < /dev/ttyUSB0 > /dev/ttyUSB0.

3. I got following prints,

Sending ./MLO, 843 blocks: Give your local XMODEM receive command now.
Bytes Sent: 108032   BPS:10880                           
Sending ./u-boot.img, 3045 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent:   0/ 0kRetry 0: Timeout on sector ACK
Retry 0: Timeout on sector ACK
Retry 0: Timeout on sector ACK
Retry 0: Timeout on sector ACK

Please tell me what I should do to successfully transfer the images and get uboot prompt. I used the images generated by typing - make am335x_evm

Regards,

Gangadhar

  • Hi Gangadhar,

    Here are my steps to successfully boot to U-Boot via UART. I'm using picocom.

    1. Build U-Boot:
    # make am335x_evm

    2. Save the generated u-boot.img and also the u-boot-spl.bin from the ./spl folder.

    3. Set the EVM switches for UART boot (1-5: 10000)

    4. Start picocom from the folder containing the UART boot images (board is OFF):
    # picocom -b 115200 /dev/ttyS0 --send-cmd "sx -vv"

    5. Press CTRL+A; CTRL+S; to send the u-boot-spl.bin file via UART and then start the board.

    6. After transfer is complete press CTRL+A; CTRL+S; to send the u-boot.img file.

    7. After transfer is complete interrupt the boot sequence to enter U-Boot mode.

    Best regards,
    Miroslav

  • Hi Miroslav,

                         I tried the steps you gave me but I'm still not able to transfer uboot. I've also inserted my switch pos and prints.

    picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"
    picocom v1.4

    port is        : /dev/ttyUSB0
    flowcontrol    : none
    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx -vv
    receive_cmd is : rz -vv

    Terminal ready

    *** file: MLO
    sx -vv MLO
    Sending MLO, 843 blocks: Give your local XMODEM receive command now.
    Bytes Sent: 108032   BPS:8982                            

    Transfer complete

    *** exit status: 0

    *** file: u-boot.img
    sx -vv u-boot.img
    Sending u-boot.img, 3045 blocks: Give your local XMODEM receive command now.
    Xmodem sectors/kbytes sent:   0/ 0kRetry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Timeout on sector ACK
    Retry 0: Retry Count Exceeded

    Transfer incomplete

    *** exit status: 128

    Regards,

    Gangadhar

  • Gangadhar,

    Is your "MLO" file the "u-boot-spl.bin" from the <u-boot_dir>/spl folder? Did you rename it?

    Best regards,
    Miroslav

  • Thanks a lot Miroslav. I was not using spl/u-boot-spl.bin instead was using MLO in <u-boot_dir>.

    Can you please tell me the difference between these two images?

     

    Regards,

    Gangadhar

  • Here is some information:

    • spl/u-boot-spl.bin - The second-stage bootloader (a stripped down version of u-boot that fits in SRAM).
    • MLO - spl/u-boot-sp.bin with a GP image header prepended to it.

    Best regards,
    Miroslav

  • Hi All,


    This post is very helpful. I am able to boot BeagleBoneBlack to U-Boot prompt. Following is the sequence.

    Note: When you give file u-boot.img, it takes some time to start transferring, please be patient.

    picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"
    picocom v1.7

    port is        : /dev/ttyUSB0
    flowcontrol    : none
    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    local echo is  : no
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx -vv
    receive_cmd is : rz -vv
    imap is        :
    omap is        :
    emap is        : crcrlf,delbs,

    Terminal ready
    (Ctrl+A Ctrl +S)
    *** file: u-boot-spl.bin
    sx -vv u-boot-spl.bin
    Sending u-boot-spl.bin, 645 blocks: Give your local XMODEM receive command now.
    Bytes Sent:  82688   BPS:6420                            

    Transfer complete

    *** exit status: 0

    U-Boot SPL 2015.04 (Jun 27 2015 - 16:57:35)
    C#Acknowledgement

    (Ctrl+A Ctrl +S)
    *** file: u-boot.img
    sx -vv u-boot.img
    Sending u-boot.img, 3130 blocks: Give your local XMODEM receive command now.
    Xmodem sectors/kbytes sent:   0/ 0kRetry 0: NAK on sector
    Bytes Sent: 400640   BPS:4286                            

    Transfer complete

    *** exit status: 0
    xyzModem - CRC mode, 3131(SOH)/0(STX)/0(CAN) packets, 3 retries
    Loaded 400640 bytes

    #Booting


    U-Boot 2015.04 (Jun 27 2015 - 16:57:35)

           Watchdog enabled
    I2C:   ready
    DRAM:  512 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Using default environment

    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0

  • Hi ,
    I followed above step but i got below logs.we are using am335x evm .
    veera@FSETBLR1LX046:~$ sudo picocom -b 115200 /dev/ttyUSB1 --send-cmd "sx -vv"
    picocom v1.7

    port is : /dev/ttyUSB1
    flowcontrol : none
    baudrate is : 115200
    parity is : none
    databits are : 8
    escape is : C-a
    local echo is : no
    noinit is : no
    noreset is : no
    nolock is : no
    send_cmd is : sx -vv
    receive_cmd is : rz -vv
    imap is :
    omap is :
    emap is : crcrlf,delbs,

    Terminal ready

    *** file: u-boot-spl.bin
    sx -vv u-boot-spl.bin
    Sending u-boot-spl.bin, 601 blocks: Give your local XMODEM receive command now.
    Bytes Sent: 77056 BPS:3233

    Transfer complete

    *** exit status: 0
    CCCCCCCCCCCCCCCCCCCCCCCCCC