
On Wed, Jul 23, 2008 at 10:39:00AM -0700, vb wrote:
While this relocation is seamless for u-boot in its released form, it becomes a pain each time a module needs to be added (not necessarily for following release to the Open Source community, for instance used for inhouse installations which include tens of thousand units for some companies). If these added modules were not written in position independent manner (namely, using structures with multiple stage indirect pointers interleaved with data), the effort to make these modules work in u-boot is very exhausting.
Note that in U-Boot-v2 we have loadable module support; code can EXPORT_SYMBOL() "public" APIs to other components, which, for example, can be such custom modules. The mechanism was invented for the scenario you describe above.
It comes for a cost (footprint), but the overhead is not so big as one might think. You can play around with the feature by building the "sandbox" target, which is a user-mode-u-boot (port of u-boot to Linux userspace).
rsc