CVS commit: src/sys/arch/x68k/stand/boot

2020-01-13 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Tue Jan 14 03:48:10 UTC 2020

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
consio_init() should be done before printf().


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.30 src/sys/arch/x68k/stand/boot/boot.c:1.31
--- src/sys/arch/x68k/stand/boot/boot.c:1.30	Thu Aug  4 12:15:07 2016
+++ src/sys/arch/x68k/stand/boot/boot.c	Tue Jan 14 03:48:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.30 2016/08/04 12:15:07 isaki Exp $	*/
+/*	$NetBSD: boot.c,v 1.31 2020/01/14 03:48:10 isaki Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -387,6 +387,8 @@ bootmain(int bootdev)
 	u_int sram_memsize;
 	u_int probed_memsize;
 
+	console_device = consio_init(console_device);
+
 	hostadaptor = get_scsi_host_adapter();
 	rtc_offset = RTC_OFFSET;
 	try_bootp = 1;
@@ -402,7 +404,6 @@ bootmain(int bootdev)
 		exit(1);
 	}
 
-	console_device = consio_init(console_device);
 	setheap(HEAP_START, HEAP_END);
 
 #if !defined(NETBOOT)



CVS commit: src/sys/arch/x68k/stand/boot

2019-01-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan  2 00:48:13 UTC 2019

Modified Files:
src/sys/arch/x68k/stand/boot: Makefile

Log Message:
use the right version of ELF2AOUT


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x68k/stand/boot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/Makefile
diff -u src/sys/arch/x68k/stand/boot/Makefile:1.29 src/sys/arch/x68k/stand/boot/Makefile:1.30
--- src/sys/arch/x68k/stand/boot/Makefile:1.29	Mon Dec 31 14:25:46 2018
+++ src/sys/arch/x68k/stand/boot/Makefile	Tue Jan  1 19:48:13 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.29 2018/12/31 19:25:46 christos Exp $
+#	$NetBSD: Makefile,v 1.30 2019/01/02 00:48:13 christos Exp $
 
 NOMAN=		# defined
 
@@ -55,7 +55,7 @@ ${PROG}:	${OBJS} ${LDLIBS}
 	${_MKTARGET_LINK}
 	${LD} ${LINKFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS}
 	${STRIP} ${PROG}.sym -o ${PROG}.strip
-	${ELF2AOUT} ${PROG}.strip ${PROG}
+	${M68K_ELF2AOUT} ${PROG}.strip ${PROG}
 
 CLEANFILES+=	${PROG}.sym ${PROG}.strip
 



CVS commit: src/sys/arch/x68k/stand/boot

2018-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec 31 19:25:46 UTC 2018

Modified Files:
src/sys/arch/x68k/stand/boot: Makefile boot.ldscript

Log Message:
use elf2aout for boot.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/x68k/stand/boot/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/stand/boot/boot.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/Makefile
diff -u src/sys/arch/x68k/stand/boot/Makefile:1.28 src/sys/arch/x68k/stand/boot/Makefile:1.29
--- src/sys/arch/x68k/stand/boot/Makefile:1.28	Sat Apr  8 15:53:23 2017
+++ src/sys/arch/x68k/stand/boot/Makefile	Mon Dec 31 14:25:46 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.28 2017/04/08 19:53:23 christos Exp $
+#	$NetBSD: Makefile,v 1.29 2018/12/31 19:25:46 christos Exp $
 
 NOMAN=		# defined
 
@@ -21,8 +21,6 @@ BINDIR=		/usr/mdec
 BINMODE=	444
 STRIPFLAG=
 
-BFDNAME=	a.out-m68k-netbsd
-
 SRCS=		srt0.S boot.c conf.c switch.c exec_image.S
 SRCS+=		if_ne.c ne.c dp8390.c
 S=		${.CURDIR}/../../../..
@@ -56,8 +54,9 @@ realall: ${PROG}
 ${PROG}:	${OBJS} ${LDLIBS}
 	${_MKTARGET_LINK}
 	${LD} ${LINKFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS}
-	${STRIP} -F ${BFDNAME} -o ${PROG} ${PROG}.sym
+	${STRIP} ${PROG}.sym -o ${PROG}.strip
+	${ELF2AOUT} ${PROG}.strip ${PROG}
 
-CLEANFILES+=	${PROG}.sym
+CLEANFILES+=	${PROG}.sym ${PROG}.strip
 
 .include 

Index: src/sys/arch/x68k/stand/boot/boot.ldscript
diff -u src/sys/arch/x68k/stand/boot/boot.ldscript:1.6 src/sys/arch/x68k/stand/boot/boot.ldscript:1.7
--- src/sys/arch/x68k/stand/boot/boot.ldscript:1.6	Sun Mar  2 01:16:27 2014
+++ src/sys/arch/x68k/stand/boot/boot.ldscript	Mon Dec 31 14:25:46 2018
@@ -1,6 +1,8 @@
 /* /boot must be a.out, OMAGIC starting from 0x6000. */
