next up previous contents index
Next: 2 Execution Environments Up: 1.6 Using the OSKit Previous: 1.6.2 Booting Kernels

1.6.3 Command line arguments

The various boot adapters convert their respective command-line formats into the string format used by MultiBoot-compliant operating systems. The default OSKit MultiBoot startup code then converts this string into a C-style argv/argc pair which is eventually passed to the main routine. However, before main is invoked, the default OSKit console startup code does some interpretation of the argv contents. In particular, 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 20 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 argv:

-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.

Currently these booting parameters are passed to the main routine. This means that if the OSKit kernel is a ported Unix program that has a different meaning for some of these flags, then it must be changed to handle them specially. In the future they may be separated out and placed in the environment.


next up previous contents index
Next: 2 Execution Environments Up: 1.6 Using the OSKit Previous: 1.6.2 Booting Kernels

University of Utah Flux Research Group