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.

uboot loading linux in OMAP3530 (Mistral)

Hi,

Does any one have any idea of how uboot is loading linux from flash and executing it.

When i switch on the board u boot comes up and if i don't press any key for 4 seconds  it boots linux and linux is brought up.

In this place i want to bring a custom RTOS instead of linux. Please help me on how to do this. I am very new to uboot and its command.

Please help me in writing a script in uboot for bringing up a RTOS instead of Linux. The RTOS will reside in NAND Flash as Linux resides.

 

Thanks

Jack

 

  • I think this is more dependent on the needs of your RTOS to boot, or how your RTOS image is formatted, if your RTOS image can be made to act like a Linux kernel image you should be able to use U-Boot directly, however if your RTOS has special requirements to start than you may have to modify and rebuild U-Boot to start it. For the most part it seems to me that U-Boot just initializes the system and copies the image into an executable location where it reads a small header (which you can add to your image with the mkimage executable) that tells U-Boot where the entry point is and such at which point it branches into the image which does the rest of the booting, in the case of a Linux kernel image it will uncompress itself and start running.

    Keep in mind that U-Boot is entirely built around loading a Linux kernel, so you may not find much support for getting it to boot some other OS, it is possible that it would be easier to modify the UBL to support your needs instead of using the full blown U-Boot, though it is hard to say since it is largely dependent on how close your RTOS is to the Linux kernel. For U-Boot details you can find further information both on the project website and within the source in OMAP35x_SDK_1.0.2\board_utilities\u-boot (you may have to extract a tar.gz file to get this folder).

  • Hi ,

    Thanks for that information

    The RT

    Bernie Thompson said:

    I think this is more dependent on the needs of your RTOS to boot, or how your RTOS image is formatted,

    The RTOS and an application are compiled and built together to form   an elf format. 

    What i need is  that  the uboot is to copy the image from NAND Flash (RTOS.elf) and jump to entry point of RTOS.

    Can we do this without disturbing the present uboot.bin which is already in NAND Flash. Can we change the boot environment  variables once uboot is up?

     

    Expecting your help.

    Jack

     

     

  • You may also want to track this related discussion on the u-boot mailing list:

    http://lists.denx.de/pipermail/u-boot/2009-April/050309.html

  • It looks like some of my initial assumptions were incorrect, it seems U-Boot does have support built in for a variety of OS options in its image formats (also see u-boot\include\image.h) and can be used to boot an arbitrary application as well, though I have only worked with it from a booting Linux perspective. So it looks like the normal path would be to put a header on the image based on image.h which helps to define what format the remainder of the image is to U-Boot such that it can boot the RTOS, however since you have it in ELF format alraedy, it looks like you can use the bootelf command as the first responder to the email thread Sanjeev mentioned suggested. Have you tried any of this yet?