[U-Boot-Users] Access global data from standalone application

Shawn Jin shawnxjin at gmail.com
Sat Jun 18 02:45:44 CEST 2005


> > Is there any way to access global data defined in U-Boot from
> > standalone applications? For example, hello_world wants to access
> > flash_info[].
> 
> Be careful with your terms. It is trivial to access "global data"  in
> SA apps as the GD pointer is passed in a register - but "Global Data"
> in U-Boot is something which has nothing to do with flash_info[].

Well, what I meant is exported data. Thanks for the clarification. My
understanding is that the GD pointer points to gd_t. Those data inside
gd_t can be accessed trivially in SA apps, as you said.

> You can export and call in SA apps functions which perform operations
> on flash_info[], but you cannot  access  flash_info[]  or  any  other
> global variables directly.

Confused. How do SA apps perform operations on exported data without
accessing them? Could you elaborate a little bit? I want to write a SA
app to print the protection info of all flash banks. I know flinfo can
do that. I just do some experiments. ;)

Regards,
-Shawn.




More information about the U-Boot mailing list