Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

kgzip(8) [freebsd man page]

KGZIP(8)						    BSD System Manager's Manual 						  KGZIP(8)

NAME
kgzip -- compress a kernel SYNOPSIS
kgzip [-cv] [-f format] [-l loader] [-o output] file DESCRIPTION
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 exe- cutables). NOTES
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
/usr/lib/kgzldr.o The default loader EXIT STATUS
The kgzip utility exits 0 on success, and >0 if an error occurs. SEE ALSO
gzip(1), ld(1), a.out(5), elf(5), boot(8), loader(8) AUTHORS
Robert Nordier <rnordier@FreeBSD.org> BUGS
As symbols are lost, the usefulness of this utility for compressing kernels is limited to situations where loader(8) cannot be used; other- wise the preferred method of compressing a kernel is simply to gzip(1) it. BSD
July 19, 1999 BSD

Check Out this Related Man Page

VERSION.4TH(8)						    BSD System Manager's Manual 					    VERSION.4TH(8)

NAME
version.4th -- FreeBSD version string boot module DESCRIPTION
The file that goes by the name of version.4th is a set of commands designed to draw the boot loader version at the bottom-right of the screen. The commands of version.4th by themselves are not enough for most uses. Please refer to the examples below for the most common sit- uations, and to loader(8) for additional commands. Before using any of the commands provided in version.4th, it must be included through the command: include version.4th This line is present in the default /boot/menu.rc file, so it is not needed (and should not be re-issued) in a normal setup. The commands provided by it are: print_version Prints the contents of the loader_version environment variable right-justified at the column loader_version_x and row loader_version_y. The environment variables that effect its behavior are: loader_version Set automatically by loader(8), but you can override it by setting in loader.conf(5). This should be the version of boot loader used. loader_version_x Sets the desired ending column position of loader_version. Default is 80. loader_version_y Sets the desired ending row position of loader_version. Default is 24. loader_color If set to ``NO'' (case-insensitive) or ``0'', causes the version to be printed without color (default is ANSI Cyan). FILES
/boot/loader The loader(8). /boot/version.4th version.4th itself. /boot/loader.rc loader(8) bootstrapping script. EXAMPLES
Override loader(8) version in loader.conf(5): loader_version="loader 1.1" SEE ALSO
loader.conf(5), color.4th(8), loader(8) HISTORY
The version.4th set of commands first appeared in FreeBSD 9.0. AUTHORS
The version.4th set of commands was written by Devin Teske <dteske@FreeBSD.org>. BSD
August 6, 2013 BSD
Man Page