Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/news68k/stand Add a version file and print version ...



details:   https://anonhg.NetBSD.org/src/rev/0d687edda9ea
branches:  trunk
changeset: 503065:0d687edda9ea
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Tue Jan 30 14:29:47 2001 +0000

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

diffstat:

 sys/arch/news68k/stand/Makefile.inc |  13 ++++++++++++-
 sys/arch/news68k/stand/boot/boot.c  |  26 +++++++++++++++++---------
 sys/arch/news68k/stand/boot/version |  10 ++++++++++
 3 files changed, 39 insertions(+), 10 deletions(-)

diffs (92 lines):

diff -r 5acde98ea9c5 -r 0d687edda9ea sys/arch/news68k/stand/Makefile.inc
--- a/sys/arch/news68k/stand/Makefile.inc       Tue Jan 30 14:21:49 2001 +0000
+++ b/sys/arch/news68k/stand/Makefile.inc       Tue Jan 30 14:29:47 2001 +0000
@@ -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
diff -r 5acde98ea9c5 -r 0d687edda9ea sys/arch/news68k/stand/boot/boot.c
--- a/sys/arch/news68k/stand/boot/boot.c        Tue Jan 30 14:21:49 2001 +0000
+++ b/sys/arch/news68k/stand/boot/boot.c        Tue Jan 30 14:29:47 2001 +0000
@@ -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 @@
 
 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 @@
        __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)();
 }
diff -r 5acde98ea9c5 -r 0d687edda9ea sys/arch/news68k/stand/boot/version
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/news68k/stand/boot/version       Tue Jan 30 14:29:47 2001 +0000
@@ -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



Home | Main Index | Thread Index | Old Index