[U-Boot] Writing own Standalone programs

Hi,
I have to write some standalone applications to be run from U-boot. My questions are: 1) Can we include only those header files which are a part of the U-boot code? What needs to be done to use files from the /usr/include/ folder? 2) Does the code for the standalone application be always present in the examples/ folder? 3) Can't we write our own Makefile which will create a .bin and .srec file from a simple C-Program and work from U-boot, instead of compiling entire U-boot?

Dear "Piyush Shah",
In message ad27f3010812080534paa385e8nf8db3a7a8cd86f6@mail.gmail.com you wrote:
I have to write some standalone applications to be run from U-boot. My questions are:
- Can we include only those header files which are a part of the U-boot
code? What needs to be done to use files from the /usr/include/ folder?
You can do anything you want, but you have to keep two thingsin mind:
1) The GPL license exception for standalone programs is pretty specific. If you deviate, your resulting code will most likely have to be released under GPL.
2) U-Boot provides only a very simple, restricted runtime environ- ment. Any additional stull you include may require additional libraries, which may rely on operating system features, or C runtime features, that are not present in U-Boot context.
- Does the code for the standalone application be always present in the
examples/ folder?
No. These are just examples.
- Can't we write our own Makefile which will create a .bin and .srec file
from a simple C-Program and work from U-boot, instead of compiling entire U-boot?
Yes, of course you can.
Best regards,
Wolfgang Denk
participants (2)
-
Piyush Shah
-
Wolfgang Denk