freebsd-dev/sys/i386/boot/kzipboot
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
..
boot.c Fixed scrolling. The bottom line wasn't cleared. This caused the 1995-11-18 05:12:10 +00:00
gzip.h Reduce the amount of bss the kzip stuff uses by moving big buffers into 1995-05-29 01:38:07 +00:00
head.S Removed bogus padding that wasted 0x500 bytes. 1995-11-18 05:25:24 +00:00
Makefile Make the long-awaited change from $Id$ to $FreeBSD$ 1997-01-14 07:20:47 +00:00
malloc.c Killed unnecessary \r. 1995-09-07 21:11:34 +00:00
misc.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
README The magic code to uncompress a kernel. 1995-04-15 08:23:55 +00:00
tail.S Removed bogus padding that wasted 0x500 bytes. 1995-11-18 05:25:24 +00:00
unzip.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00

/* Beware: mostly obsolete info */

This is the first (alpha) release of kernel packer/unpacker
for FreeBSD.  It is based on xBoot from Linux, but
hardly rewritten.

It assumes that:
1) The kernel should be loaded at 0x100000 phys address.
2) The CS selector is equal to 8, which is OK for all
   current secondary boot programs.

Run "make install" to install it.  It will place
"kzip" shell script into /usr/sbin, and several files
into /usr/libexec/kzip directory.

Then try to zip your kernel, for example:

	% kzip /kernel
	System size is 462848
	Compressed size 247027

It will create file /kernel.kz:

	% ls -l /kernel /kernel.kz
	-rwxr-xr-x    1 root       497297 Oct  8 12:41 /386bsd
	-rwxrwxr-x    1 root       262144 Oct  8 13:37 /386bsd.kz

Then rename /kernel.kz to /kernel and reboot.

	% mv /kernel /o3kernel
	% mv /kernel.kz /kernel
	% sync
	% reboot

During booting, you will see the message:

	Uncompressing kernel...done
	Booting the kernel

The packed kernel should load and run.

The main problem with packed kernel is the lack of symbol table,
so all commands that require it, will not run.
Among them: ps, savecore, *stat, etc.

Packed kernels are good for install and fixit floppies.

Serge Vakulenko, <vak@zebub.msk.su>
Opdated for FreeBSD 2.1 by Gary Jennejohn 12FEB95