+/* ... but new binutils don't support a.out anymore... 
 OUTPUT_FORMAT("a.out-m68k-netbsd", "a.out-m68k-netbsd",
-	  "a.out-m68k-netbsd")
+ 	  "a.out-m68k-netbsd")
+*/
 OUTPUT_ARCH(m68k)
 ENTRY(start)
 SEARCH_DIR(/usr/lib);



CVS commit: src/sys/arch/x68k/stand/boot

2016-08-04 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Aug  4 12:15:08 UTC 2016

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
gets -> kgets. the last part of PR/51200.
It was using libsa's gets, so it's possible to change to kgets
as rev 1.23.  I've confirmed that it works.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.29 src/sys/arch/x68k/stand/boot/boot.c:1.30
--- src/sys/arch/x68k/stand/boot/boot.c:1.29	Sun Jun 26 04:17:17 2016
+++ src/sys/arch/x68k/stand/boot/boot.c	Thu Aug  4 12:15:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.29 2016/06/26 04:17:17 isaki Exp $	*/
+/*	$NetBSD: boot.c,v 1.30 2016/08/04 12:15:07 isaki Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -333,7 +333,7 @@ bootmenu(void)
 		char *p, *options;
 
 		printf("> ");
-		gets(input);
+		kgets(input, sizeof(input));
 
 		for (p = [0]; p - [0] < 80 && *p == ' '; p++)
 			;



CVS commit: src/sys/arch/x68k/stand/boot

2016-06-25 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Jun 25 16:05:43 UTC 2016

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
Fix my mistake of previous commit.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.27 src/sys/arch/x68k/stand/boot/boot.c:1.28
--- src/sys/arch/x68k/stand/boot/boot.c:1.27	Sat Jun 25 14:35:58 2016
+++ src/sys/arch/x68k/stand/boot/boot.c	Sat Jun 25 16:05:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.27 2016/06/25 14:35:58 isaki Exp $	*/
+/*	$NetBSD: boot.c,v 1.28 2016/06/25 16:05:43 isaki Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -157,15 +157,15 @@ doboot(const char *file, int flags)
 	printf("boot device = %x\n", bootdev);
 	if (file[0] == 'n') {
 		printf("if = %d, unit = %d\n",
-		   B_X68K_SCSI_IF(dev),
-		   B_X68K_SCSI_IF_UN(dev));
+		   B_X68K_SCSI_IF(bootdev),
+		   B_X68K_SCSI_IF_UN(bootdev));
 	} else {
 		printf("if = %d, unit = %d, id = %d, lun = %d, part = %c\n",
-		   B_X68K_SCSI_IF(dev),
-		   B_X68K_SCSI_IF_UN(dev),
-		   B_X68K_SCSI_ID(dev),
-		   B_X68K_SCSI_LUN(dev),
-		   B_X68K_SCSI_PART(dev) + 'a');
+		   B_X68K_SCSI_IF(bootdev),
+		   B_X68K_SCSI_IF_UN(bootdev),
+		   B_X68K_SCSI_ID(bootdev),
+		   B_X68K_SCSI_LUN(bootdev),
+		   B_X68K_SCSI_PART(bootdev) + 'a');
 	}
 #endif
 



CVS commit: src/sys/arch/x68k/stand/boot

2016-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Jun 19 09:42:28 UTC 2016

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
Display debug messages before loading the kernel.
It makes easy to read.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.25 src/sys/arch/x68k/stand/boot/boot.c:1.26
--- src/sys/arch/x68k/stand/boot/boot.c:1.25	Sun Jun 19 09:23:16 2016
+++ src/sys/arch/x68k/stand/boot/boot.c	Sun Jun 19 09:42:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.25 2016/06/19 09:23:16 isaki Exp $	*/
+/*	$NetBSD: boot.c,v 1.26 2016/06/19 09:42:28 isaki Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -142,17 +142,6 @@ doboot(const char *file, int flags)
 
 	printf("Starting %s, flags 0x%x\n", file, flags);
 
-	loadflag = LOAD_KERNEL;
-	if (file[0] == 'f')
-		loadflag &= ~LOAD_BACKWARDS;
-		
-	marks[MARK_START] = 0x10;
-	if ((fd = loadfile(file, marks, loadflag)) == -1) {
-		printf("loadfile failed\n");
-		return;
-	}
-	close(fd);
-
 	if (devparse(file, , , , ) != 0) {
 		printf("XXX: unknown corruption in /boot.\n");
 	}
@@ -195,6 +184,17 @@ doboot(const char *file, int flags)
 #endif
 #endif
 
+	loadflag = LOAD_KERNEL;
+	if (file[0] == 'f')
+		loadflag &= ~LOAD_BACKWARDS;
+
+	marks[MARK_START] = 0x10;
+	if ((fd = loadfile(file, marks, loadflag)) == -1) {
+		printf("loadfile failed\n");
+		return;
+	}
+	close(fd);
+
 	p = ((short*) marks[MARK_ENTRY]) - 1;
 #ifdef DEBUG
 	printf("Kernel Version: 0x%x\n", *p);



CVS commit: src/sys/arch/x68k/stand/boot

2016-06-19 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Jun 19 09:23:16 UTC 2016

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
Split variable.
'dev' is the device number in devspec[] and
'bootdev' is the boot device parameter made from 'dev'.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.24 src/sys/arch/x68k/stand/boot/boot.c:1.25
--- src/sys/arch/x68k/stand/boot/boot.c:1.24	Sat Jun 11 06:57:46 2016
+++ src/sys/arch/x68k/stand/boot/boot.c	Sun Jun 19 09:23:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.24 2016/06/11 06:57:46 dholland Exp $	*/
+/*	$NetBSD: boot.c,v 1.25 2016/06/19 09:23:16 isaki Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -132,7 +132,10 @@ doboot(const char *file, int flags)
 {
 	u_long		marks[MARK_MAX];
 	int fd;
-	int dev, unit, part;
+	int dev;	/* device number in devspec[] */
+	int unit;
+	int part;
+	int bootdev;
 	char *name;
 	short *p;
 	int loadflag;
