diff options
| author | dsl <dsl@NetBSD.org> | 2004-03-13 22:51:50 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2004-03-13 22:51:50 +0000 |
| commit | 7b024ef69cdd2d187997f00ba734bee2c3a5533b (patch) | |
| tree | 368a6107ee1d195a8f246f6ec02ab8ef3dd34ce2 /usr.sbin/installboot | |
| parent | 95cdc0362c397f6c2b051555730c824e6184b7f5 (diff) | |
Add a -o keymap=zyz option that will set the boot keymap.
If a character in the map is typed, it gets replaced by the one following.
Diffstat (limited to 'usr.sbin/installboot')
| -rw-r--r-- | usr.sbin/installboot/arch/i386.c | 6 | ||||
| -rw-r--r-- | usr.sbin/installboot/installboot.8 | 13 | ||||
| -rw-r--r-- | usr.sbin/installboot/installboot.c | 5 | ||||
| -rw-r--r-- | usr.sbin/installboot/installboot.h | 4 | ||||
| -rw-r--r-- | usr.sbin/installboot/machines.c | 8 |
5 files changed, 26 insertions, 10 deletions
diff --git a/usr.sbin/installboot/arch/i386.c b/usr.sbin/installboot/arch/i386.c index 066e60590bb..539b2e56c3a 100644 --- a/usr.sbin/installboot/arch/i386.c +++ b/usr.sbin/installboot/arch/i386.c @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.13 2003/10/27 22:29:59 lukem Exp $ */ +/* $NetBSD: i386.c,v 1.14 2004/03/13 22:51:50 dsl Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ #include <sys/cdefs.h> #if !defined(__lint) -__RCSID("$NetBSD: i386.c,v 1.13 2003/10/27 22:29:59 lukem Exp $"); +__RCSID("$NetBSD: i386.c,v 1.14 2004/03/13 22:51:50 dsl Exp $"); #endif /* !__lint */ #include <sys/param.h> @@ -220,6 +220,8 @@ i386_setboot(ib_params *params) MD5Final(bp->bp_password, &md5ctx); bp->bp_flags |= htole32(X86_BP_FLAGS_PASSWORD); } + if (params->flags & IB_KEYMAP) + strlcpy(bp->bp_keymap, params->keymap, sizeof bp->bp_keymap); if (params->flags & IB_NOWRITE) { retval = 1; diff --git a/usr.sbin/installboot/installboot.8 b/usr.sbin/installboot/installboot.8 index 532137498b5..757d2840a61 100644 --- a/usr.sbin/installboot/installboot.8 +++ b/usr.sbin/installboot/installboot.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: installboot.8,v 1.39 2003/11/26 09:02:52 wiz Exp $ +.\" $NetBSD: installboot.8,v 1.40 2004/03/13 22:51:50 dsl Exp $ .\" .\" Copyright (c) 2002-2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -250,6 +250,11 @@ Modify the default boot command line. Set the console device, \*[Lt]console name\*[Gt] must be one of: pc, com0, com1, com2, com3, com0kbd, com1kbd, com2kbd or com3kbd. . +.It Sy keymap=\*[Lt]keymap\*[Gt] +.Sy [ i386 ] +Set a boot time keyboard translation map. +Each character in \*[Lt]keymap\*[Gt] will be replaced by the one following it. +. .It Sy password=\*[Lt]password\*[Gt] .Sy [ i386 ] Set the password which must be entered before the boot menu can be accessed. @@ -662,6 +667,12 @@ The disk must have a boot partition large enough to hold the bootstrap code. Currently the primary bootstrap must be a LIF format file. . .Ss NetBSD/i386 and NetBSD/amd64 +The bootstrap must be installed in the NetBSD partition that starts at +the beginning of the mbr partition. +If that is a valid filesystem and contains the /boot program then it +will be used as the root filesystem, otherwise the 'a' partition will +be booted. +.Pp The size of primary bootstrap programs is restricted to 8KB, even though some file systems (e.g., ISO 9660) are able to accommodate larger ones. diff --git a/usr.sbin/installboot/installboot.c b/usr.sbin/installboot/installboot.c index 05411d8b1f1..63c0c9c88de 100644 --- a/usr.sbin/installboot/installboot.c +++ b/usr.sbin/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.14 2004/01/05 23:23:38 jmmv Exp $ */ +/* $NetBSD: installboot.c,v 1.15 2004/03/13 22:51:50 dsl Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: installboot.c,v 1.14 2004/01/05 23:23:38 jmmv Exp $"); +__RCSID("$NetBSD: installboot.c,v 1.15 2004/03/13 22:51:50 dsl Exp $"); #endif /* !__lint */ #include <sys/utsname.h> @@ -82,6 +82,7 @@ const struct option { { "append", IB_APPEND, OPT_BOOL }, { "command", IB_COMMAND, OPT_STRING, OFFSET(command) }, { "console", IB_CONSOLE, OPT_WORD, OFFSET(console) }, + { "keymap", IB_KEYMAP, OPT_WORD, OFFSET(keymap) }, { "password", IB_PASSWORD, OPT_WORD, OFFSET(password) }, { "resetvideo", IB_RESETVIDEO, OPT_BOOL }, { "speed", IB_CONSPEED, OPT_INT, OFFSET(conspeed) }, diff --git a/usr.sbin/installboot/installboot.h b/usr.sbin/installboot/installboot.h index 6bbd1a1a6ea..b03ceb74d24 100644 --- a/usr.sbin/installboot/installboot.h +++ b/usr.sbin/installboot/installboot.h @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.h,v 1.23 2003/11/08 16:44:35 dsl Exp $ */ +/* $NetBSD: installboot.h,v 1.24 2004/03/13 22:51:50 dsl Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -68,6 +68,7 @@ typedef enum { IB_CONSPEED = 1<<16, /* i386 console baud rate */ IB_TIMEOUT = 1<<17, /* i386 boot timeout */ IB_PASSWORD = 1<<18, /* i386 boot password */ + IB_KEYMAP = 1<<19, /* i386 console keymap */ } ib_flags; typedef struct { @@ -89,6 +90,7 @@ typedef struct { int conspeed; /* console baud rate */ const char *password; /* boot password */ int timeout; /* interactive boot timeout */ + const char *keymap; /* keyboard translations */ } ib_params; typedef struct { diff --git a/usr.sbin/installboot/machines.c b/usr.sbin/installboot/machines.c index 00ae265803d..958176a91e3 100644 --- a/usr.sbin/installboot/machines.c +++ b/usr.sbin/installboot/machines.c @@ -1,4 +1,4 @@ -/* $NetBSD: machines.c,v 1.22 2003/11/14 12:08:59 lukem Exp $ */ +/* $NetBSD: machines.c,v 1.23 2004/03/13 22:51:50 dsl Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: machines.c,v 1.22 2003/11/14 12:08:59 lukem Exp $"); +__RCSID("$NetBSD: machines.c,v 1.23 2004/03/13 22:51:50 dsl Exp $"); #endif /* !__lint */ #include <sys/types.h> @@ -49,7 +49,7 @@ struct ib_mach machines[] = { IB_STAGE1START | IB_ALPHASUM | IB_APPEND | IB_SUNSUM }, { "amd64", i386_setboot, no_clearboot, IB_RESETVIDEO | IB_CONSOLE | IB_CONSPEED | - IB_PASSWORD | IB_TIMEOUT }, + IB_KEYMAP | IB_PASSWORD | IB_TIMEOUT }, { "amiga", amiga_setboot, no_clearboot, IB_STAGE1START | IB_STAGE2START | IB_COMMAND }, #if 0 @@ -58,7 +58,7 @@ struct ib_mach machines[] = { #endif { "i386", i386_setboot, no_clearboot, IB_RESETVIDEO | IB_CONSOLE | IB_CONSPEED | - IB_PASSWORD | IB_TIMEOUT }, + IB_KEYMAP | IB_PASSWORD | IB_TIMEOUT }, { "macppc", macppc_setboot, macppc_clearboot, IB_STAGE2START }, { "news68k", news68k_setboot, news68k_clearboot, |
