1 .\" $NetBSD: kloader.4,v 1.2 2004/04/03 15:19:49 wiz Exp $
3 .\" Copyright (c) 2004 Valeriy E. Ushakov
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Neither the name of the author nor the names of any
12 .\" contributors may be used to endorse or promote products derived
13 .\" from this software without specific prior written permission.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
32 .Nd in-kernel bootloader
35 .Cd options KLOADER_KERNEL_PATH="\e"/netbsd\e""
39 is the in-kernel bootloader for platforms that do not have a proper
42 Some platforms supported by
44 do not have a firmware that can boot the
47 Examples are game consoles (dreamcast port), and
48 handhelds (hpcarm, hpcmips, and hpcsh ports).
49 On such platforms the bootloader is usually a host program that runs
51 This means that rebooting
53 is a lengthy process of booting into the native OS first,
54 launching the bootloader program, and finally booting
57 This problem is addressed by
59 which allows the currently running kernel to serve as a bootloader
60 for the kernel being booted, thus avoiding the burden of booting
61 into the native OS first.
65 is configured into the kernel, a call to
69 to load the new kernel into memory, and arrange for control to be
70 passed to the new kernel \(em just like a standalone bootloader does.
71 The new kernel then boots in the ordinary manner.
86 arguments passed to the
88 system call, and reboots the system with the previous boot settings.
91 doesn't support booting compressed kernels.
93 The hpcarm port doesn't support