Module Name:    src
Committed By:   martin
Date:           Mon Sep 10 15:52:36 UTC 2018

Modified Files:
        src/distrib/sgimips/instkernel [netbsd-8]: Makefile
        src/sys/arch/sgimips/conf [netbsd-8]: INSTALL32_IP2x
        src/sys/arch/sgimips/hpc [netbsd-8]: wdsc.c
        src/sys/arch/sgimips/sgimips [netbsd-8]: machdep.c
        src/sys/arch/sgimips/stand/boot [netbsd-8]: Makefile

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1017):

        sys/arch/sgimips/conf/INSTALL32_IP2x: revision 1.10
        sys/arch/sgimips/stand/boot/Makefile: revision 1.20
        sys/arch/sgimips/sgimips/machdep.c: revision 1.146
        sys/arch/sgimips/hpc/wdsc.c: revision 1.35
        distrib/sgimips/instkernel/Makefile: revision 1.13

Disable misc options to shrink an INSTALL kernel for IP2x.

The ARC BIOS on Indy seems to have ~8MB limit.

Fixes PR port-sgimips/53378 from Naruaki Etomi.
Should be pulled up to netbsd-7 and netbsd-8.

 -

Fix build failure without options DDB and with pseudo-device ksyms.
There is a typo for ksyms (NKSYMS vs NKSYM).

Also use consistent "#if NKSYMS" rather than "#if NKSYMS > 0" etc.
and add comments after corresponding #endif for readability.

Fixes PR port-sgimips/53521 from Naruaki Etomi.
Should be pulled up to (at least) netbsd-8.

 -

Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for old machines.
objcopy(1) was used instead of elf2ecoff(1) since Makefile rev 1.9:
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sgimips/stand/boot/Makefile#rev1.9
but it looks ELF binaries generated by recent binutils are too complicated
to convert them to ecoff for old machines by objcopy(1).

Reported by Naruaki Etomi in PR port-sgimips/53519.
Should be pulled up to at least netbsd-8.

 -

Fix wdsc(4) probe failure on HPC1.5 machines (Indigo R3k/R4k, IP6/IP10/IP12).

The alignment adjustment code was removed in rev 1.36 for common
mips bus_space changes, but the code was not bus_space related
but used for uint32_t register acccess during probe.

Reported and tested by Naruaki Etomi in PR port-sgimips/53522.
Should be pulled up to netbsd-8.

 -

Use elf2ecoff(1) rather than objcopy(1) to generate ecoff kernel.

Reported by Naruaki Etomi in PR port-sgimips/53518.

Should be pulled up to netbsd-7 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.8.1 src/distrib/sgimips/instkernel/Makefile
cvs rdiff -u -r1.9 -r1.9.40.1 src/sys/arch/sgimips/conf/INSTALL32_IP2x
cvs rdiff -u -r1.34 -r1.34.10.1 src/sys/arch/sgimips/hpc/wdsc.c
cvs rdiff -u -r1.144 -r1.144.6.1 src/sys/arch/sgimips/sgimips/machdep.c
cvs rdiff -u -r1.19 -r1.19.48.1 src/sys/arch/sgimips/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/distrib/sgimips/instkernel/Makefile
diff -u src/distrib/sgimips/instkernel/Makefile:1.12 src/distrib/sgimips/instkernel/Makefile:1.12.8.1
--- src/distrib/sgimips/instkernel/Makefile:1.12	Wed Mar 23 05:24:11 2016
+++ src/distrib/sgimips/instkernel/Makefile	Mon Sep 10 15:52:36 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2016/03/23 05:24:11 mrg Exp $
+#	$NetBSD: Makefile,v 1.12.8.1 2018/09/10 15:52:36 martin Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -30,9 +30,7 @@ MDSETTARGETS=	INSTALL${NX}_IP2x ${RAMDIS
 MDSET_RELEASEDIR=	binary/kernel
 
 MDSET_SUFFIXES.netbsd-INSTALL${NX}_IP2x=ecoff create-ecoff
-create-ecoff=	${OBJCOPY} --impure -O ecoff-bigmips \
-		-R .pdr -R .mdebug.abi32 -R .comment -R .ident \
-		${.TARGET:R} ${.TARGET}
+create-ecoff=	${ELF2ECOFF} ${.TARGET:R} ${.TARGET}
 
 IMAGE_RELEASEDIR=	installation/diskimage
 

Index: src/sys/arch/sgimips/conf/INSTALL32_IP2x
diff -u src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9 src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9.40.1
--- src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9	Sat Feb  4 22:27:26 2012
+++ src/sys/arch/sgimips/conf/INSTALL32_IP2x	Mon Sep 10 15:52:36 2018
@@ -5,7 +5,7 @@
 # Pull in standard `install' config
 include 	"arch/sgimips/conf/GENERIC32_IP2x"
 
-makeoptions	COPTS="-Os"
+makeoptions	COPTS="-Os -mmemcpy"
 
 # Enable the hooks used for initializing the root memory-disk.
 options         MEMORY_DISK_HOOKS
@@ -13,3 +13,60 @@ options         MEMORY_DISK_IS_ROOT     
 options         MEMORY_DISK_SERVER=0    # no userspace memory disk support
 options         MEMORY_DISK_ROOT_SIZE=6400 # size of memory disk in blocks (3200k)
 options         MEMORY_DISK_RBFLAGS=RB_SINGLE   # boot in single-user mode
