Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Dec 1999 12:44:03 -0500 (EST)
From:      Larry Baird <lab@gta.com>
To:        freebsd-small@freebsd.org
Subject:   Re: some picobsd things
Message-ID:  <199912151744.MAA22845@gta.com>

next in thread | raw e-mail | index | archive | help
> while trying to revise picobsd configuration etc, i notice a
> fair amount of space on the boot floppy is eaten by:
> 1) the loader configuration files in /boot
> 2) the files in /etc

> For #1, it appears that we can save gzipped versions of these files
> on the floppy, and the loader is happy to read them without any problem
> so i would suggest for post-3.4R the above change to the "stage1" script.
> This saves some 15-20KB i think
If you use the utility kgzip you can get rid of the loader all together,
Kgzip is very similar to our old friend gzip except if works for ELF.

From the man page
     The kgzip utility compresses a kernel or some other bootable binary.
     Operation is in two phases as follows:

     1.   A load image of the executable file is built which omits all but the
          `text' and `data' segments.  This image is compressed using gzip(1)
          and output as data in relocatable object format.

     2.   The object file is linked with a special self-hosting loader, pro-
          ducing an executable suitable for booting with either the second- or
          third-level bootstraps.

     Supported input formats are ELF and a.out ZMAGIC; the output format is
     always ELF.  Only 32-bit objects are supported.


> For #2, i was just made aware of the existence of "minigzip" which
> can be probably used when extracting most things from the /etc/ directory
> on the floppy, and then used back during the "update" phase ?
Using kgzip should get rid of the need for this.

FYI, GNAT Box is using gkzip without /boot/loader.  This approach
allowed us to cram a lot of stuff onto the GNAT Box floppy.  And
as a bonus since the binaries on MFS_ROOT are resident in memory
unzipped after booting all normal demand paging rules for text applies.

-- 
------------------------------------------------------------------------
Larry Baird                             
Global Technology Associates, Inc. | Orlando, FL
Email: lab@gta.com                 | TEL 407-380-0220, FAX 407-380-6080


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-small" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912151744.MAA22845>