[U-Boot] [U-Boot-Users] standalone code

Wolfgang Denk wd at denx.de
Tue Jan 15 22:40:03 CET 2013


Dear Diego Preciado Barón,

In message <BAY170-W1374704B4379134E5D85C32C82D0 at phx.gbl> you wrote:
>
> I want to use the u-boot drivers such as gpio and spi on a standalone
> application.

Why do you want to do this from a standalone app, instead from code
linked with the U-Boot image?

> What do I need to modify in the Makefile to build and
> link my code with the rest of the U-boot code in order to include
> those drivers in my application? because when I try to compile my
> code, it shows some errors of undefined references.

You can of course link statically against U-Boot, but then you lose
all kind of compatibility, i. e. your app will oly run with this very
U-Boot image, and will crash in all kinds of horrible ways when you
attempt to run it in other environments.

In theory we could of course extend the list of exported functions,
but this is something we don't want, as this would weaken the GPL
nature of the code.

> Is it possible to run that application automatically when the u-boot
> starts? maybe from the SD card?

Yes, of course - you can run any command or command sequence
automatically, either as part of your preboot settings, or as bootcmd.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The shortest unit of time in the multiverse is the News York  Second,
defined  as  the  period  of  time between the traffic lights turning
green and the cab behind you honking.
                                - Terry Pratchett, _Lords and Ladies_


More information about the U-Boot mailing list