1.\" $NetBSD: kloader.4,v 1.3 2009/12/05 16:29:11 pooka Exp $ 2.\" 3.\" Copyright (c) 2004 Valeriy E. Ushakov 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 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. 14.\" 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. 26.\" 27.Dd April 3, 2004 28.Dt KLOADER 4 29.Os 30.Sh NAME 31.Nm kloader 32.Nd in-kernel bootloader 33.Sh SYNOPSIS 34.Cd options KLOADER 35.Cd options KLOADER_KERNEL_PATH="\e"/netbsd\e"" 36.Sh DESCRIPTION 37The 38.Nm 39is the in-kernel bootloader for platforms that do not have a proper 40firmware. 41.Pp 42Some platforms supported by 43.Nx 44do not have a firmware that can boot the 45.Nx 46kernel. 47Examples are game consoles (dreamcast port), and 48handhelds (hpcarm, hpcmips, and hpcsh ports). 49On such platforms the bootloader is usually a host program that runs 50under the native OS. 51This means that rebooting 52.Nx 53is a lengthy process of booting into the native OS first, 54launching the bootloader program, and finally booting 55.Nx 56again. 57This problem is addressed by 58.Nm , 59which allows the currently running kernel to serve as a bootloader 60for the kernel being booted, thus avoiding the burden of booting 61into the native OS first. 62.Pp 63When 64.Nm 65is configured into the kernel, a call to 66.Xr reboot 2 67causes the 68.Nm 69to load the new kernel into memory, and arrange for control to be 70passed to the new kernel \(em just like a standalone bootloader does. 71The new kernel then boots in the ordinary manner. 72.Sh SEE ALSO 73.Xr reboot 2 , 74.Xr boot 8 , 75.Xr reboot 8 76.Sh HISTORY 77.Nm 78first appeared in 79.Nx 1.6 . 80.Sh BUGS 81.Nm 82ignores 83.Fa howto 84and 85.Fa bootstr 86arguments passed to the 87.Xr reboot 2 88system call, and reboots the system with the previous boot settings. 89.Pp 90.Nm 91doesn't support booting compressed kernels. 92.Pp 93The hpcarm port doesn't support 94.Nm 95yet. 96