Tom Rini trini at
Thu Apr 11 05:08:33 EST 2002

On Tue, Apr 09, 2002 at 12:52:40PM -0700, Michael Sokolov wrote:
> Tom Rini <trini at> wrote:
> > > I don't see it as ugly, I think it's quite beautiful.
> >
> > Adding an #ifdef per board?
> Yes. It's a lot more beautiful than getting link errors about platform_init
> multiply defined or <x>_init undefined.

And neither are as nice as doing some ELF tricks like what Paul
mentioned.  If you do something ala __init which marks a function as
going into .text.platform.init or so, change <x>_init to have a check to
make sure it's on the right board and then have early_init call a
function that goes and runs all of the functions marked as
.text.platform.init, a 1-board kernel is almost no different, and adding
new boards to GENERIC_PPC32 means touching one less file.

Tom Rini (TR1265)

** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list