summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-09-05 10:03:51 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-09-05 10:03:51 +0000
commitf0a237b71c3579bc5ddb8d14e467ab91719da7d6 (patch)
treea97a20241760624e15dcee6e3db2132c685bb979 /sys/arch
parent19fa07358428eb61843923000e55e1f3c93c1fa8 (diff)
Fix file specification, zap partition bits, rectify disk naming errors
In boot_macppc(8), the current format a) claims to support specific disk/MBR partitions which ofwboot clearly does not parse as such and b) lacks markup to make clear which optional parts can (not) be omitted in what way. Fixing both turns promdev:partition/filename options into [[promdev:]filename] [-acds] Same goes for boot(8/macppc), which has been apparently has been copied from boot(8/amd64) without accounting for all platform specific details. On amd64, biosboot(8) sees disks as 'sd' which (accidentially?) matches the kernel driver's sd(4) name; it also supports specific disklabel(5) slices, so amd64 can do 'sd0a:/bsd'. On macppc, disks show up as 'ide', 'cd' or 'hd' which stems from OpenFirmware alone, not matching the wd(4) driver's name. Also, ofwboot always boots off the 'a' label, so macppc can only do 'hd:/bsd'. Found while installing OpenBSD/macppc from CD inside QEMU but failing to boot from disk inside QEMU and consulting our manual pages for help wrt. specifying a boot device. Turns out QEMU's OpenBIOS simply cannot boot from MSDOS filesystems (thanks gkoehler), so it wouldn't work no matter what boot file specification I'd use. tests/agreement gkoehler Feedback OK miod OK tobhe OK jmc on a previous boot_macppc.8 diff
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/stand/boot.831
-rw-r--r--sys/arch/macppc/stand/ofdev.c3
2 files changed, 16 insertions, 18 deletions
diff --git a/sys/arch/macppc/stand/boot.8 b/sys/arch/macppc/stand/boot.8
index 911bb5057d8..153a904bb00 100644
--- a/sys/arch/macppc/stand/boot.8
+++ b/sys/arch/macppc/stand/boot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: boot.8,v 1.4 2019/12/23 12:44:34 bluhm Exp $
+.\" $OpenBSD: boot.8,v 1.5 2022/09/05 10:03:50 kn Exp $
.\"
.\" Copyright (c) 1997-2001 Michael Shalayeff
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
-.Dd $Mdocdate: December 23 2019 $
+.Dd $Mdocdate: September 5 2022 $
.Dt BOOT 8 macppc
.Os
.Sh NAME
@@ -125,29 +125,26 @@ The following commands are accepted at the
.Nm
prompt:
.Bl -tag -width shorten
-.It Ic boot Op Ar image Op Fl acds
-Boots the kernel image specified by
+.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
-with any options given.
-Image specification consists of a pair
-.Ar device : Ns Ar filename ;
-either or both can be omitted (`:' is not needed if both are omitted),
-in which case values from
+are omitted, values from the
.Nm
variables will be used.
.Pp
The only bootable devices, at the moment, are IDE devices connected to
the internal controller;
they are detected as
-.Sq wd
+.Sq hd
devices.
Therefore, to boot kernel
.Pa /bsd
-from slice
-.Sq a
on the first hard drive,
specify
-.Dq boot wd0a:/bsd .
+.Dq boot hd:/bsd .
.Bl -tag -width _a_
.It Fl a
Causes the kernel to ask for the
@@ -205,8 +202,10 @@ Debug flag if
was compiled with DEBUG defined.
.It Ic device
Boot device name (e.g.,
-.Li wd0a ,
-.Li wd1a ) .
+.Li ide ,
+.Li ide0 ,
+.Li hd ,
+.Li hd1 ) .
.It Ic howto
Options to pass to the loaded kernel.
.It Ic image
@@ -277,7 +276,7 @@ Once booted, such changes can be made permanent by using
.Fl e
option.
.Pp
-.Dl boot> boot wd1a:/bsd -c
+.Dl boot> boot hd:/bsd -c
.Sh SEE ALSO
.Xr gzip 1 ,
.Xr autoconf 4 ,
diff --git a/sys/arch/macppc/stand/ofdev.c b/sys/arch/macppc/stand/ofdev.c
index 0ce6e9a933a..066403f2a41 100644
--- a/sys/arch/macppc/stand/ofdev.c
+++ b/sys/arch/macppc/stand/ofdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdev.c,v 1.26 2021/03/11 11:16:59 jsg Exp $ */
+/* $OpenBSD: ofdev.c,v 1.27 2022/09/05 10:03:50 kn Exp $ */
/* $NetBSD: ofdev.c,v 1.1 1997/04/16 20:29:20 thorpej Exp $ */
/*
@@ -55,7 +55,6 @@ char opened_name[256];
/*
* this function is passed [device specifier]:[kernel]
- * however a device specifier may contain a ':'
*/
static int
parsename(char *str, char **file)