Add a version file and print version strings generated by newvers_stand.sh.

This commit is contained in:
tsutsui 2001-01-30 14:29:47 +00:00
parent 9af4874133
commit 677243711e
3 changed files with 39 additions and 10 deletions

View File

@ -1,3 +1,14 @@
# $NetBSD: Makefile.inc,v 1.1 1999/12/09 14:53:20 tsutsui Exp $
# $NetBSD: Makefile.inc,v 1.2 2001/01/30 14:29:47 tsutsui Exp $
BINDIR= /usr/mdec
# if there is a 'version' file, add rule for vers.c and add it to SRCS
# and CLEANFILES
.if exists(version)
.PHONY: vers.c
vers.c: version
sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE}
SRCS+= vers.c
CLEANFILES+= vers.c
.endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot.c,v 1.3 2000/11/25 04:42:06 tsutsui Exp $ */
/* $NetBSD: boot.c,v 1.4 2001/01/30 14:29:48 tsutsui Exp $ */
/*-
* Copyright (C) 1999 Izumi Tsutsui. All rights reserved.
@ -33,8 +33,13 @@
#include <machine/romcall.h>
void ICIA __P((void));
extern char edata[], end[];
extern void ICIA(void);
/* version strings in vers.c (generated by newvers.sh) */
extern const char bootprog_name[];
extern const char bootprog_rev[];
extern const char bootprog_date[];
extern const char bootprog_maker[];
char *devs[] = { "hd", "fh", "fd", NULL, NULL, "rd", "st" };
char *kernels[] = { "/netbsd", "/netbsd.gz", NULL };
@ -47,18 +52,21 @@ char *kernels[] = { "/netbsd", "/netbsd.gz", NULL };
void
boot(d4, d5, d6, d7)
int d4, d5, d6, d7;
u_int32_t d4, d5, d6, d7;
{
int fd, i;
int ctlr, unit, part, type;
int bootdev = d6;
u_int32_t bootdev = d6;
char *netbsd = (char *)d5;
u_long marks[MARK_MAX];
char devname[32], file[32];
void (*entry)();
static char devname[32], file[32];
void (*entry)(void);
printf("\n");
printf("NetBSD/news68k Secondary Boot\n");
printf("%s Secondary Boot, Revision %s\n",
bootprog_name, bootprog_rev);
printf("(%s, %s)\n", bootprog_maker, bootprog_date);
printf("\n");
/* bootname is "boot" by default. */
if (netbsd == NULL || strcmp(netbsd, "boot") == 0 ||
@ -125,5 +133,5 @@ boot(d4, d5, d6, d7)
__asm __volatile ("movl %0,%%d5" : : "m" (netbsd));
__asm __volatile ("movl %0,%%d4" : : "m" (d4));
__asm __volatile ("movl %0,%%d2" : : "m" (marks[MARK_END]));
(*((int (*)())entry))();
(*entry)();
}

View File

@ -0,0 +1,10 @@
$NetBSD: version,v 1.1 2001/01/30 14:29:49 tsutsui Exp $
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
file is important - make sure the entries are appended on end, last item
is taken as the current.
1.1: Initial version
1.2: Add news1200 support
1.3: Return PROM prompt even if loading kernel fails halfway
1.4: Use newvers_stand.sh and print version strings