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.

Is it possible to write uImage and ramdisk via UART?

Other Parts Discussed in Thread: OMAP-L138

Hi,

I'm ready to release products based on OMAP-L138.

but I need a update solution for changing kernel on NAND flash memory.

I want to minimize the port and to remove ethernet and usb ports.

Is that possible, if using OMAP-L138_FlashAndBootUtils?

Best regars,

Seyoung

  • The serial flashing tools give two options:

    1) Flashing a monolithic file to the NAND (-flash_noubl)

    2) Flashing a UBL to one location in NAND and U-boot to another location. (-flash)

    If you want to flash the everything with this tool, you will have to make a single image out of the UBL, U-boot, kernel, and file system, and flash it using method 1.

    You can modify the tool to have it only erase and modify the block(s) where the kernel and file system are located, but this functionality is not currently implemented.

    Jeff

  • Thank you for your answer.

    then, if I make a monolithic binary file named "total.bin" like below table,
    It is possible to  write to NAND memory by running "shf.exe -flash_noubl total.bin".  Right?
    (offset  between binary datas is filled with '0')

    filename address data
    total.bin 0x000000 UBL
    0x010000 u-boot.bin
    0x200000 uImage.bin
    0x400000 ramdisk.tar.gz

    By the way, how can I set the u-boot's boot arguments?

    Does it need to modified u-boot source codes?

    Best regards,

    Seyoung

  • Yes that should work, assuming the entire image can fit in your external memory during the flashing process.

    To set the boot arguments, you you will want to rebuild U-boot with the updated arguments. The instructions can be found here:

    http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_U-Boot

    Jeff

  • Many thanks.

    First of all, I  merged  UBL and u-boot in 1 binary file.
    next I erased NAND and write it to NAND flash.

    >sfh_OMAP-L138.exe -flashType NAND -flash_noubl merged.bin

    And turning on,  errror message was appeard like belowing.

    OMAP-L138 initialization passed!
    Booting TI User Boot Loader
            UBL Version: 1.65
            UBL Flashtype: NAND
    Starting NAND Copy...
    No valid boot image found!
    NAND Boot failed.
    Aborting...

    8080.ubl+u-boot.zipI have been grasping the sfh source code.

    Application Start Address(default.0xC1080000) is alterable, but it's not possible to set flash address.

    Could you give me more tips?

    Best regards,

    Seyoung 

  • In order for the UBL to identify u-boot, the flashing tool adds a header to the u-boot image when flashing it, which has a magic number and other parameters. Since you are using the -flash_noubl option and are flashing a single image, this header is not added, and the UBL will not be able to find u-boot.

    You can add the header two ways:

    1) Flash the UBL and u-boot separately using the -flash option instead. Then readout the contents in the NAND where u-boot was flashed (usually block 6 unless there were bad blocks found)

    2) Manually update your existing binary to include this header, which can be found using method 1

    Jeff

  • Thank you for your genorous anwser.

    I see, it is need to add header[magicNum, startAddr, byteCnt, loadAddr].

    then, u-boot is written like below table.

    NAND address item bytes
    0x010000 ack + header 36
    0x010024 u-boot.bin -

     and then, if I made a binary which is merged with "u-boot.bin" , "uImage.bin" and  "ramdisk.tar.gz" with offset.

    is it possible to do that I had posted 02-27-2011 4:33 AM

    best regard,

    Seyoung

  • Yes that should be possible. Once you are in u-boot, you can specify the location of your Linux kernel and file system as well.

     

    Jeff

  •  

    A belated reply, but I was in need of the same type of thing:

    If you use the 'standard' SFH program to load UBL and U-boot, you can boot your board into U-boot and use the 'loady' command to transmit a file (uimage, ramdisk) into memory using the the Ymodem protocol.  Then follow the steps in the 'U-boot labs' to write Uimage and ramdisk from memory to flash, SPI flash in my case.

    It takes a few minutes to move the files over the serial line, but it seems to work fine.

    I tripped across this looking in Hawkboard...

    http://groups.google.com/group/hawkboard/browse_thread/thread/ecc57e1b964bc2c4/b0e1ad260a226bd1?lnk=gst&q=ymodem&pli=1

    -Scott

  • Hello,

    I have been doing another job. So, I couldn't test it yet.

    howerver I'm about to handle that issue again.

    I read the sfh_ais.module source over and over
    but I cannot understand how to set the write point  on NAND.

    How  does "TransmitImage(Byte[] imageData, ImageHeader ackHeader)" function
    access the 0x00000000 and 0x01000000 memory address?

    Its mechanism is based on magic number?

    Thank you every time.

  • I merged "u-boot.bin" and "uImage.bin"

    And after sfh download, u-boot was worked
    but the start working is unusually slower .

    next, I checked NAND section.

    >nand read.e 0xc0700000 0x200000 0x200000

    >md

    then, there was not the expected uImage binary data.

    In my case, I think I should  write each binary files separatly on the NAND flash.

     

     

     

     

     

  • The SFH just sends the image over UART to the DDR memory of the device. The SFT is the one that actually writes to the NAND itself.

    Look in "uartboot.c" in the common\sft\source directory. The variable currBlockNum is where the image will be flashed.

    Jeff