Subject: Re: DynLink'd gzip(1) for CF Bootstrap
To: Brian A. Seklecki <lavalamp@spiritual-machines.org>
From: matthew sporleder <msporleder@gmail.com>
List: netbsd-users
Date: 05/10/2006 12:50:35
>
> 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 limitation=
s
> 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 actuall=
y
> 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?).
>
I'm pretty sure everything in /rescue is exactly the same size,
because it's all the same binary + hard links.