New welcome banner code, modeled after NetBSD/hp300's boot program

welcome banner code.  Includes additional build information, and it
generally nicer to look at.
This commit is contained in:
thorpej 1997-07-26 01:50:36 +00:00
parent 2b51de1aee
commit e31d380775
14 changed files with 114 additions and 105 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.booters,v 1.6 1997/07/15 13:02:04 drochner Exp $
# $NetBSD: Makefile.booters,v 1.7 1997/07/26 01:50:36 thorpej Exp $
BINDIR= /usr/mdec
STRIPFLAG=
@ -19,6 +19,8 @@ DOSSTART= start_dos.o doscommain.o exec_fromdos.o
CPPFLAGS += -I${.OBJDIR} -I$S -I${.CURDIR}/../lib -I$S/lib/libsa
CPPFLAGS+= -D_STANDALONE
CLEANFILES+= vers.c vers.o
.BEGIN: ${.OBJDIR}/machine
depend all: ${.OBJDIR}/machine
CLEANFILES+= ${.OBJDIR}/machine
@ -51,21 +53,25 @@ I386DIR= ${.CURDIR}/../lib # XXX
.include "${I386DIR}/Makefile.inc"
LIBI386= ${I386LIB}
${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \
${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
vers.o:
sh ${.CURDIR}/../newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
${COMPILE.c} vers.c
${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \
vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o
${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \
${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
cp ${PROG}.sym ${PROG}.bin
strip ${PROG}.bin
dd if=${PROG}.bin ibs=32 skip=1 | ${GENPROM} $(ROM_SIZE) > ${PROG}.rom || (rm ${PROG}.rom; false)
rm -f ${PROG}.bin
${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \
${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
cp ${PROG}.sym ${PROG}.bin
strip ${PROG}.bin
dd if=${PROG}.bin of=${PROG}.com ibs=32 skip=1 obs=1024b

View File

@ -1,11 +1,12 @@
# $NetBSD: Makefile,v 1.5 1997/06/19 11:46:44 drochner Exp $
# $NetBSD: Makefile,v 1.6 1997/07/26 01:50:41 thorpej Exp $
S= ${.CURDIR}/../../../../
PROG= biosboot
NOMAN=
NEWVERSWHAT= "BIOS Boot"
SRCS= main.c devopen.c conf.c version.c
SRCS= main.c devopen.c conf.c
CLEANFILES+= ${BSSTART} ${PROG}.sym ${PROG}.list

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.8 1997/07/02 13:20:36 drochner Exp $ */
/* $NetBSD: main.c,v 1.9 1997/07/26 01:50:44 thorpej Exp $ */
/*
* Copyright (c) 1996, 1997
@ -52,7 +52,8 @@ int errno;
static char *consdev;
extern int boot_biosdev;
extern char version[];
extern char bootprog_name[], bootprog_rev[], bootprog_date[],
bootprog_maker[];
char *names[] = {
"netbsd", "netbsd.gz",
@ -393,10 +394,12 @@ void
print_banner(void)
{
printf("\n" ">> NetBSD BOOT: %d/%d k [%s]\n"
"use hd1a:netbsd to boot sd0 when wd0 is also installed\n"
"press return to boot now, any other key for boot menu\n",
getbasemem(), getextmem(), version);
printf("\n");
printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev);
printf(">> (%s, %s)\n", bootprog_maker, bootprog_date);
printf(">> Memory: %d/%d k\n", getbasemem(), getextmem());
printf("Use hd1a:netbsd to boot sd0 when wd0 is also installed\n"
"Press return to boot now, any other key for boot menu\n");
}

View File

@ -0,0 +1,8 @@
$NetBSD: version,v 1.1 1997/07/26 01:50:46 thorpej Exp $
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
file is important. Make sure the current version number is on line 6.
2.1: New welcoming banner.
2.0: Change over to Matthias Drochner's two-stage boot system.
All code is completely new.

View File

@ -1,65 +0,0 @@
/* $NetBSD: version.c,v 1.2 1997/04/13 18:49:31 perry Exp $ */
char version[] = "2.0Beta2";
/*
* NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.
*
* 1.29 -> 2.0
* Change over to Matthias Drochner's two stage boot
* system. All code is completely new.
*
* 1.28 -> 1.29
* various code cleanup. (mycroft)
*
* 1.27 -> 1.28
* fix gets to use real timeout instead of loop and do
* a little cleanup, and add some prototypes. A lot more
* needs to be done here. (perry)
*
* 1.26 -> 1.27
* size reduction and code cleanup. (mycroft)
*
* 1.25 -> 1.26
* size reduction and code cleanup. (mycroft)
*
* 1.24 -> 1.25
* add support for serial consoles. (mycroft)
*
* 1.23 -> 1.24
* change RCS ID format. NOW NEED TO UPDATE STRING BELOW
* BY HAND.
*
* 1.22 -> 1.23, 1.21.2.2
* fix problem with empty symbol tables. (mycroft)
*
* 1.21 -> 1.22, 1.21.2.1
* fix compatibility with pre-4.4 file systems. (mycroft)
*
* 1.20 -> 1.21
* update for 4.4-Lite file system includes and macros (cgd)
*
* 1.19 -> 1.20
* display options in std. format, more changes for size (cgd)
*
* 1.18 -> 1.19
* add a '-r' option, to specify RB_DFLTROOT (cgd)
*
* 1.17 -> 1.18
* removed some more code we don't need for BDB. (mycroft)
*
* 1.16 -> 1.17
* removed with prejudice the extra buffer for xread(), changes
* to make the code smaller, and general cleanup. (mycroft)
*
* 1.15 -> 1.16
* reduce BUFSIZE to 4k, because that's fixed the
* boot problems, for some. (cgd)
*
* 1.14 -> 1.15
* seperated 'version' out from boot.c (cgd)
*
* 1.1 -> 1.14
* look in boot.c revision logs
*/

View File

@ -1,11 +1,12 @@
# $NetBSD: Makefile,v 1.5 1997/06/13 17:49:23 drochner Exp $
# $NetBSD: Makefile,v 1.6 1997/07/26 01:50:50 thorpej Exp $
S= ${.CURDIR}/../../../../
PROG= dosboot
NOMAN=
NEWVERSWHAT= "DOS Boot"
SRCS= main.c devopen.c version.c
SRCS= main.c devopen.c
CLEANFILES+= ${DOSSTART} ${PROG}.sym ${PROG}.com ${PROG}.list

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.3 1997/06/13 13:24:10 drochner Exp $ */
/* $NetBSD: main.c,v 1.4 1997/07/26 01:50:52 thorpej Exp $ */
/*
* Copyright (c) 1996, 1997
@ -49,7 +49,8 @@ extern int getopt __P((int, char **, const char *));
int errno;
static char *consdev;
extern char version[];
extern char bootprog_name[], bootprog_rev[], bootprog_date[],
bootprog_maker[];
#define MAXDEVNAME 16
@ -331,11 +332,11 @@ bootmenu()
static void
print_banner(void)
{
printf("\n"
">> NetBSD BOOT: %d/%d k [%s]\n",
getbasemem(),
getextmem(),
version);
printf("\n");
printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev);
printf(">> (%s, %s)\n", bootprog_maker, bootprog_date);
printf(">> Memory: %d/%d k\n", getbasemem(), getextmem());
}
void

View File

@ -0,0 +1,7 @@
$NetBSD: version,v 1.1 1997/07/26 01:50:54 thorpej Exp $
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
file is important. Make sure the current version number is on line 6.
1.1: New welcoming banner.
1.0: Matthias Drochner's new DOS boot program.

View File

@ -1,3 +0,0 @@
/* $NetBSD: version.c,v 1.1.1.1 1997/03/14 02:40:34 perry Exp $ */
char version[] = "1.0Beta";

View File

@ -1,11 +1,12 @@
# $NetBSD: Makefile,v 1.8 1997/07/15 11:23:11 drochner Exp $
# $NetBSD: Makefile,v 1.9 1997/07/26 01:50:59 thorpej Exp $
S= ${.CURDIR}/../../../../
PROG= netboot
NOMAN=
NEWVERSWHAT= "Network Boot"
SRCS= main.c devopen.c conf.c dev_net.c version.c
SRCS= main.c devopen.c conf.c dev_net.c
CLEANFILES+= ${ROMSTART} ${PROG}.bin ${PROG}.rom ${PROG}.sym ${PROG}.list

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.3 1997/06/13 13:25:25 drochner Exp $ */
/* $NetBSD: main.c,v 1.4 1997/07/26 01:51:01 thorpej Exp $ */
/*
* Copyright (c) 1996
@ -46,7 +46,8 @@
int errno;
static char *consdev;
extern char version[];
extern char bootprog_name[], bootprog_rev[], bootprog_date[],
bootprog_maker[];
extern char etherdev[];
#ifdef SUPPORT_NFS /* XXX */
@ -254,11 +255,11 @@ awaitkey(void)
static void
print_banner(void)
{
printf("\n"
">> NetBSD BOOT: %d/%d k [%s]\n",
getbasemem(),
getextmem(),
version);
printf("\n");
printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev);
printf(">> (%s, %s)\n", bootprog_maker, bootprog_date);
printf(">> Memory: %d/%d k\n", getbasemem(), getextmem());
}
int

View File

@ -0,0 +1,7 @@
$NetBSD: version,v 1.1 1997/07/26 01:51:03 thorpej Exp $
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
file is important. Make sure the current version number is on line 6.
1.1: New welcoming banner.
1.0: Matthias Drochner's new network boot program.

View File

@ -1,3 +0,0 @@
/* $NetBSD: version.c,v 1.1.1.1 1997/03/14 02:40:30 perry Exp $ */
char version[] = "1.0Beta";

View File

@ -0,0 +1,44 @@
#!/bin/sh -
#
# $NetBSD: newvers.sh,v 1.1 1997/07/26 01:50:38 thorpej Exp $
#
# Copyright (c) 1984, 1986, 1990, 1993
# The Regents of the University of California. 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.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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 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.
#
# @(#)newvers.sh 8.1 (Berkeley) 4/20/94
u=${USER-root} h=`hostname` t=`date`
r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '`
echo "char bootprog_name[] = \"NetBSD/i386 ${2}\";" > vers.c
echo "char bootprog_rev[] = \"${r}\";" >> vers.c
echo "char bootprog_date[] = \"${t}\";" >> vers.c
echo "char bootprog_maker[] = \"${u}@${h}\";" >> vers.c