From owner-freebsd-arch@FreeBSD.ORG Tue Sep 16 05:57: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 654F4106564A for ; Tue, 16 Sep 2008 05:57:19 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id EF31C8FC1E for ; Tue, 16 Sep 2008 05:57:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m8G5sdgg072316; Mon, 15 Sep 2008 23:54:39 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 15 Sep 2008 23:55:22 -0600 (MDT) Message-Id: <20080915.235522.-169059506.imp@bsdimp.com> To: julian@elischer.org From: "M. Warner Losh" In-Reply-To: <48CF2975.3010908@elischer.org> References: <48CF1979.90507@errno.com> <48CF2975.3010908@elischer.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii 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 05:57:19 -0000 In message: <48CF2975.3010908@elischer.org> Julian Elischer writes: : > 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). And it doesn't work with cross building because of its use of LDD. It needs to use the NEEDED lines in objdump to get this information. : Tinybsd uses the binaries on your system rather than building them. Unless you are cross building, in which case it grabs them from an image that you've installed... : 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... It is useful for prototyping.. I've used a tinybsd-like system in production, but it didn't do automatic library depends. It had very crude cross build support for ports, but only very stupid or very cooperative ports would work... : > 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. Yes. : > 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. These work great... : > 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. All in all, I think this stuff is great... Warner