@@ -166,29 +169,29 @@ doboot(const char *file, int flags)
 
 #ifndef NETBOOT
 	if (dev == 0) {		/* SCSI */
-		dev = X68K_MAKESCSIBOOTDEV(X68K_MAJOR_SD,
+		bootdev = X68K_MAKESCSIBOOTDEV(X68K_MAJOR_SD,
 	   hostadaptor >> 4,
 	   hostadaptor & 15,
 	   unit & 7, 0, 0);
 	} else {
-		dev = X68K_MAKEBOOTDEV(X68K_MAJOR_FD, unit & 3, 0);
+		bootdev = X68K_MAKEBOOTDEV(X68K_MAJOR_FD, unit & 3, 0);
 	}
 #else
-	dev = X68K_MAKEBOOTDEV(X68K_MAJOR_NE, unit, 0);
+	bootdev = X68K_MAKEBOOTDEV(X68K_MAJOR_NE, unit, 0);
 #endif
 #ifdef DEBUG
-	printf("boot device = %x\n", dev);
+	printf("boot device = %x\n", bootdev);
 #ifndef NETBOOT
 	printf("if = %d, unit = %d, id = %d, lun = %d, part = %c\n",
-	   B_X68K_SCSI_IF(dev),
-	   B_X68K_SCSI_IF_UN(dev),
-	   B_X68K_SCSI_ID(dev),
-	   B_X68K_SCSI_LUN(dev),
-	   B_X68K_SCSI_PART(dev) + 'a');
+	   B_X68K_SCSI_IF(bootdev),
+	   B_X68K_SCSI_IF_UN(bootdev),
+	   B_X68K_SCSI_ID(bootdev),
+	   B_X68K_SCSI_LUN(bootdev),
+	   B_X68K_SCSI_PART(bootdev) + 'a');
 #else
 	printf("if = %d, unit = %d\n",
-	   B_X68K_SCSI_IF(dev),
-	   B_X68K_SCSI_IF_UN(dev));
+	   B_X68K_SCSI_IF(bootdev),
+	   B_X68K_SCSI_IF_UN(bootdev));
 #endif
 #endif
 
