From: miod Date: Thu, 12 Jan 2023 19:37:53 +0000 (+0000) Subject: Update luna88k boot procedure; help & tweaks jmc@ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f4d96c454fbe9b0e78c73eac9f81962a392afe86;p=openbsd Update luna88k boot procedure; help & tweaks jmc@ --- diff --git a/share/man/man8/man8.luna88k/boot_luna88k.8 b/share/man/man8/man8.luna88k/boot_luna88k.8 index 178a7e6158e..b289d64cd42 100644 --- a/share/man/man8/man8.luna88k/boot_luna88k.8 +++ b/share/man/man8/man8.luna88k/boot_luna88k.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: boot_luna88k.8,v 1.7 2014/05/24 19:11:16 miod Exp $ +.\" $OpenBSD: boot_luna88k.8,v 1.8 2023/01/12 19:37:53 miod Exp $ .\" .\" Copyright (c) 2004, Miodrag Vallat. .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 24 2014 $ +.Dd $Mdocdate: January 12 2023 $ .Dt BOOT_LUNA88K 8 luna88k .Os .Sh NAME @@ -59,6 +59,12 @@ The following switches alter the kernel behaviour: .It Li 3 Ta "prompt for root device" Ta "do not prompt for root device" .It Li 4 Ta "enter UKC mode" Ta "do not enter UKC mode" .El +Note that the same behaviour can be used by passing the +.Fl s , +.Fl a , +and +.Fl c +options respectively in the boot loader, rather than using the switches. .Pp For more details about the .Dq User Kernel Configuration @@ -92,7 +98,7 @@ standalone installation kernel, suitable for disaster recovery .El .Sh SEE ALSO .Xr ddb 4 , -.\" .Xr boot 8 , +.Xr boot 8 , .Xr boot_config 8 , .Xr halt 8 , .Xr init 8 , diff --git a/sys/arch/luna88k/stand/Makefile b/sys/arch/luna88k/stand/Makefile index 8ecb9693395..0024522868b 100644 --- a/sys/arch/luna88k/stand/Makefile +++ b/sys/arch/luna88k/stand/Makefile @@ -1,8 +1,6 @@ -# $OpenBSD: Makefile,v 1.1 2013/10/28 22:13:11 miod Exp $ +# $OpenBSD: Makefile,v 1.2 2023/01/12 19:37:53 miod Exp $ # $NetBSD: Makefile,v 1.1 2013/01/06 07:04:49 tsutsui Exp $ -.if ${MACHINE} == "luna88k" SUBDIR= boot -.endif .include diff --git a/sys/arch/luna88k/stand/boot/Makefile b/sys/arch/luna88k/stand/boot/Makefile index b821d77ba8c..cb483fa03dd 100644 --- a/sys/arch/luna88k/stand/boot/Makefile +++ b/sys/arch/luna88k/stand/boot/Makefile @@ -1,8 +1,11 @@ -# $OpenBSD: Makefile,v 1.13 2023/01/10 17:10:57 miod Exp $ +# $OpenBSD: Makefile,v 1.14 2023/01/12 19:37:53 miod Exp $ # $NetBSD: Makefile,v 1.9 2013/01/22 15:48:40 tsutsui Exp $ # @(#)Makefile 8.2 (Berkeley) 8/15/93 -NOMAN= # defined +MAN?= boot.8 + +.if ${MACHINE} == "luna88k" +PROG= boot S= ${.CURDIR}/../../../.. @@ -36,8 +39,6 @@ SRCS+= ufs_disksubr.c SRCS+= if_le.c lance.c getsecs.c SRCS+= dev_net.c -PROG= boot - ### find out what to use for libkern .PATH: ${S}/lib/libkern SRCS+= memcpy.c memmove.c strlcat.c strlcpy.c strlen.c @@ -73,4 +74,8 @@ CLEANFILES+= ${PROG}.elf @([ -h m88k ] || ln -s ${.CURDIR}/../../../m88k/include m88k) .endif +.else +NOPROG= +.endif + .include diff --git a/sys/arch/luna88k/stand/boot/boot.8 b/sys/arch/luna88k/stand/boot/boot.8 new file mode 100644 index 00000000000..19d6874850f --- /dev/null +++ b/sys/arch/luna88k/stand/boot/boot.8 @@ -0,0 +1,266 @@ +.\" $OpenBSD: boot.8,v 1.1 2023/01/12 19:37:53 miod Exp $ +.\" +.\" Copyright (c) 1997-2001 Michael Shalayeff +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, +.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" +.Dd $Mdocdate: January 12 2023 $ +.Dt BOOT 8 luna88k +.Os +.Sh NAME +.Nm boot , +.Nm boot.conf +.Nd luna88k-specific bootstrap +.Sh DESCRIPTION +The main purpose of this program is to load the system kernel. +.Pp +As described in +.Xr boot_luna88k 8 , +this program is loaded by the luna88k ROM monitor +and provides a convenient way to load the kernel. +This program acts as an enhanced boot monitor for luna88k systems, providing +a common interface for the kernel to start from. +.Pp +Basic operations include: +.Pp +.Bl -bullet -compact +.It +Loading kernels from the network, or any SCSI device. +.\" not yet... +.\" .It +.\" Loading kernels compressed by +.\" .Xr gzip 1 . +.It +Providing an interactive command line. +.El +.Pp +The sequence of its operation is as follows: initialization, +parsing the configuration file, then an interactive command line. +While at the command line you have 5 seconds to type any commands, if needed. +If time expires, the kernel will be loaded according to +the current variable settings (see the +.Ic set +command). +Each time a kernel load fails, the timeout is increased by one second. +The sequence of +.Nm +operations is as follows: +.Bl -enum +.It +If the file +.Pa /etc/boot.conf +exists on the filesystem +.Nm +was loaded from, open and parse it. +Lines beginning with the +.Sq # +character, +as well as whitespace at the beginning of lines, +are ignored. +The file may contain any commands +.Nm +accepts at the interactive prompt. +Though default settings usually suffice, they can be changed here. +.It +The header line +.Pp +.Dl >> OpenBSD/luna88k BOOT [x.xx] +.Pp +is displayed to the active console, where +.Ar x.xx +is the version number of the +.Nm +program, followed by the +.Pp +.Dl boot> +.Pp +prompt, which means you are in interactive mode and may enter commands. +If you do not, +.Nm +will proceed to load the kernel with the current parameters after the +timeout period has expired. +.El +.Pp +By default, +.Nm +attempts to load the kernel executable +.Pa /bsd . +If it fails to find the kernel and no alternative kernel image has +been specified, the system will be unable to boot. +.Sh COMMANDS +The following commands are accepted at the +.Nm +prompt: +.Bl -tag -width shorten +.It Ic boot Oo Oo Ar device : Oc Ns Ar image Oc Op Fl acds +Boots the specified kernel image +with any options given. +If +.Ar device +or +.Ar image +are omitted, values from +.Nm +variables will be used. +.Pp +Available devices are: +.Bl -tag -width tenletters +.It sd(d,l,p) +SCSI device number +.Ar d , +logical unit number +.Ar l , +and partition +.Ar p . +The last two arguments can be omitted, +in which case they will have a default value of zero. +The encoding of the device number will match the encoding used by the ROM: +devices numbered 0 to 6 on the first SCSI controller will use numbers 6 to 0, +and devices numbered 0 to 6 on the second SCSI controller (on Luna88k-2 systems +only) will use numbers 16 to 10. +.It le() +Onboard Ethernet. +.El +.Bl -tag -width _a_ +.It Fl a +Causes the kernel to ask for the +.Nm root +device to use. +.It Fl c +Causes the kernel to go into +.Xr boot_config 8 +before performing +.Xr autoconf 4 +procedures. +.It Fl d +Causes the kernel to drop into +.Xr ddb 4 +at the earliest convenient point. +.It Fl s +Causes the kernel to boot single-user. +.El +.It Ic echo Op Ar args +Displays +.Ar args +on the console device. +.It Ic help +Prints a list of available commands. +.It Ic hexdump Ar addr size +Show +.Ar size +bytes of memory at address +.Ar addr . +.It Ic ls Op Ar directory +Prints contents of the specified +.Ar directory +in long format including: attributes and file type, owner, group, +size, filename. +.It Ic reboot +Reboots the machine by initiating a warm boot procedure. +.It Ic set Op Ar varname Op Ar value +If invoked without arguments, prints a list of variables and their values. +If only +.Ar varname +is specified, displays contents of that variable. +If +.Ar varname +and +.Ar value +are both specified, sets that variable to the given value. +Variables include: +.Pp +.Bl -tag -compact -width db_console +.It Ic addr +Address at which to load the kernel. +.It Ic debug +Debug flag if +.Nm +was compiled with DEBUG defined. +.It Ic device +Boot device name (e.g., +.Li sd(6,0) ) . +.It Ic howto +Options to pass to the loaded kernel. +.It Ic image +File name containing the kernel image. +.It Ic timeout +Number of seconds boot will wait for human intervention before +booting the default kernel image. +.El +.\" Intentionally undocumented at the moment +.\" .It Ic time +.\" Displays system time and date. +.El +.Sh FILES +.Bl -tag -width /usr/mdec/boot -compact +.It Pa /usr/mdec/boot +system bootstrap +.It Pa /etc/boot.conf +system bootstrap's startup file +.It Pa /bsd +kernel image +.It Pa /bsd.sp +kernel image for single processor machines +.It Pa /bsd.mp +kernel image for multiprocessor machines +.It Pa /bsd.rd +kernel image for installation/recovery +.El +.Sh EXAMPLES +Boot the default kernel: +.Pp +.Dl boot> boot +.Pp +Remove the 5 second pause at boot-time permanently, causing +.Nm +to load the kernel immediately without prompting: +.Pp +.Dl # echo \&"boot\&" > /etc/boot.conf +.Pp +Boot the kernel named +.Pa /bsd +from the SCSI disk with ID 2 in +.Dq User Kernel Configuration +mode (see +.Xr boot_config 8 ) . +This mechanism allows for the explicit enabling and disabling of devices +during the current boot sequence, as well as the modification +of device parameters. +Once booted, such changes can be made permanent by using +.Xr config 8 Ns 's +.Fl e +option. +.Pp +.Dl boot> boot sd(4):/bsd -c +.Sh SEE ALSO +.\" .Xr gzip 1 , +.Xr autoconf 4 , +.Xr ddb 4 , +.Xr boot_config 8 , +.Xr boot_luna88k 8 , +.Xr reboot 8 +.Sh HISTORY +This program was written by Michael Shalayeff for +.Ox 2.1 +on the i386 platform, and was later ported to the luna88k platform.