[U-Boot-Users] [PATCH] Functions added to extern for stand alone programs
Jeff Mann
MannJ at embeddedplanet.com
Thu May 10 15:52:39 CEST 2007
> > Content-Transfer-Encoding: base64
I apologize, I KNOW I selected 'plain text'.
> my gut feeling is that
>
> gd->jt[XF_foo] = foo;
>
>should happen at the end of the file which defines foo.
> This would remove the need for external definitions and ifdef mazes.
> But it would require some sort of jt_init function to be
> called in each file.
> This could be done using some linker magic (like module
> initialization in the kernel, or cli functions in u-boot)...
I suppose that is one solution. "Linker magic" is beyond me, but would
be very clean.
> > This #ifdef maze is too much even for my standards. And
> that does
> > mean something.
I didn't think it was that maze-like. The ifdefs are NOT nested, and I
gouped all of the functions with the same ifdefs together in a reaonable
order. Also, the ifdefs were removed from _exports.h and exports.h
because they are not needed there, only when initializing the jump table
in exports.c. But yes, that leads to a lot of them. I was just thinking
about this and I was going to propose something else, but I think that
by splitting up the jump table initialization, it gets even messier.
-JM
More information about the U-Boot
mailing list