@@ -207,7 +210,7 @@ doboot(const char *file, int flags)
 	}
 
 	exec_image(marks[MARK_START], 0, marks[MARK_ENTRY]-marks[MARK_START],
-		   marks[MARK_END]-marks[MARK_START], dev, flags);
+		   marks[MARK_END]-marks[MARK_START], bootdev, flags);
 
 	return;
 }



CVS commit: src/sys/arch/x68k/stand/boot

2016-06-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jun 11 06:57:46 UTC 2016

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
Revert this one; I can't tell for sure if it's using libsa gets or its
own firmware one in ../libdos. If the latter, switching and bringing
in the libsa one (a) might not work and (b) might make the bootloader
overflow size limits.

PR 51200.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.23 src/sys/arch/x68k/stand/boot/boot.c:1.24
--- src/sys/arch/x68k/stand/boot/boot.c:1.23	Sat Jun 11 06:50:21 2016
+++ src/sys/arch/x68k/stand/boot/boot.c	Sat Jun 11 06:57:46 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.23 2016/06/11 06:50:21 dholland Exp $	*/
+/*	$NetBSD: boot.c,v 1.24 2016/06/11 06:57:46 dholland Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -307,7 +307,7 @@ bootmenu(void)
 		char *p, *options;
 
 		printf("> ");
-		kgets(input, sizeof(input));
+		gets(input);
 
 		for (p = [0]; p - [0] < 80 && *p == ' '; p++)
 			;



CVS commit: src/sys/arch/x68k/stand/boot

2016-06-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jun 11 06:50:21 UTC 2016

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
PR 51200 gets in libsa considered harmful: use kgets


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.22 src/sys/arch/x68k/stand/boot/boot.c:1.23
--- src/sys/arch/x68k/stand/boot/boot.c:1.22	Tue Aug  5 13:49:04 2014
+++ src/sys/arch/x68k/stand/boot/boot.c	Sat Jun 11 06:50:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.22 2014/08/05 13:49:04 isaki Exp $	*/
+/*	$NetBSD: boot.c,v 1.23 2016/06/11 06:50:21 dholland Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -307,7 +307,7 @@ bootmenu(void)
 		char *p, *options;
 
 		printf("> ");
-		gets(input);
+		kgets(input, sizeof(input));
 
 		for (p = [0]; p - [0] < 80 && *p == ' '; p++)
 			;



CVS commit: src/sys/arch/x68k/stand/boot

2014-07-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  6 08:10:21 UTC 2014

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
Probe the actual memory size and warn if it's different from SRAM value.

Without this, ancient X680x0 machines with a dead SRAM battery will
fail to boot silently (or hang right after early copyright messages).

Discussed with and reviewed by isaki@.

XXX: probably we should rather pass the probed memory size to a kernel
XXX: than the size value stored in SRAM..


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.20 src/sys/arch/x68k/stand/boot/boot.c:1.21
--- src/sys/arch/x68k/stand/boot/boot.c:1.20	Sun Jul  6 06:28:49 2014
+++ src/sys/arch/x68k/stand/boot/boot.c	Sun Jul  6 08:10:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.20 2014/07/06 06:28:49 tsutsui Exp $	*/
+/*	$NetBSD: boot.c,v 1.21 2014/07/06 08:10:21 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -327,6 +327,23 @@ bootmenu(void)
 	}
 }
 
+static u_int
+checkmemsize(void)
+{
+	u_int m;
+
+#define MIN_MB 4
+#define MAX_MB 12
+
+	for (m = MIN_MB; m = MAX_MB; m++) {
+		if (badbaddr((void *)(m * 1024 * 1024 - 1))) {
+			/* no memory */
+			break;
+		}
+	}
+
+	return (m - 1) * 1024 * 1024;
+}
 
 extern const char bootprog_rev[];
 extern const char bootprog_name[];
