*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> kgzip (8)              



NAME    [Toc]    [Back]

     kgzip -- compress a kernel

SYNOPSIS    [Toc]    [Back]

     kgzip [-cv] [-f format] [-l loader] [-o output] file

DESCRIPTION    [Toc]    [Back]

     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, producing
 an executable suitable for booting with either the second- or
	  third-level bootstraps.

     Supported object formats are 32-bit ELF and a.out ZMAGIC.

     If the file operand has a `.o' suffix, input is assumed to be for the
     link phase, and the first phase is omitted.

     The options are:

     -c 	 Omit the link phase.

     -v 	 Display object file information.

     -f format	 Use format as the output format, where format is `aout' or
		 `elf'.  The default format is ELF.

     -l loader	 Link loader as the loader.

     -o output	 Name the output file output.  The default is to use the input
		 name with the suffix `.o' (for relocatables) or `.kgz' (for

NOTES    [Toc]    [Back]

     Global variables equivalent to the following are defined in the output:

     struct kgz_hdr {
	 char	     ident[4];	     /* identification: "KGZ" */
	 uint32_t    dload;	     /* decoded image load address */
	 uint32_t    dsize;	     /* decoded image size */
	 uint32_t    isize;	     /* image size in memory */
	 uint32_t    entry;	     /* entry point */
	 uint32_t    nsize;	     /* encoded image size */
     } kgz;

     uint8_t kgz_ndata[];	     /* encoded data */

     The encoded data is simply gzip(1) output: a header (with no optional
     fields); compressed data; and 32-bit CRC and size values.

FILES    [Toc]    [Back]

     /usr/lib/kgzldr.o	The default loader

SEE ALSO    [Toc]    [Back]

     gzip(1), ld(1), a.out(5), elf(5), boot(8), loader(8)

DIAGNOSTICS    [Toc]    [Back]

     The kgzip utility exits 0 on success, and >0 if an error occurs.

AUTHORS    [Toc]    [Back]

     Robert Nordier <rnordier@FreeBSD.org>.

BUGS    [Toc]    [Back]

     As symbols are lost, the usefulness of this utility for compressing kernels
 is limited to situations where loader(8) cannot be used; otherwise
     the preferred method of compressing a kernel is simply to gzip(1) it.

FreeBSD 5.2.1			 July 19, 1999			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
dn_comp Tru64 Compress a domain name
zcat HP-UX compress and expand data
uncompress HP-UX compress and expand data
compressdir HP-UX compress and expand data
compress HP-UX compress and expand data
pcat HP-UX compress and expand files
unpack HP-UX compress and expand files
pack IRIX compress and expand files
pack HP-UX compress and expand files
gzip IRIX compress or expand files
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service