[U-Boot-Users] [PATCH] update to the exports table
Jeff Mann
MannJ at embeddedplanet.com
Thu Apr 19 21:17:42 CEST 2007
Hey u-boot list:
I've attached a patch for adding function to the exports table for your
review.
In exports.c, I added a function called xf_func_inc(int) which can be
called from an external program and used to determine which functions
were compiled with u-boot and available. (this is done by making sure
that the jump table entry does not point to the dummy function) For
example, if u-boot is compiled without NAND support, a stand alone
program can find out before calling the do_nand function. This seemed to
be the simplest way to implement this functionality, but if anyone has a
better idea, I'll look into it.
Also in exports.c, I reordered the "gd->jt[XF_xxxx] = (void *) xxxx;"
entries to be grouped into a more logical grouping order so that the #if
statements were together.
In _exports.h, I added my new functions below existing functions so that
the enumerated name and number (XF_xxxx) that get assigned to the
existing functions would not change. Also, I removed the #if...
Statements so that the enumerated numbers assigned never change when
u-boot is compiled with different configurations and options enabled.
In exports.h Function declarations were added and the XF_VERSION was
incremented to 4.
netboot_common was changed from static to extern.
If there are no discussions about this, then Wolfgang and Stefan please
add it to the tree.
-Jeffrey Mann
PATCH
* Add functions to the exports table for use by external programs.
Added xf_func_inc(int) for stand alone programs to confirm that
functions are in u-boot.
-sign-off-by Jeffrey Mann <mannj at embeddedplanet.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exports.patch
Type: application/octet-stream
Size: 7314 bytes
Desc: exports.patch
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070419/b4f81dd7/attachment.obj
More information about the U-Boot
mailing list