From owner-freebsd-arch@FreeBSD.ORG Tue Sep 16 03:35:19 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1503D106564A for ; Tue, 16 Sep 2008 03:35:19 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outM.internet-mail-service.net (outm.internet-mail-service.net [216.240.47.236]) by mx1.freebsd.org (Postfix) with ESMTP id F0C6C8FC1C for ; Tue, 16 Sep 2008 03:35:18 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 293532479; Mon, 15 Sep 2008 20:35:19 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 1F4392D6017; Mon, 15 Sep 2008 20:35:18 -0700 (PDT) Message-ID: <48CF2975.3010908@elischer.org> Date: Mon, 15 Sep 2008 20:35:17 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Sam Leffler References: <48CF1979.90507@errno.com> In-Reply-To: <48CF1979.90507@errno.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: the more build knobs bikeshed X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 03:35:19 -0000 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 not bad.. I'd be temoted to make some larger groups e.g. debugstuff and devtools so exclude lots of stuff in one hit, with some smaller groups to bring some of them back more selectively.. maybe too complicated.. > > 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. tinybsd gets its apps together and then uses ldd on each to get the minimum set of libraries as well. (though that doesn't help with programs that dlopen a bunch of stuff such as natd which dlopens all teh libalias*.so libs). > > 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. Tinybsd uses the binaries on your system rather than building them. Now I know that isn't what you want but it sure is faster.. great for prototyping a setup I find.. maybe you could point to a prebuilt image and just grab from there... > 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. and there are many programs that have quite a lot of options that add space that are rarely used... a "trim" option might be nice, meaning "build the simple version. > 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. we really should import the makefs utilities from NetBSD.. they are in ports. > > 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. > > Sam > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"