@@ -339,6 +356,8 @@ extern const char bootprog_name[];
 void
 bootmain(int bootdev)
 {
+	u_int sram_memsize;
+	u_int probed_memsize;
 
 #ifndef NETBOOT
 	hostadaptor = get_scsi_host_adapter();
@@ -352,7 +371,8 @@ bootmain(int bootdev)
 		printf(This MPU cannot run NetBSD.\n);
 		exit(1);
 	}
-	if (SRAM_MEMSIZE  4*1024*1024) {
+	sram_memsize = SRAM_MEMSIZE;
+	if (sram_memsize  4*1024*1024) {
 		printf(Main memory too small.\n);
 		exit(1);
 	}
@@ -383,5 +403,16 @@ bootmain(int bootdev)
 	}
 #endif
 	print_title(%s, Revision %s\n, bootprog_name, bootprog_rev);
+
+	/* check actual memory size for machines with a dead SRAM battery */
+	probed_memsize = checkmemsize();
+	if (sram_memsize != probed_memsize) {
+		printf(\x1b[1mWarning: SRAM Memory Size (%d MB) 
+		is different from probed Memory Size (%d MB)\n
+		 Check and reset SRAM values.\x1b[m\n\n,
+		sram_memsize / (1024 * 1024),
+		probed_memsize / (1024 * 1024));
+	}
+
 	bootmenu();
 }



CVS commit: src/sys/arch/x68k/stand/boot

2014-03-01 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Mar  2 06:16:27 UTC 2014

Modified Files:
src/sys/arch/x68k/stand/boot: boot.ldscript

Log Message:
Discard .SUNW_ctf section just in case.
patch from martin@, see PR/48623.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/stand/boot/boot.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.ldscript
diff -u src/sys/arch/x68k/stand/boot/boot.ldscript:1.5 src/sys/arch/x68k/stand/boot/boot.ldscript:1.6
--- src/sys/arch/x68k/stand/boot/boot.ldscript:1.5	Mon Aug 12 16:32:39 2013
+++ src/sys/arch/x68k/stand/boot/boot.ldscript	Sun Mar  2 06:16:27 2014
@@ -63,5 +63,6 @@ SECTIONS
   *(.debug_str)
   *(.debug_frame)
   *(.eh_frame)
+  *(.SUNW_ctf)
   }
 }



CVS commit: src/sys/arch/x68k/stand/boot

2013-08-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Aug 12 16:32:40 UTC 2013

Modified Files:
src/sys/arch/x68k/stand/boot: boot.ldscript

Log Message:
Discard ELF unwind sections for the boot loader.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/boot/boot.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.ldscript
diff -u src/sys/arch/x68k/stand/boot/boot.ldscript:1.4 src/sys/arch/x68k/stand/boot/boot.ldscript:1.5
--- src/sys/arch/x68k/stand/boot/boot.ldscript:1.4	Fri May 24 15:59:57 2013
+++ src/sys/arch/x68k/stand/boot/boot.ldscript	Mon Aug 12 16:32:39 2013
@@ -62,5 +62,6 @@ SECTIONS
   *(.debug_ranges)
   *(.debug_str)
   *(.debug_frame)
