fixing bbox build system

Rob Landley rob at landley.net
Thu Oct 5 16:53:19 UTC 2006


On Wednesday 04 October 2006 4:31 pm, Sam Ravnborg wrote:
> Hi Denis.
> > 
> > I resisted the desire to drop "unneeded" parts of kbuild
> > (like support for modules). It simply isn't helpful in
> > any way (busybox binary won't shrink because of that),
> > but will add difficulties if someone will try to
> > apply fixes from kernel's kbuild to bbox's one.
> 
> I would much rather see an approach where we in the
> kernel abstracted all the core kbuild stuff to a few
> generic files which could then be used by the relevant
> users.

I'm highly interested in this.  I have a new project (toybox, think "BusyBox 
lite") that will eventually use this stuff, and I'm starting clean rather 
than replacing something existing.  Please keep me in the loop...

(I'm also trying to take some time this week to finally teach the kbuild 
infrastructure to spit out a miniconfig rather than using my disgusting 
iterative shell script to create one.  Maybe _that_ can get merged. :)

> Most of what you find in the top-level Makefile is rather
> kbuild agnostic but there is a few improtant bits.
> And you would like to include also the kconfig stuff
> i busybox - but the same may be possible there.



> So I would suggest a plan in the line of this:
> 1) I abstract out relevant bits of generic kbuild
>    and kconfig support in a few generic files
>    in the kernel.

Please keep me in the loop on this.

> 2) We create the necessary bits needed for busybox to use
>    the generic kbuild/kconfig stuff.

And toybox.  And once that's working, I have a nebulous plan to offer it to 
uClibc as well.

> 3) You convince me to keep an eye on/maintaining the kbuild
>    parts of busybox.

I'll push any toybox changes I make back upstream into klibc.  (Or at least 
send you patches.)

> This would result in:
> a) A much simpler build machinery for busybox
> b) That hal or whatever other project may have an easier
>    time introducing kbuild
> c) That it is simpler to maintain due to less kernel stuff

Once five projects are using it (busybox, uclibc, toybox, klibc, kernel) I 
suspect it'll be generic enough for a sixth to pick up fairly easily.  (Heck, 
there are a half-dozen distros that use this now.  buildroot, openwall...)

> Comments?

Ok, I have a tiny project.  This weekend I should finally have enough code to 
have something for menuconfig to switch on and off, so I want to shove kbuild 
under it.  Right now, my entire build infrastructure is one 5-line makefile.

Where do I start?  (Is there a HOWTO, or will I be writing one?)

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list