Module Name: src Committed By: mlelstv Date: Fri Jan 15 08:27:04 UTC 2016
Modified Files: src/share/man/man8/man8.amiga: boot.8 src/sys/arch/amiga/stand/bootblock/boot: Makefile console.c src/sys/arch/amiga/stand/bootblock/bootxx_ffs: Makefile Log Message: Add 'C' option to bootblock to enable serial console. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man8/man8.amiga/boot.8 cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amiga/stand/bootblock/boot/Makefile cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amiga/stand/bootblock/boot/console.c cvs rdiff -u -r1.22 -r1.23 \ src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man8/man8.amiga/boot.8 diff -u src/share/man/man8/man8.amiga/boot.8:1.12 src/share/man/man8/man8.amiga/boot.8:1.13 --- src/share/man/man8/man8.amiga/boot.8:1.12 Sat Sep 5 11:37:52 2009 +++ src/share/man/man8/man8.amiga/boot.8 Fri Jan 15 08:27:04 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: boot.8,v 1.12 2009/09/05 11:37:52 wiz Exp $ +.\" $NetBSD: boot.8,v 1.13 2016/01/15 08:27:04 mlelstv Exp $ .\" .\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. @@ -85,13 +85,11 @@ typing in an alternate command sequence. The command line looks like: .Bd -ragged -offset indent .Ar kernel-path -.Op Fl abknpqstvADZ +.Op Fl abkpqsvACDS .Op Fl c Ar model .Op Fl m Ar memsize .Op Fl n Ar memsegments .Op Fl I Ar mask -.Op Fl S Ar amount -.Op Fl T Ar amount .Ed .Pp .Bl -tag -width flag @@ -129,8 +127,13 @@ Boot in quiet mode. Boot into single-user mode. .It Fl v Boot in verbose mode. +.It Fl A +Enable AGA display modes. +.It Fl C +Use the serial port as console. .It Fl D -Enter the kernel debugger (best used with -S) +Enter the kernel debugger (best used with +.Fl S ) . .It Fl I Ar mask inhibit sync negotiation as follows: The .Ar mask @@ -142,7 +145,8 @@ real SCSI busses, but not, e.g., to inte The bytes are used up from right to left by SCSI bus drivers using this convention. .It Fl S -Load the kernel symbols +include kernel debug symbols (for use by +.Fl D ) . .El .Ss Booting NetBSD using the loadbsd program When you want (or have to) start @@ -153,13 +157,11 @@ program that is supplied in the utils di The loadbsd command line specification is: .Bd -ragged -offset indent .Nm loadbsd -.Op Fl abknpstADZ +.Op Fl abkpqstvACDSZ .Op Fl c Ar model .Op Fl m Ar memsize .Op Fl n Ar memsegments .Op Fl I Ar mask -.Op Fl S Ar amount -.Op Fl T Ar amount .Ar kernel-path .Ed .Pp @@ -186,17 +188,22 @@ of memory to use, encoded as follows: 0 2 segments, 2: 3 or more segments. .It Fl p Select kernel load segment by priority instead of size. +.It Fl q +Boot in quiet mode. .It Fl s Boot into single-user mode. .It Fl t Test loading of the kernel but don't start .Nx . +.It Fl v +Boot in verbose mode. .It Fl A -enable AGA modes. +enable AGA display modes. +.It Fl C +Use the serial port as console .It Fl D -Enter the kernel debugger after booting. -Best with -.Fl S . +Enter the kernel debugger (best used with +.Fl S ) . .It Fl I Ar mask inhibit sync negotiation as follows: The .Ar mask @@ -208,7 +215,8 @@ real SCSI busses, but not, e.g., to inte The bytes are used up from right to left by SCSI bus drivers using this convention. .It Fl S -include kernel debug symbols (for use by -D). +include kernel debug symbols (for use by +.Fl D ) . .It Fl Z Force load via chip memory. Won't work if kernel is larger than the chip memory size or on the Index: src/sys/arch/amiga/stand/bootblock/boot/Makefile diff -u src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.52 src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.53 --- src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.52 Sat Apr 19 00:55:37 2014 +++ src/sys/arch/amiga/stand/bootblock/boot/Makefile Fri Jan 15 08:27:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.52 2014/04/19 00:55:37 tsutsui Exp $ +# $NetBSD: Makefile,v 1.53 2016/01/15 08:27:04 mlelstv Exp $ .include <bsd.own.mk> .include <bsd.sys.mk> # for HOST_SH @@ -52,7 +52,7 @@ OBJS= $(SOBJS) $(COBJS) #XX#DEFS = -D_STANDALONE -DSA_EXEC_ANYOWNER -DDYNAMIC_CRC_TABLE -DNOBYFOUR -UBYFOUR DEFS = -D_STANDALONE -DSA_EXEC_ANYOWNER DEFS += -D__INTERNAL_LIBSA_CREAD -#DEFS += -DSERCONSOLE +DEFS += -DSERCONSOLE SOBJS += cread.o #XX#SOBJS += adler32.o crc32.o inflate.o trees.o \ Index: src/sys/arch/amiga/stand/bootblock/boot/console.c diff -u src/sys/arch/amiga/stand/bootblock/boot/console.c:1.13 src/sys/arch/amiga/stand/bootblock/boot/console.c:1.14 --- src/sys/arch/amiga/stand/bootblock/boot/console.c:1.13 Sat Oct 17 11:18:18 2009 +++ src/sys/arch/amiga/stand/bootblock/boot/console.c Fri Jan 15 08:27:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: console.c,v 1.13 2009/10/17 11:18:18 mlelstv Exp $ */ +/* $NetBSD: console.c,v 1.14 2016/01/15 08:27:04 mlelstv Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -71,6 +71,39 @@ static struct Console myConsole; u_int16_t timelimit; +#ifdef SERCONSOLE +static int use_serconsole; +extern char default_command[]; + +static void +conspreinit(void) +{ + char *p = default_command; + char c; + + /* + * preparse the default command to check for -C option + * that selects the serial console + */ + while ((c = *p)) { + while (c == ' ') + c = *++p; + if (c == '-') { + while ((c = *++p) && c != ' ') { + switch (c) { + case 'C': + use_serconsole = 1; + break; + } + } + } else { + while ((c = *++p) && c != ' ') + ; + } + } +} +#endif + int consinit(void *consptr) { struct Console *mc; @@ -116,7 +149,9 @@ consinit(void *consptr) { goto err; #ifdef SERCONSOLE - RawIOInit(); + conspreinit(); + if (use_serconsole) + RawIOInit(); #endif ConsoleBase = mc; @@ -189,7 +224,8 @@ putchar(int c) mc->cnior->cmd = Cmd_Wr; #ifdef SERCONSOLE - RawPutChar((int32_t)c); + if (use_serconsole) + RawPutChar((int32_t)c); #endif (void)DoIO(mc->cnior); @@ -205,8 +241,10 @@ puts(char *s) mc->cnior->cmd = Cmd_Wr; #ifdef SERCONSOLE - while (*s) - RawPutChar(*s++); + if (use_serconsole) { + while (*s) + RawPutChar(*s++); + } #endif (void)DoIO(mc->cnior); @@ -245,10 +283,12 @@ getchar(void) ticks = 1; } else /* if (ior == mc->tmior) */ { #ifdef SERCONSOLE - r = RawMayGetChar(); - if (r != -1) { - c = r; - ticks = 1; + if (use_serconsole) { + r = RawMayGetChar(); + if (r != -1) { + c = r; + ticks = 1; + } } #endif if (ticks == 1) Index: src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile diff -u src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.22 src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.23 --- src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.22 Tue Apr 29 08:11:46 2014 +++ src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile Fri Jan 15 08:27:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2014/04/29 08:11:46 martin Exp $ +# $NetBSD: Makefile,v 1.23 2016/01/15 08:27:04 mlelstv Exp $ ### what we need: @@ -33,7 +33,7 @@ SOBJS += libstubs.o memcmp.o memmove.o m OBJS= $(SOBJS) $(COBJS) -DEFS = -D_STANDALONE -DSA_EXEC_ANYOWNER -D_PRIMARY_BOOT +DEFS = -D_STANDALONE -DSA_EXEC_ANYOWNER -D_PRIMARY_BOOT -DSERCONSOLE .NOPATH: ${OBJS} x.out f.out libboot.a xxstart.o