Commit Graph

8 Commits

Author SHA1 Message Date
Scott Wood f8cfcf1b1c env: don't generate callback list entries for SPL
SPL doesn't write to the environment.  These list entries prevent the
functions from being garbage-collected, even though nothing will look at
the list.  This caused several SPL builds (e.g.  P2020RDB-PC_NAND) to
break due to size limitations and/or unresolved symbols.

A static inline function is used to provide a context in which we
can consume the callback, and thus avoid unused function warnings.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2012-12-22 05:57:16 -07:00
Joe Hershberger 2598090b7e env: Add environment variable flags
Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.

If the entry is not found in the env ".flags", then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger e080d545f8 env: Add a silent env handler
The silent variable now updates the global data flag anytime it is
changed as well as after the env relocation (in case its value is
different from the default env in such cases as NAND env)

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 849d5d9cda env: Add a console env handler
Remove the hard-coded console handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 1cf0a8b2fb env: Add a loadaddr env handler
Remove the hard-coded loadaddr handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger 32057717e0 env: Add a baudrate env handler
Remove the hard-coded baudrate handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger a9f51c9b43 env: Add a bootfile env handler
Remove the hard-coded bootfile handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger 170ab11075 env: Add support for callbacks to environment vars
Add support for per-variable callbacks to the "hashtable" functions.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

!!!fix comment in callback
2012-12-13 11:46:55 -07:00