+  *(.eh_frame)
   }
 }



CVS commit: src/sys/arch/x68k/stand/boot

2013-05-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 24 15:59:57 UTC 2013

Modified Files:
src/sys/arch/x68k/stand/boot: boot.ldscript

Log Message:
discard debug sections that are not representable in the a.out object format.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/boot/boot.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.ldscript
diff -u src/sys/arch/x68k/stand/boot/boot.ldscript:1.3 src/sys/arch/x68k/stand/boot/boot.ldscript:1.4
--- src/sys/arch/x68k/stand/boot/boot.ldscript:1.3	Tue Mar 20 08:37:34 2012
+++ src/sys/arch/x68k/stand/boot/boot.ldscript	Fri May 24 11:59:57 2013
@@ -47,5 +47,20 @@ SECTIONS
end = ALIGN(4) ;
_end = ALIGN(4) ;
   }
-  /DISCARD/ : { *(.ident) *(.stab) *(.stabstr) *(.comment) }
+  /DISCARD/ : {
+  *(.ident)
+  *(.stab)
+  *(.stabstr)
+  *(.comment)
+  *(.debug_abbrev)
+  *(.debug_info)
+  *(.debug_line)
+  *(.debug_loc)
+  *(.debug_pubnames)
+  *(.debug_pubtypes)
+  *(.debug_aranges)
+  *(.debug_ranges)
+  *(.debug_str)
+  *(.debug_frame)
+  }
 }



CVS commit: src/sys/arch/x68k/stand/boot

2012-10-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Oct 12 18:06:27 UTC 2012

Modified Files:
src/sys/arch/x68k/stand/boot: version

Log Message:
Bump version to denote check_getchar() bug fix.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/stand/boot/version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/version
diff -u src/sys/arch/x68k/stand/boot/version:1.5 src/sys/arch/x68k/stand/boot/version:1.6
--- src/sys/arch/x68k/stand/boot/version:1.5	Tue Mar 20 12:38:33 2012
+++ src/sys/arch/x68k/stand/boot/version	Fri Oct 12 18:06:27 2012
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.5 2012/03/20 12:38:33 minoura Exp $
+$NetBSD: version,v 1.6 2012/10/12 18:06:27 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
@@ -10,3 +10,5 @@ is taken as the current.
 1.2:	Fix serial console output.
 1.3:	Avoid exception on 68060 in UFS ops.
 1.4:	ffsv2 support.
+1.5:	Make key interrupt to get boot menu works properly even after
+	non ASCII keys (CTRL, OPT.1 etc.) are pressed during boot.



CVS commit: src/sys/arch/x68k/stand/boot

2012-03-20 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Mar 20 12:37:01 UTC 2012

Modified Files:
src/sys/arch/x68k/stand/boot: Makefile boot.c

Log Message:
Be silent.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x68k/stand/boot/Makefile
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/Makefile
diff -u src/sys/arch/x68k/stand/boot/Makefile:1.21 src/sys/arch/x68k/stand/boot/Makefile:1.22
--- src/sys/arch/x68k/stand/boot/Makefile:1.21	Sun Dec 25 06:09:09 2011
+++ src/sys/arch/x68k/stand/boot/Makefile	Tue Mar 20 12:37:01 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2011/12/25 06:09:09 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.22 2012/03/20 12:37:01 minoura Exp $
 
 NOMAN=		# defined
 
