Next: 2 Execution Environments
Up: 1.6 Using the OSKit
Previous: 1.6.2 Booting Kernels
The various boot adapters convert their respective command-line
formats,
such as the boothowto word in the BSD boot loader,
into the string format used by MultiBoot-compliant operating systems.
The OSKit expects this string to be in a certain format,
which looks like:
progname [<boot-opts and env-vars> -] <args to main>
Note that if no - is present then all of the args
will be passed to main.
The default OSKit MultiBoot startup code then converts this string
into a C-style argv/argc pair,
an environ global array,
and a set of booting-options in the
oskit_bootargv/oskit_bootargc global variables.
The argv/argc pair and the environ array
are passed to main, the latter as the third parameter commonly called
envp.
The booting-options in oskit_bootargv/oskit_bootargc
are interpreted by the default OSKit console startup code and
the following flags have special meaning:
- -h
-
Use the serial line for the console.
See also the -f flag.
The serial port to use is determined by the
cons_com_port variable in libkern's
base_console.c;
- -d
-
Enable debugging via GDB over a serial line;
The serial port to use is determined by the
gdb_com_port variable in libkern's
base_console.c.
This port may differ from the serial console port,
in fact it is advantageous to do so.
- -p
-
Enable profiling.
The OS must have been compiled accordingly.
See Section 27 for more details on profiling;
- -k
-
Enable ``killswitch'' support.
This allows one to kill the running kernel by
sending characters to the second serial line;
- -f
-
When using a serial console, run it at 115200 baud
instead of the default 9600.
This is a Utah extension and is not in BSD.
These flags are decidedly BSD-centric, but that is because at Utah
we most commonly boot OSKit kernels from the FreeBSD boot-loader.
In addition, if the NetBoot booting program is being used, then
an additional parameter will be present in oskit_bootargv:
- -retaddr address
-
This specifies a location in physical memory where
the OS can jump to and return control to NetBoot.
The default _exit routine in libkern's
base_console.c uses this value when exiting.
Next: 2 Execution Environments
Up: 1.6 Using the OSKit
Previous: 1.6.2 Booting Kernels
Utah Flux Research Group