the more build knobs bikeshed

Brooks Davis brooks at freebsd.org
Tue Sep 16 16:26:21 UTC 2008


On Mon, Sep 15, 2008 at 07:27:05PM -0700, Sam Leffler wrote:
> Here is a patch against HEAD to add several knew MK_* knobs that can be 
> used to trim the build for small-footprint applications:
> 
> http://www.freebsd.org/~sam/build.patch
> 
> With these changes I can build a nanobsd image for x86 or arm that is <1/2 
> the size you can get otherwise (using just the standard knobs).  If you do 
> not use the knobs you should get exactly what you're used to getting.
> 
> My goal in doing this is to make nanobsd more useful for building embedded 
> packages without bypassing the build process to purge stuff.  This is still 
> a LONG way from small enough to fit in many applications but seems like a 
> useful start.
> 
> FWIW I chose knobs using two criteria:
> 
> 1. Does it save an appreciable amount of space.
> 2. Does it remove applications that you really don't want to be present.
> 
> I'm sure folks will wonder about some choices.  One can also argue that 
> some of the groups I've added are wrong and/or we should have individual 
> knobs for each application.
> 
> Separate issues that I intend to work on:
> 
> 1. Build time is way too long; paring down the target config should also 
> reduce the build time but it does not because things like MK_TOOLCHAIN 
> cannot be used when building; only when installing.
> 2. Some applications that you want are hugely bloated and may benefit from 
> some TLC.  bind comes to mind where I can crunchgen all the bits into a 
> single binary but when built normally you get multiple huge executables.
> 3. Cross-build and package; I can use nanobsd to build arm images but the 
> packaging facilities are inadequate.  I've got a start on default setups 
> for some boards/packages and would like to see this grow into a library 
> that people can use for reference and/or extend.
> 
> Anyway,  I'm interested in getting the above patch committed so looking for 
> constructive comments.  I haven't included the files that go under 
> src/tools/build/options (I've done them already).  I also have mods for 
> RELENG_7 that I've been using for a while.

Looks generally good to me.  Some of us at AsiaBSDCon noted that most of
usr.sbin isn't useful on most system so this is a good step forward.

One minor dependency nit is that freebsd-update depends on
portsnap at the moment because both use phttpget which resides
in usr.sbin/portsnap/phttpget.  It should probably move to
libexec/phttpget.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20080916/58a8c5c0/attachment.pgp


More information about the freebsd-arch mailing list