Module Name:    src
Committed By:   tsutsui
Date:           Mon Nov 24 08:08:23 UTC 2014

Modified Files:
        src/distrib/atari/floppies/common: list.images
        src/sys/arch/atari/stand/installboot: Makefile installboot.c

Log Message:
Disable "OS bootversion check" on crunched binaries for installation media.

This oscheck() function seems implemented to check compatibility
between bootloaders and /netbsd kernel, but checking /netbsd using kvm(3)
doesn't make sense on installation or even future cross builds, and
probably we will never bump bootloader version without compatibility
per recent 14 years history.

This works around overflow of 1440KB 2HD sysinst.fs, and would also be
worth to pullup to netbsd-7.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/distrib/atari/floppies/common/list.images
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/installboot/Makefile
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/atari/stand/installboot/installboot.c

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

Modified files:

Index: src/distrib/atari/floppies/common/list.images
diff -u src/distrib/atari/floppies/common/list.images:1.9 src/distrib/atari/floppies/common/list.images:1.10
--- src/distrib/atari/floppies/common/list.images:1.9	Sun Feb 21 20:18:08 2010
+++ src/distrib/atari/floppies/common/list.images	Mon Nov 24 08:08:23 2014
@@ -1,7 +1,7 @@
-#	$NetBSD: list.images,v 1.9 2010/02/21 20:18:08 tsutsui Exp $
+#	$NetBSD: list.images,v 1.10 2014/11/24 08:08:23 tsutsui Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin gnu/usr.bin sys/arch/atari/stand
-LIBS	libhack.o -lprop -lrmt -lz -lutil -lcurses -lterminfo -lkvm -ll -lm
+LIBS	libhack.o -lprop -lrmt -lz -lutil -lcurses -lterminfo -ll -lm
 
 # init invokes the shell as -sh
 ARGVLN	sh -sh

Index: src/sys/arch/atari/stand/installboot/Makefile
diff -u src/sys/arch/atari/stand/installboot/Makefile:1.7 src/sys/arch/atari/stand/installboot/Makefile:1.8
--- src/sys/arch/atari/stand/installboot/Makefile:1.7	Mon Nov 24 07:52:04 2014
+++ src/sys/arch/atari/stand/installboot/Makefile	Mon Nov 24 08:08:23 2014
@@ -1,11 +1,14 @@
-#	$NetBSD: Makefile,v 1.7 2014/11/24 07:52:04 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.8 2014/11/24 08:08:23 tsutsui Exp $
 
 WARNS=	4
 PROG=	installboot
 NOMAN=	# defined
 SRCS=	installboot.c disklabel.c
 BINDIR=	/usr/mdec
+.ifndef SMALLPROG
+CPPFLAGS+=	-DCHECK_OS_BOOTVERSION
 LDADD=	-lkvm
+.endif
 
 # XXX needs proper struct or union to calculate boot sector uint16_t cksums
 CFLAGS+=	-fno-strict-aliasing

Index: src/sys/arch/atari/stand/installboot/installboot.c
diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.33 src/sys/arch/atari/stand/installboot/installboot.c:1.34
--- src/sys/arch/atari/stand/installboot/installboot.c:1.33	Mon Nov 24 07:34:45 2014
+++ src/sys/arch/atari/stand/installboot/installboot.c	Mon Nov 24 08:08:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.33 2014/11/24 07:34:45 tsutsui Exp $	*/
+/*	$NetBSD: installboot.c,v 1.34 2014/11/24 08:08:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens
@@ -54,7 +54,9 @@
 #include "installboot.h"
 
 static void	usage(void);
+#ifdef CHECK_OS_BOOTVERSION
 static void	oscheck(void);
+#endif
 static u_int	abcksum(void *);
 static void	setNVpref(void);
 static void	setIDEpar(u_int8_t *, size_t);
@@ -99,8 +101,10 @@ main(int argc, char *argv[])
 	char		 *devchr;
 	int		 fd, c;
 
+#ifdef CHECK_OS_BOOTVERSION
 	/* check OS bootversion */
 	oscheck();
+#endif
 
 	/* parse options */
 	while ((c = getopt(argc, argv, "Nmt:u:v")) != -1) {
@@ -177,6 +181,7 @@ main(int argc, char *argv[])
 	return(EXIT_SUCCESS);
 }
 
+#ifdef CHECK_OS_BOOTVERSION
 static void
 oscheck(void)
 {
@@ -208,6 +213,7 @@ oscheck(void)
 		errx(EXIT_FAILURE, "Kern bootversion: %d, expected: %d",
 		    kvers, BOOTVERSION);
 }
+#endif
 
 static void
 install_fd(char *devnm, struct disklabel *label)

Reply via email to