@@ -32,7 +32,7 @@ SRCS+=		vers.c
 CLEANFILES+=	vers.c
 vers.c:	${VERSIONFILE}
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == yes :?:-D} \
+	${HOST_SH} ${S}/conf/newvers_stand.sh \
 	${.ALLSRC} ${MACHINE} ${NEWVERSWHAT}
 
 CPPFLAGS+=	-nostdinc -I$S -I${.OBJDIR} -I$M/stand/libsa

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.17 src/sys/arch/x68k/stand/boot/boot.c:1.18
--- src/sys/arch/x68k/stand/boot/boot.c:1.17	Sun Dec 25 06:09:09 2011
+++ src/sys/arch/x68k/stand/boot/boot.c	Tue Mar 20 12:37:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.17 2011/12/25 06:09:09 tsutsui Exp $	*/
+/*	$NetBSD: boot.c,v 1.18 2012/03/20 12:37:01 minoura Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -124,8 +124,10 @@ doboot(const char *file, int flags)
 		printf(XXX: unknown corruption in /boot.\n);
 	}
 
+#ifdef DEBUG
 	printf(dev = %x, unit = %d, part = %c, name = %s\n,
 	   dev, unit, part + 'a', name);
+#endif
 
 	if (dev == 0) {		/* SCSI */
 		dev = X68K_MAKESCSIBOOTDEV(X68K_MAJOR_SD,
@@ -135,6 +137,7 @@ doboot(const char *file, int flags)
 	} else {
 		dev = X68K_MAKEBOOTDEV(X68K_MAJOR_FD, unit  3, 0);
 	}
+#ifdef DEBUG
 	printf(boot device = %x\n, dev);
 	printf(if = %d, unit = %d, id = %d, lun = %d, part = %c\n,
 	   B_X68K_SCSI_IF(dev),
@@ -142,9 +145,12 @@ doboot(const char *file, int flags)
 	   B_X68K_SCSI_ID(dev),
 	   B_X68K_SCSI_LUN(dev),
 	   B_X68K_SCSI_PART(dev) + 'a');
+#endif
 
 	p = ((short*) marks[MARK_ENTRY]) - 1;
+#ifdef DEBUG
 	printf(Kernel Version: 0x%x\n, *p);
