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.

AM1808 - Failed in u-boot updating in SPI-flash from u-boot

Other Parts Discussed in Thread: AM1808, OMAP-L138, OMAP-L137

Hi,

I'm experimenting with a custom u-boot on my AM1080 EVM, erasing and re-programming the SPI flash.
At this moment I cannot update anymore the u-boot from within u-boot.
The procedure I follow is:


Environment size: 869/65532 bytes
> tftp 0xc0000000 u-boot.bin
Using DaVinci-EMAC device
TFTP from server 192.168.0.78; our IP address is 192.168.0.149
Filename 'u-boot.bin'.
Load address: 0xc0000000
Loading: #########################################
done
Bytes transferred = 205900 (3244c hex)
> sf probe 0
SF: Detected M25P64 with page size 64 KiB, total 8 MiB
> sf erase 0x10000 +0x3244c
> sf write 0xc0000000 0x10000 0x3244c

But, after a board reset I see:

> AM1808 initialization passed!
Booting TI User Boot Loader
        UBL Version: 1.65
        UBL Flashtype: SPI
Starting SPI Memory Copy...
No magic number found.
SPI Memory Boot failed.
Aborting...


Anyone can help me ?

Gabriele

  • Hello Gabriele,

    Unfortunately, you can't use the direct u-boot.bin file generated by the standard u-Boot make and drop it in this way because the TI User Boot Loader (UBL) is looking for a small header at the beginning of the file that includes a magic number and information about how much data to load (and where to load it, etc.).  The header is not added to u-boot.bin by default.

    We actually wrote a small utility (and made it part of our copy of the u-boot tree) that bolted the UBL header onto the u-boot.bin file (calling it u-boot-ubl.bin) in order to support field upgrades of the u-Boot application exactly like you are trying to do here.

    If you are interested, you might check this repository out, specifically at the tools/genublimg.c routine, which creates the UBLheader needed (at least for the version of the UBL that our factory is using to load our modules).

    http://support.criticallink.com/gitweb/?p=u-boot-mitydspl138.git;a=summary

    -Mike

    www.mitydsp.com

  • Hi Mike,

    thanks for you reply.

    I've applied the UBL header, where I've just changed the field appSize from 512k to 384k. Then I've transferred resulting u-boot-ubl.bin to SPI flash via SFH:

    > sfh_OMAP-L138.exe -flash ubl_AM1808_SPI_MEM.bin u-boot-ubl.bin -targetType AM1808 -flashType SPI_MEM -p COM1 -baud 115200

    At boot time I just see the following messages:

    AM1808 initialization passed!
    Booting TI User Boot Loader
            UBL Version: 1.65
            UBL Flashtype: SPI
    Starting SPI Memory Copy...
    Valid magicnum, 0x55424CBB, found at offset 0x00010000.
       DONE
    úumping to entry point at 0xC1080000.

     

    What I've missed ?

  • Hi Mike,

    I've verified the following behaviour.

    The u-boot flash update process can be performed in two ways:

    1) with SFH (via serial port) using u-boot.bin

    2) with u-boot commands using u-boot-ubl.bin

    Can you confirm this ?

    Regards.

  • Yes,

    Those are the two options we use.  Typically we use option 2 for field upgrades (changing the boot-mode from SPI to UART requires an external switch or pushbuttons, etc., in fielded systems which is not desirable).

    -Mike

  • Mike,

    thanks a lot for your support

    This soves the issue.

    Regards,

  • Hello, our names are Nicolás and Martin and we are students of Public University of Uruguay.

    In this moment we working in a project with a OMAP-L137 board but we have the same problem as described above.

    We do the following:

    > mono ./sfh_OMAP-L137.exe -flash ubl_OMAP-L137_v2_SPI_MEM.bin u-boot.bin -targetType OMAP-L137_v2 -flashType SPI_MEM

    At boot time I just see the following messages:

    OMAP-L137, rev2.0 initialization passed!
    Booting TI User Boot Loader
            UBL Version: 1.65
            UBL Flashtype: SPI
    Starting SPI Memory Copy...
    Valid magicnum, 0x55424CBB, found at offset 0x00010000.
       DONE
    jumping to entry point at 0xC1080000.

    And that is all, the board not respond

    Now we dont know how to move on, what is wrong?

    Thanks
    Regards

    Martín y Nicolás

  • Hi Martin & Niclas,

    Can you please create a new thread for this issue as posting on the same thread will get only less attention when compared to the new one. And as well, this thread seems to be a closed one.

  • Hi Titus!

    We just post a new thread for this issues.

    Thanks,

    Nicolas