+
+# shrink kernel since ARC BIOS seems to have 8MB limit
+options 	FFS_NO_SNAPSHOT
+
+no options 	KTRACE
+no options 	SYSVMSG
+no options 	SYSVSEM
+no options 	SYSVSHM
+no options 	SYSCTL_INCLUDE_DESCR
+no options	COMPAT_15
+no options	COMPAT_16
+no options	COMPAT_20
+no options	COMPAT_30
+no options	COMPAT_40
+no options	COMPAT_LINUX
+
+no file-system	EXT2FS
+no file-system	LFS
+no file-system	NTFS
+no file-system	FDESC
+no file-system	KERNFS
+no file-system	NULLFS
+no file-system	OVERLAY
+no file-system	PUFFS
+no file-system	PROCFS
+no file-system	UMAPFS
+no file-system	UNION
+no file-system	CODA
+no file-system	TMPFS
+
+no options	QUOTA
+no options	QUOTA2
+no options	NFSSERVER
+
+no options	NETATALK
+no options	PPP_FILTER
+
+no options	MIIVERBOSE
+no options	SCSIVERBOSE
+
+no ch* at scsibus?
+no ss* at scsibus?
+no ses* at scsibus?
+no uk* at scsibus?
+
+no ppbus*
+no lpt*
+
+no pseudo-device ccd
+no pseudo-device fss
+no pseudo-device ipfilter
+no pseudo-device bridge
+no pseudo-device accf_data
+no pseudo-device accf_http
+no pseudo-device sequencer
+no pseudo-device putter
+no pseudo-device vcoda

Index: src/sys/arch/sgimips/hpc/wdsc.c
diff -u src/sys/arch/sgimips/hpc/wdsc.c:1.34 src/sys/arch/sgimips/hpc/wdsc.c:1.34.10.1
--- src/sys/arch/sgimips/hpc/wdsc.c:1.34	Wed Feb 18 16:47:58 2015
+++ src/sys/arch/sgimips/hpc/wdsc.c	Mon Sep 10 15:52:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdsc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $	*/
+/*	$NetBSD: wdsc.c,v 1.34.10.1 2018/09/10 15:52:36 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Wayne Knowles
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.34.10.1 2018/09/10 15:52:36 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -105,6 +105,9 @@ wdsc_match(device_t parent, cfdata_t cf,
 		    haa->hpc_regs->scsi0_ctl);
 		asr = MIPS_PHYS_TO_KSEG1(haa->ha_sh + haa->ha_devoff);
 
+		/* XXX: hpc1 offset due to SGIMIPS_BUS_SPACE_HPC brain damage */
+		asr = (asr + 3) & ~0x3;
+
 		if (platform.badaddr((void *)reset, sizeof(reset)))
 			return 0;
 

Index: src/sys/arch/sgimips/sgimips/machdep.c
diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.144 src/sys/arch/sgimips/sgimips/machdep.c:1.144.6.1
--- src/sys/arch/sgimips/sgimips/machdep.c:1.144	Fri Feb 10 04:00:48 2017
+++ src/sys/arch/sgimips/sgimips/machdep.c	Mon Sep 10 15:52:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.144 2017/02/10 04:00:48 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.144.6.1 2018/09/10 15:52:36 martin Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.144 2017/02/10 04:00:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.144.6.1 2018/09/10 15:52:36 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -248,12 +248,12 @@ mach_init(int argc, int32_t argv32[], ui
 	vaddr_t kernend;
 	u_int i;
 	int rv;
-#if NKSYMS > 0 || defined(DDB) || defined(MODULAR)
+#if NKSYMS || defined(DDB) || defined(MODULAR)
 	int nsym = 0;
 	char *ssym = NULL;
 	char *esym = NULL;
 	struct btinfo_symtab *bi_syms;
-#endif
+#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */
 #ifdef _LP64
 	char *argv[20];
 
@@ -311,7 +311,7 @@ mach_init(int argc, int32_t argv32[], ui
 	} else
 		bootinfo_msg = "no bootinfo found. (old bootblocks?)\n";
 
-#if NKSYM > 0 || defined(DDB) || defined(MODULAR)
+#if NKSYMS || defined(DDB) || defined(MODULAR)
 	bi_syms = lookup_bootinfo(BTINFO_SYMTAB);
 
 	/* check whether there is valid bootinfo symtab info */
@@ -321,7 +321,7 @@ mach_init(int argc, int32_t argv32[], ui
 		esym = (char *)bi_syms->esym;
 		kernend = mips_round_page(esym);
 	} else
-#endif
+#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */
 	{
 		kernend = mips_round_page(end);
 	}

Index: src/sys/arch/sgimips/stand/boot/Makefile
diff -u src/sys/arch/sgimips/stand/boot/Makefile:1.19 src/sys/arch/sgimips/stand/boot/Makefile:1.19.48.1
--- src/sys/arch/sgimips/stand/boot/Makefile:1.19	Sat Feb 26 16:26:58 2011
+++ src/sys/arch/sgimips/stand/boot/Makefile	Mon Sep 10 15:52:36 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2011/02/26 16:26:58 matt Exp $
+#	$NetBSD: Makefile,v 1.19.48.1 2018/09/10 15:52:36 martin Exp $
 
 
 # Don't strip the ECOFF'ed version on install -- strip gets confused by that,
@@ -12,10 +12,7 @@ SRCS=	start.S boot.c bootinfo.c conf.c d
 PROG=	aoutboot
 ${PROG}: ip2xboot ip3xboot
 .if ${MACHINE_ARCH} == "mipseb"
-	${OBJCOPY} --impure -O ecoff-bigmips \
-		-R .pdr -R .mdebug.nabi32 -R .mdebug.abi32 \
-		-R .comment -R .ident \
-		ip2xboot ${.TARGET}
+	${ELF2ECOFF} ip2xboot ${.TARGET}
 .else
 	touch ${.TARGET}
 .endif

Reply via email to