+#endif
 	if (*p != 0x4e73  *p != 0) {
 		/*
 		 * XXX temporary solution; compatibility loader



CVS commit: src/sys/arch/x68k/stand/boot

2012-03-20 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Mar 20 12:37:35 UTC 2012

Modified Files:
src/sys/arch/x68k/stand/boot: boot.ldscript

Log Message:
Comment fix.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/boot/boot.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.ldscript
diff -u src/sys/arch/x68k/stand/boot/boot.ldscript:1.2 src/sys/arch/x68k/stand/boot/boot.ldscript:1.3
--- src/sys/arch/x68k/stand/boot/boot.ldscript:1.2	Thu Oct 30 22:21:56 2003
+++ src/sys/arch/x68k/stand/boot/boot.ldscript	Tue Mar 20 12:37:34 2012
@@ -1,4 +1,4 @@
-/* /boot must be a.out, OMAGIC starting from 0x8000. */
+/* /boot must be a.out, OMAGIC starting from 0x6000. */
 OUTPUT_FORMAT(a.out-m68k-netbsd, a.out-m68k-netbsd,
 	  a.out-m68k-netbsd)
 OUTPUT_ARCH(m68k)



CVS commit: src/sys/arch/x68k/stand/boot

2012-03-20 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Mar 20 12:38:33 UTC 2012

Modified Files:
src/sys/arch/x68k/stand/boot: conf.c version

Log Message:
Add FFSv2 support.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/stand/boot/conf.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/boot/version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/conf.c
diff -u src/sys/arch/x68k/stand/boot/conf.c:1.8 src/sys/arch/x68k/stand/boot/conf.c:1.9
--- src/sys/arch/x68k/stand/boot/conf.c:1.8	Sun Dec 11 12:19:44 2005
+++ src/sys/arch/x68k/stand/boot/conf.c	Tue Mar 20 12:38:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.c,v 1.8 2005/12/11 12:19:44 christos Exp $	*/
+/*	$NetBSD: conf.c,v 1.9 2012/03/20 12:38:33 minoura Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -52,7 +52,8 @@ const struct devspec devspec[] = {
 };
 
 struct fs_ops file_system[] = {
-	FS_OPS(ufs),
+	FS_OPS(ffsv1),
+	FS_OPS(ffsv2),
 	FS_OPS(lfsv1),
 	FS_OPS(lfsv2),
 	FS_OPS(cd9660),

Index: src/sys/arch/x68k/stand/boot/version
diff -u src/sys/arch/x68k/stand/boot/version:1.4 src/sys/arch/x68k/stand/boot/version:1.5
--- src/sys/arch/x68k/stand/boot/version:1.4	Thu Oct 13 11:35:37 2011
+++ src/sys/arch/x68k/stand/boot/version	Tue Mar 20 12:38:33 2012
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.4 2011/10/13 11:35:37 tsutsui Exp $
+$NetBSD: version,v 1.5 2012/03/20 12:38:33 minoura 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
@@ -9,3 +9,4 @@ is taken as the current.
 1.1:	loadfile() update to avoid backwards seeks for ELF Program Headers.
 1.2:	Fix serial console output.
 1.3:	Avoid exception on 68060 in UFS ops.
+1.4:	ffsv2 support.



CVS commit: src/sys/arch/x68k/stand/boot

2011-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 13 11:35:37 UTC 2011

Modified Files:
src/sys/arch/x68k/stand/boot: version

Log Message:
Bump version to denote 060turbo boot fix.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/boot/version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/version
diff -u src/sys/arch/x68k/stand/boot/version:1.3 src/sys/arch/x68k/stand/boot/version:1.4
--- src/sys/arch/x68k/stand/boot/version:1.3	Mon Apr 11 13:49:41 2011
+++ src/sys/arch/x68k/stand/boot/version	Thu Oct 13 11:35:37 2011
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.3 2011/04/11 13:49:41 tsutsui Exp $
+$NetBSD: version,v 1.4 2011/10/13 11:35:37 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
@@ -8,3 +8,4 @@ is taken as the current.
 1.0:	Initial version of the libsa-based bootstrap loader.
 1.1:	loadfile() update to avoid backwards seeks for ELF Program Headers.
 1.2:	Fix serial console output.
+1.3:	Avoid exception on 68060 in UFS ops.



CVS commit: src/sys/arch/x68k/stand/boot

2011-04-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Apr 11 13:49:41 UTC 2011

Modified Files:
src/sys/arch/x68k/stand/boot: version

Log Message:
Bump version to denote serial console fix.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/boot/version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/version
diff -u src/sys/arch/x68k/stand/boot/version:1.2 src/sys/arch/x68k/stand/boot/version:1.3
--- src/sys/arch/x68k/stand/boot/version:1.2	Fri Nov  9 19:53:16 2001
+++ src/sys/arch/x68k/stand/boot/version	Mon Apr 11 13:49:41 2011
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.2 2001/11/09 19:53:16 scw Exp $
+$NetBSD: version,v 1.3 2011/04/11 13:49:41 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
@@ -7,3 +7,4 @@
 0.3:	xxboot, ancient monolithic bootstrap program.
 1.0:	Initial version of the libsa-based bootstrap loader.
 1.1:	loadfile() update to avoid backwards seeks for ELF Program Headers.
+1.2:	Fix serial console output.



CVS commit: src/sys/arch/x68k/stand/boot

2010-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 25 16:37:02 UTC 2010

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
s/LOAD_NOTE/LOAD_BACKWARDS/


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x68k/stand/boot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.14 src/sys/arch/x68k/stand/boot/boot.c:1.15
--- src/sys/arch/x68k/stand/boot/boot.c:1.14	Sat Jan 31 09:22:21 2009
+++ src/sys/arch/x68k/stand/boot/boot.c	Wed Aug 25 12:37:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.14 2009/01/31 14:22:21 tsutsui Exp $	*/
+/*	$NetBSD: boot.c,v 1.15 2010/08/25 16:37:02 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -111,7 +111,7 @@
 
 	loadflag = LOAD_KERNEL;
 	if (file[0] == 'f')
-		loadflag = ~LOAD_NOTE;
+		loadflag = ~LOAD_BACKWARDS;
 		
 	marks[MARK_START] = 0x10;
 	if ((fd = loadfile(file, marks, loadflag)) == -1) {