summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-03-13 11:03:36 +0000
committerru <ru@FreeBSD.org>2002-03-13 11:03:36 +0000
commitbb48189d63bcab28186be144df790b4d290caf12 (patch)
tree00c37518865e0b3f206b7be72ea8b6fc01f6b091
parent4eb95bc05a3fffdabed3b1269b9cacbde5b38fc8 (diff)
downloadFreeBSD-src-bb48189d63bcab28186be144df790b4d290caf12.zip
FreeBSD-src-bb48189d63bcab28186be144df790b4d290caf12.tar.gz
Implement -m and -p loader(8) "boot" command options in boot2.
(This is more useful for 4.x where boot blocks can still load kernels, modulo the PR kern/17422.)
-rw-r--r--sbin/reboot/boot_i386.86
-rw-r--r--sys/boot/i386/boot2/boot2.c10
-rw-r--r--sys/boot/i386/gptboot/gptboot.c10
3 files changed, 18 insertions, 8 deletions
diff --git a/sbin/reboot/boot_i386.8 b/sbin/reboot/boot_i386.8
index 4f7ee94..779d9f0 100644
--- a/sbin/reboot/boot_i386.8
+++ b/sbin/reboot/boot_i386.8
@@ -115,7 +115,7 @@ the listing will be of the relevant subdirectory.)
.Ar bios_drive : Ns Ar interface Ns Po
.Ar unit , Ns Ar part Pc
.Ar filename
-.Op Fl aCcDdghPprsv
+.Op Fl aCcDdghmPprsv
.Xc
Specify boot file and flags.
.Bl -tag -width indent
@@ -161,7 +161,7 @@ The pathname of the file to boot (relative to the root directory
on the specified partition). Defaults to
.Pa /kernel .
Symbolic links are not supported (hard links are).
-.It Fl acCdDghPrsv
+.It Fl aCcDdghmPprsv
Boot flags:
.Pp
.Bl -tag -width "-CXX" -compact
@@ -217,6 +217,8 @@ regardless of the
option described here. See the man page for
.Xr sio 4
for more details.
+.It Fl m
+mute the console.
.It Fl P
probe the keyboard. If no keyboard is found, the
.Fl D
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c
index fd2145d..520753d 100644
--- a/sys/boot/i386/boot2/boot2.c
+++ b/sys/boot/i386/boot2/boot2.c
@@ -46,17 +46,19 @@
#define RBX_SERIAL 0xc /* -h */
#define RBX_CDROM 0xd /* -C */
#define RBX_GDB 0xf /* -g */
+#define RBX_MUTE 0x10 /* -m */
+#define RBX_PAUSE 0x12 /* -p */
#define RBX_DUAL 0x1d /* -D */
#define RBX_PROBEKBD 0x1e /* -P */
-#define RBX_MASK 0x2000ffff
+#define RBX_MASK 0x2005ffff
#define PATH_CONFIG "/boot.config"
#define PATH_BOOT3 "/boot/loader"
#define PATH_KERNEL "/kernel"
#define ARGS 0x900
-#define NOPT 11
+#define NOPT 13
#define NDEV 5
#define MEM_BASE 0x12
#define MEM_EXT 0x15
@@ -98,7 +100,7 @@ static struct dmadat {
extern uint32_t _end;
-static const char optstr[NOPT] = "DhaCcdgPrsv";
+static const char optstr[NOPT] = "DhaCcdgmPprsv";
static const unsigned char flags[NOPT] = {
RBX_DUAL,
RBX_SERIAL,
@@ -107,7 +109,9 @@ static const unsigned char flags[NOPT] = {
RBX_CONFIG,
RBX_KDB,
RBX_GDB,
+ RBX_MUTE,
RBX_PROBEKBD,
+ RBX_PAUSE,
RBX_DFLTROOT,
RBX_SINGLE,
RBX_VERBOSE
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index fd2145d..520753d 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -46,17 +46,19 @@
#define RBX_SERIAL 0xc /* -h */
#define RBX_CDROM 0xd /* -C */
#define RBX_GDB 0xf /* -g */
+#define RBX_MUTE 0x10 /* -m */
+#define RBX_PAUSE 0x12 /* -p */
#define RBX_DUAL 0x1d /* -D */
#define RBX_PROBEKBD 0x1e /* -P */
-#define RBX_MASK 0x2000ffff
+#define RBX_MASK 0x2005ffff
#define PATH_CONFIG "/boot.config"
#define PATH_BOOT3 "/boot/loader"
#define PATH_KERNEL "/kernel"
#define ARGS 0x900
-#define NOPT 11
+#define NOPT 13
#define NDEV 5
#define MEM_BASE 0x12
#define MEM_EXT 0x15
@@ -98,7 +100,7 @@ static struct dmadat {
extern uint32_t _end;
-static const char optstr[NOPT] = "DhaCcdgPrsv";
+static const char optstr[NOPT] = "DhaCcdgmPprsv";
static const unsigned char flags[NOPT] = {
RBX_DUAL,
RBX_SERIAL,
@@ -107,7 +109,9 @@ static const unsigned char flags[NOPT] = {
RBX_CONFIG,
RBX_KDB,
RBX_GDB,
+ RBX_MUTE,
RBX_PROBEKBD,
+ RBX_PAUSE,
RBX_DFLTROOT,
RBX_SINGLE,
RBX_VERBOSE
OpenPOWER on IntegriCloud