Subject: Re: DynLink'd gzip(1) for CF Bootstrap
To: None <netbsd-users@netbsd.org>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: netbsd-users
Date: 03/05/2007 17:24:52
I've put some notes together on resolving this problem as it pertains to 
bsd-appliance:

http://code.google.com/p/bsd-appliance/wiki/NetBSDGzipBzip2ProgressDynamicLinkRoot

~~BAS

On Wed, 10 May 2006, Brian A. Seklecki wrote:

>
> I'm looking to make a 'rescue' gzip(1) binary for a CF Bootstrap, however 
> /rescue/gzip is staticly linked and thus 2+MB.
>
> Space is limited for binaries in /bin and /lib because of size limitations of 
> the in-kernel RD/MD image.
>
> Space is limited on the CF device for usr.tar.gz (which gets extracted into 
> an MFS /usr), so /rescue/gzip is out of the question.
>
> Thus my RD/MD root file system lacks a /usr until after the start of /etc/rc.
>
> With our in-tree gzip(1) substitute, could the Makefile be modified to link 
> against the libc/libz in /lib instead of /usr/lib (which are actually 
> symlinks any way?).
>
> It seems pretty simple:
>
> # link gzip/gzip
> /nbsd/tools/bin/i386--netbsdelf-gcc -Wl,-nostdlib -o gzip 
> -Wl,-rpath-link,/lib:/usr/lib -L/lib -B/usr/lib/ -B/usr/lib/ gzip.o -lz -lbz2 
> -L/usr/lib -L/usr/lib
>
> But it would nice if there was some conditional environmental that could be 
> set for this non-standard build behavior.
>
> Also, could a the bzip2 support be killed off easily?  That might not be 
> prodent since it doesn't really add that much space (60K?).
>
> Thanks,
> ~BAS
>

l8*
 	-lava (Brian A. Seklecki - Pittsburgh, PA, USA)
 	       http://www.spiritual-machines.org/

"...from back in the heady days when "helpdesk" meant nothing, "diskquota"
meant everything, and lives could be bought and sold for a couple of pages
of laser printout - and frequently were."