From owner-freebsd-arch@FreeBSD.ORG Tue Sep 16 06:05:41 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 05AF21065670 for ; Tue, 16 Sep 2008 06:05:41 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [IPv6:2001:4200:7000:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 43FDD8FC13 for ; Tue, 16 Sep 2008 06:05:40 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 54C5F33CD3; Tue, 16 Sep 2008 08:05:38 +0200 (SAST) Date: Tue, 16 Sep 2008 08:05:38 +0200 From: John Hay To: "M. Warner Losh" Message-ID: <20080916060537.GA40711@zibbi.meraka.csir.co.za> References: <48CF1979.90507@errno.com> <48CF2975.3010908@elischer.org> <20080915.235522.-169059506.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080915.235522.-169059506.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i Cc: arch@freebsd.org, julian@elischer.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 06:05:41 -0000 On Mon, Sep 15, 2008 at 11:55:22PM -0600, M. Warner Losh wrote: > 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. I have been using this in a script on an i386 box to build small i386 and arm distros: llst=`readelf --dynamic ${sdir}/${f} 2> /dev/null | awk '/Shared library/ { print $5 }' | sed -E -e 's/\[|\]//g'` John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org