CVS commit: src/sys/kern

2013-02-09 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Feb  9 11:04:33 UTC 2013

Modified Files:
src/sys/kern: subr_lockdebug.c

Log Message:
Fix LOCKDEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/kern/subr_lockdebug.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/kern/subr_lockdebug.c
diff -u src/sys/kern/subr_lockdebug.c:1.47 src/sys/kern/subr_lockdebug.c:1.48
--- src/sys/kern/subr_lockdebug.c:1.47	Sat Feb  9 00:31:21 2013
+++ src/sys/kern/subr_lockdebug.c	Sat Feb  9 11:04:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_lockdebug.c,v 1.47 2013/02/09 00:31:21 christos Exp $	*/
+/*	$NetBSD: subr_lockdebug.c,v 1.48 2013/02/09 11:04:32 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_lockdebug.c,v 1.47 2013/02/09 00:31:21 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_lockdebug.c,v 1.48 2013/02/09 11:04:32 njoly Exp $);
 
 #include opt_ddb.h
 
@@ -726,7 +726,7 @@ lockdebug_dump(lockdebug_t *ld, void (*p
 	(long)ld-ld_initaddr);
 
 	if (ld-ld_lockops-lo_type == LOCKOPS_CV) {
-		(*pr)( interlock: %#018lx\n, ld-ld_locked);
+		(*pr)( interlock: %#018lx\n, (long)ld-ld_locked);
 	} else {
 		(*pr)(\n
 		shared holds : %18u exclusive: %18u\n



CVS commit: src/distrib/utils/embedded/conf

2013-02-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  9 11:07:26 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: rpi.conf

Log Message:
add missing }


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/utils/embedded/conf/rpi.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/rpi.conf
diff -u src/distrib/utils/embedded/conf/rpi.conf:1.14 src/distrib/utils/embedded/conf/rpi.conf:1.15
--- src/distrib/utils/embedded/conf/rpi.conf:1.14	Fri Feb  8 19:16:53 2013
+++ src/distrib/utils/embedded/conf/rpi.conf	Sat Feb  9 11:07:26 2013
@@ -1,4 +1,4 @@
-# $NetBSD: rpi.conf,v 1.14 2013/02/08 19:16:53 christos Exp $
+# $NetBSD: rpi.conf,v 1.15 2013/02/09 11:07:26 jmcneill Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
@@ -42,7 +42,7 @@ EOF
 	fi
 
 	echo ${bar} installing kernel ${bar}
-	cp ${kernel ${mnt}/boot
+	cp ${kernel} ${mnt}/boot
 
 	echo -n ${bar} installing firmware files:
 	(cd ${mnt}/boot 



CVS commit: src/distrib/utils/embedded

2013-02-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  9 11:15:14 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
fix usage


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.18 src/distrib/utils/embedded/mkimage:1.19
--- src/distrib/utils/embedded/mkimage:1.18	Fri Feb  8 19:14:14 2013
+++ src/distrib/utils/embedded/mkimage	Sat Feb  9 11:15:14 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.18 2013/02/08 19:14:14 christos Exp $
+# $NetBSD: mkimage,v 1.19 2013/02/09 11:15:14 jmcneill Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -60,7 +60,7 @@ getsize() {
 
 usage() {
 	cat  EOF 12
-Usage: $PROG -h host-arch [-K kerneldir] [-S srcdir] [-R releasedir] [-c custom-files-dir] [-s Mb size] [image]
+Usage: $PROG -h host-arch [-K kerneldir] [-S srcdir] [-D releasedir] [-c custom-files-dir] [-s Mb size] [image]
 EOF
 	exit 1
 }



CVS commit: src/distrib/utils/embedded/conf

2013-02-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  9 11:19:55 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: beagleboard.conf

Log Message:
keep beagleboard conf in sync with rpi


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/embedded/conf/beagleboard.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/beagleboard.conf
diff -u src/distrib/utils/embedded/conf/beagleboard.conf:1.5 src/distrib/utils/embedded/conf/beagleboard.conf:1.6
--- src/distrib/utils/embedded/conf/beagleboard.conf:1.5	Sun Feb  3 09:16:25 2013
+++ src/distrib/utils/embedded/conf/beagleboard.conf	Sat Feb  9 11:19:55 2013
@@ -1,15 +1,18 @@
-# $NetBSD: beagleboard.conf,v 1.5 2013/02/03 09:16:25 christos Exp $
+# $NetBSD: beagleboard.conf,v 1.6 2013/02/09 11:19:55 jmcneill Exp $
 # BeagleBoard customization script used by mkimage
 #
 board=beagleboard
-kernelconf=BEAGLEBOARD
-kerneldir=$src/sys/arch/evbarm/compile/obj/${kernelconf}
+kernel=$src/sys/arch/evbarm/compile/obj/BEAGLEBOARD/netbsd.ub
 
 . ${DIR}/conf/evbarm.conf
 
 kernelimg=netbsd.ub
 loadaddr=8100
 
+make_filesystems() {
+	make_filesystems_evbarm
+}
+
 make_label() {
 	make_label_evbarm
 }
@@ -23,11 +26,17 @@ customize() {
 	cat  ${mnt}/etc/rc.conf  EOF
 mdnsd=YES
 EOF  
+}
+
+populate() {
 	cat  ${mnt}/boot/uEnv.txt  EOF
 loaduimage=fatload mmc 0 ${loadaddr} ${kernelimg}; bootm ${loadaddr} root=ld0a
 EOF
-}
+	if [ ! -f ${kernel} ]; then
+		echo ${PROG}: Missing ${kernel} 11
+		exit 1
+	fi
 
-cleanup() {
-	cleanup_evbarm
+	echo ${bar} installing kernel ${bar}
+	cp ${kernel} ${mnt}/boot
 }



CVS commit: src/distrib/utils/embedded

2013-02-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  9 11:20:56 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
fix usage again -- -D specifies destdir not releasedir
include conf/${h}.conf not conf/rpi.conf
fix ./mkimage: line 110: 7 - 1 : syntax error: operand expected (error token 
is 7 - 1 )


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.19 src/distrib/utils/embedded/mkimage:1.20
--- src/distrib/utils/embedded/mkimage:1.19	Sat Feb  9 11:15:14 2013
+++ src/distrib/utils/embedded/mkimage	Sat Feb  9 11:20:56 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.19 2013/02/09 11:15:14 jmcneill Exp $
+# $NetBSD: mkimage,v 1.20 2013/02/09 11:20:56 jmcneill Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -60,7 +60,7 @@ getsize() {
 
 usage() {
 	cat  EOF 12
-Usage: $PROG -h host-arch [-K kerneldir] [-S srcdir] [-D releasedir] [-c custom-files-dir] [-s Mb size] [image]
+Usage: $PROG -h host-arch [-K kerneldir] [-S srcdir] [-D destdir] [-c custom-files-dir] [-s Mb size] [image]
 EOF
 	exit 1
 }
@@ -107,14 +107,14 @@ done
 
 trap cleanup 0 1 2 3 15
 
-shift $(( $OPTIND - 1 ))
+shift $(( $OPTIND - 1 ))
 if [ -n $1 ]; then
 	# take the next argument as being the image name
 	image=$1
 	shift
 fi
 
-. $DIR/conf/rpi.conf
+. ${DIR}/conf/${h}.conf
 
 echo ${bar} configuring sets ${bar}
 (echo '/set type=dir uname=root gname=wheel mode=0755'



CVS commit: src/sys/arch/powerpc/ibm4xx

2013-02-09 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Feb  9 11:22:51 UTC 2013

Modified Files:
src/sys/arch/powerpc/ibm4xx: trap_subr.S

Log Message:
Fix KASSERT(l == curlwp)ed in mi_switch().  Don't use INTSTK of cpu_info in
INTR_PROLOG when user-mode.  Interrupted user context switches to newlwp, if
sched tick.  This context must save to USPACE.
When use our INTSTK?


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/ibm4xx/trap_subr.S

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/powerpc/ibm4xx/trap_subr.S
diff -u src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.23 src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.24
--- src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.23	Tue Jan 29 15:33:44 2013
+++ src/sys/arch/powerpc/ibm4xx/trap_subr.S	Sat Feb  9 11:22:51 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.23 2013/01/29 15:33:44 kiyohara Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.24 2013/02/09 11:22:51 kiyohara Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -166,9 +166,10 @@ _C_LABEL(name ## size) = .-_C_LABEL(name
 	mfxer	%r30;			/* save XER */		\
 	mfsrr1	%r31;		\
 	mtcr	%r31;		\
-	lwz	%r1,CI_INTSTK(%r1);	/* get intstk */	\
-	bt	MSR_PR,1f;		/* branch if PSL_PR is true */ \
-	mfsprg1	%r1;			/* yes, get old SP */	\
+	mfsprg1	%r1;			/* restore SP */ 	\
+	bf	MSR_PR,1f;		/* branch if PSL_PR is false */ \
+	GET_PCB(%r1);		\
+	addi	%r1,%r1,USPACE-CALLFRAMELEN; /* stack is top of user struct */ \
 1:
 
 /*



CVS commit: src/share/mk

2013-02-09 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sat Feb  9 12:17:21 UTC 2013

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
typo in a MKDEBUGLIB part


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/share/mk/bsd.lib.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.328 src/share/mk/bsd.lib.mk:1.329
--- src/share/mk/bsd.lib.mk:1.328	Fri Feb  8 04:06:25 2013
+++ src/share/mk/bsd.lib.mk	Sat Feb  9 12:17:20 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.328 2013/02/08 04:06:25 matt Exp $
+#	$NetBSD: bsd.lib.mk,v 1.329 2013/02/09 12:17:20 spz Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -723,7 +723,7 @@ libinstall:: ${_DEST.LIB}/${_LIB_g.a}
 .PRECIOUS: ${_DEST.LIB}/${_LIB_g.a}
 
 .if ${MKUPDATE} == no
-.if !defined(BUILD)  !make(all)  !make(${_LIB_g.a)
+.if !defined(BUILD)  !make(all)  !make(${_LIB_g.a})
 ${_DEST.LIB}/${_LIB_g.a}! .MADE
 .endif
 ${_DEST.LIB}/${_LIB_g.a}! ${_LIB_g.a} __archiveinstall



CVS commit: src/sys/arch/arm/omap

2013-02-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  9 13:29:00 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omapfb.c

Log Message:
attach a wsdisplay even if this is not the console device


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/omap/omapfb.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/arm/omap/omapfb.c
diff -u src/sys/arch/arm/omap/omapfb.c:1.20 src/sys/arch/arm/omap/omapfb.c:1.21
--- src/sys/arch/arm/omap/omapfb.c:1.20	Mon Feb  4 21:35:44 2013
+++ src/sys/arch/arm/omap/omapfb.c	Sat Feb  9 13:28:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omapfb.c,v 1.20 2013/02/04 21:35:44 macallan Exp $	*/
+/*	$NetBSD: omapfb.c,v 1.21 2013/02/09 13:28:59 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2010 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.20 2013/02/04 21:35:44 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.21 2013/02/09 13:28:59 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -242,9 +242,6 @@ omapfb_attach(device_t parent, device_t 
 		edid_print(ei);
 	}
 
-	if (!is_console)
-		return;
-
 	/* setup video DMA */
 	sc-sc_vramsize = (12  20) + 0x1000; /* 12MB + CLUT */
 
@@ -397,30 +394,22 @@ omapfb_attach(device_t parent, device_t 
 #endif
 
 	ri = sc-sc_console_screen.scr_ri;
-
-	if (is_console) {
-		vcons_init_screen(sc-vd, sc-sc_console_screen, 1,
-		defattr);
-		sc-sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
-
+	vcons_init_screen(sc-vd, sc-sc_console_screen, 1, defattr);
+	sc-sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
 #if NOMAPDMA  0
-		omapfb_rectfill(sc, 0, 0, sc-sc_width, sc-sc_height,
-		ri-ri_devcmap[(defattr  16)  0xff]);
+	omapfb_rectfill(sc, 0, 0, sc-sc_width, sc-sc_height,
+	ri-ri_devcmap[(defattr  16)  0xff]);
 #endif
-		sc-sc_defaultscreen_descr.textops = ri-ri_ops;
-		sc-sc_defaultscreen_descr.capabilities = ri-ri_caps;
-		sc-sc_defaultscreen_descr.nrows = ri-ri_rows;
-		sc-sc_defaultscreen_descr.ncols = ri-ri_cols;
+	sc-sc_defaultscreen_descr.textops = ri-ri_ops;
+	sc-sc_defaultscreen_descr.capabilities = ri-ri_caps;
+	sc-sc_defaultscreen_descr.nrows = ri-ri_rows;
+	sc-sc_defaultscreen_descr.ncols = ri-ri_cols;
+
+	if (is_console)
 		wsdisplay_cnattach(sc-sc_defaultscreen_descr, ri, 0, 0,
 		defattr);
-		vcons_replay_msgbuf(sc-sc_console_screen);
-	} else {
-		/*
-		 * since we're not the console we can postpone the rest
-		 * until someone actually allocates a screen for us
-		 */
-		(*ri-ri_ops.allocattr)(ri, 0, 0, 0, defattr);
-	}
+
+	vcons_replay_msgbuf(sc-sc_console_screen);
 
 	aa.console = is_console;
 	aa.scrdata = sc-sc_screenlist;



CVS commit: src/sys/arch/evbarm/conf

2013-02-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Feb  9 13:29:36 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: BEAGLEBOARD

Log Message:
console device selection is done at runtime now


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/BEAGLEBOARD

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/evbarm/conf/BEAGLEBOARD
diff -u src/sys/arch/evbarm/conf/BEAGLEBOARD:1.44 src/sys/arch/evbarm/conf/BEAGLEBOARD:1.45
--- src/sys/arch/evbarm/conf/BEAGLEBOARD:1.44	Thu Jan 24 02:04:15 2013
+++ src/sys/arch/evbarm/conf/BEAGLEBOARD	Sat Feb  9 13:29:36 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBOARD,v 1.44 2013/01/24 02:04:15 jmcneill Exp $
+#	$NetBSD: BEAGLEBOARD,v 1.45 2013/02/09 13:29:36 jmcneill Exp $
 #
 #	BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel
 #
@@ -256,10 +256,7 @@ omapdma0	at obio0 addr 0x48056000 size 0
 
 # onboard video
 omapfb* 	at obio0 addr 0x4805 size 0x1
-
-# make sure the console display is always wsdisplay0
-wsdisplay0	at wsemuldisplaydev? console 1
-wsdisplay*	at wsemuldisplaydev?
+wsdisplay*	at wsemuldisplaydev? console ?
 
 # various options for wscons - we try to look as much like a standard
 # sun console as possible



CVS commit: src/usr.sbin/pf/ftp-proxy

2013-02-09 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Feb  9 15:36:40 UTC 2013

Modified Files:
src/usr.sbin/pf/ftp-proxy: Makefile

Log Message:
Disable -DWITH_NPF for now; will be converted to BPF mechanism.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/pf/ftp-proxy/Makefile

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

Modified files:

Index: src/usr.sbin/pf/ftp-proxy/Makefile
diff -u src/usr.sbin/pf/ftp-proxy/Makefile:1.7 src/usr.sbin/pf/ftp-proxy/Makefile:1.8
--- src/usr.sbin/pf/ftp-proxy/Makefile:1.7	Sat Sep 15 17:46:25 2012
+++ src/usr.sbin/pf/ftp-proxy/Makefile	Sat Feb  9 15:36:40 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2012/09/15 17:46:25 plunky Exp $
+#	$NetBSD: Makefile,v 1.8 2013/02/09 15:36:40 rmind Exp $
 #	$OpenBSD: Makefile,v 1.3 2006/11/26 11:31:13 deraadt Exp $
 
 PROG=	ftp-proxy
@@ -15,9 +15,9 @@ CPPFLAGS+=-I${NETBSDSRCDIR}/sys
 
 # NPF support
 .if (${MKNPF} != no)
-SRCS+=		npf.c
-CPPFLAGS+=	-DWITH_NPF
-LDADD+=		-lnpf -lprop
+#SRCS+=		npf.c
+#CPPFLAGS+=	-DWITH_NPF
+#LDADD+=		-lnpf -lprop
 .endif
 
 # IP Filter support



CVS commit: src/sys/dev/usb

2013-02-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Feb  9 16:42:45 UTC 2013

Modified Files:
src/sys/dev/usb: if_smscreg.h if_smscvar.h

Log Message:
RCSId police


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/if_smscreg.h \
src/sys/dev/usb/if_smscvar.h

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

Modified files:

Index: src/sys/dev/usb/if_smscreg.h
diff -u src/sys/dev/usb/if_smscreg.h:1.1 src/sys/dev/usb/if_smscreg.h:1.2
--- src/sys/dev/usb/if_smscreg.h:1.1	Wed Jan  9 23:02:59 2013
+++ src/sys/dev/usb/if_smscreg.h	Sat Feb  9 16:42:45 2013
@@ -1,3 +1,5 @@
+/*	$NetBSD: if_smscreg.h,v 1.2 2013/02/09 16:42:45 skrll Exp $	*/
+
 /*	$OpenBSD: if_smscreg.h,v 1.2 2012/09/27 12:38:11 jsg Exp $	*/
 /*-
  * Copyright (c) 2012
Index: src/sys/dev/usb/if_smscvar.h
diff -u src/sys/dev/usb/if_smscvar.h:1.1 src/sys/dev/usb/if_smscvar.h:1.2
--- src/sys/dev/usb/if_smscvar.h:1.1	Wed Jan  9 23:02:59 2013
+++ src/sys/dev/usb/if_smscvar.h	Sat Feb  9 16:42:45 2013
@@ -1,3 +1,5 @@
+/*	$NetBSD: if_smscvar.h,v 1.2 2013/02/09 16:42:45 skrll Exp $	*/
+
 /*	$OpenBSD: if_smscreg.h,v 1.2 2012/09/27 12:38:11 jsg Exp $	*/
 /*-
  * Copyright (c) 2012



CVS commit: src/distrib/sets/lists

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 17:17:36 UTC 2013

Modified Files:
src/distrib/sets/lists/xdebug: shl.mi
src/distrib/sets/lists/xserver: mi

Log Message:
libmesa needs the lib prefix because it is used in LIBDPLIBS


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/xdebug/shl.mi
cvs rdiff -u -r1.32 -r1.33 src/distrib/sets/lists/xserver/mi

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

Modified files:

Index: src/distrib/sets/lists/xdebug/shl.mi
diff -u src/distrib/sets/lists/xdebug/shl.mi:1.3 src/distrib/sets/lists/xdebug/shl.mi:1.4
--- src/distrib/sets/lists/xdebug/shl.mi:1.3	Fri Feb  8 10:13:04 2013
+++ src/distrib/sets/lists/xdebug/shl.mi	Sat Feb  9 12:17:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.3 2013/02/08 15:13:04 christos Exp $
+# $NetBSD: shl.mi,v 1.4 2013/02/09 17:17:36 christos Exp $
 ./usr/libdata/debug/usr/X11R6/lib/libFS.so.6.0.debug			-unknown-		x11,debug
 ./usr/libdata/debug/usr/X11R6/lib/libGL.so.1.2.debug			-unknown-		x11,debug
 ./usr/libdata/debug/usr/X11R6/lib/libGLU.so.1.3.debug			-unknown-		x11,debug
@@ -139,7 +139,6 @@
 ./usr/libdata/debug/usr/X11R7/lib/libxcb.so.1.1.debug		-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libxkbfile.so.2.0.debug	-unknown-		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/libxkbui.so.2.0.debug		-unknown-		xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/dri/libmesa_dri.so.0.debug	obsolete	xorg,obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/dri/libswrast_dri.so.0.debug	obsolete	xorg,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/dri/mesa_dri.so.0.debug	-unknown-	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/dri/libmesa_dri.so.0.debug	-unknown-	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/dri/swrast_dri.so.0.debug	-unknown-	xorg,debug

Index: src/distrib/sets/lists/xserver/mi
diff -u src/distrib/sets/lists/xserver/mi:1.32 src/distrib/sets/lists/xserver/mi:1.33
--- src/distrib/sets/lists/xserver/mi:1.32	Wed Mar  9 13:55:56 2011
+++ src/distrib/sets/lists/xserver/mi	Sat Feb  9 12:17:36 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.32 2011/03/09 18:55:56 mrg Exp $
+# $NetBSD: mi,v 1.33 2013/02/09 17:17:36 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -54,8 +54,8 @@
 ./usr/X11R6/man/man1/xvidtune.1-unknown-	.man,x11
 ./usr/X11R7/bin/Xnest	-unknown-	xorg
 ./usr/X11R7/bin/Xvfb	-unknown-	xorg
-./usr/X11R7/lib/modules/dri/mesa_dri.so			-unknown-	xorg
-./usr/X11R7/lib/modules/dri/mesa_dri.so.0		-unknown-	xorg
+./usr/X11R7/lib/modules/dri/libmesa_dri.so		-unknown-	xorg
+./usr/X11R7/lib/modules/dri/libmesa_dri.so.0		-unknown-	xorg
 ./usr/X11R7/lib/modules/dri/swrast_dri.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/dri/swrast_dri.so.0		-unknown-	xorg
 ./usr/X11R7/man/cat1/Xmark.0-unknown-	.cat,xorg



CVS commit: src/external/mit/xorg/lib/dri/libmesa

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 17:18:01 UTC 2013

Modified Files:
src/external/mit/xorg/lib/dri/libmesa: Makefile

Log Message:
explicitly set the prefix here.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/mit/xorg/lib/dri/libmesa/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/dri/libmesa/Makefile
diff -u src/external/mit/xorg/lib/dri/libmesa/Makefile:1.10 src/external/mit/xorg/lib/dri/libmesa/Makefile:1.11
--- src/external/mit/xorg/lib/dri/libmesa/Makefile:1.10	Thu Mar 22 19:46:27 2012
+++ src/external/mit/xorg/lib/dri/libmesa/Makefile	Sat Feb  9 12:18:01 2013
@@ -1,7 +1,8 @@
-#	$NetBSD: Makefile,v 1.10 2012/03/22 23:46:27 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2013/02/09 17:18:01 christos Exp $
 
 .include bsd.own.mk
 
+_LIB_PREFIX=	lib
 LIB=		mesa_dri
 LIBISMODULE=	yes
 



CVS commit: src/share/mk

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 17:18:18 UTC 2013

Modified Files:
src/share/mk: bsd.lib.mk

Log Message:
Allow setting _LIB_PREFIX externally.


To generate a diff of this commit:
cvs rdiff -u -r1.329 -r1.330 src/share/mk/bsd.lib.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.329 src/share/mk/bsd.lib.mk:1.330
--- src/share/mk/bsd.lib.mk:1.329	Sat Feb  9 07:17:20 2013
+++ src/share/mk/bsd.lib.mk	Sat Feb  9 12:18:17 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.329 2013/02/09 12:17:20 spz Exp $
+#	$NetBSD: bsd.lib.mk,v 1.330 2013/02/09 17:18:17 christos Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -11,15 +11,15 @@ LIBISMODULE?=	no
 LIBISPRIVATE?=	no
 LIBISCXX?=	no
 
-_LIB_PREFIX=	lib
-
 .if ${LIBISMODULE} != no
-_LIB_PREFIX=	# empty
+_LIB_PREFIX?=	# empty
 MKDEBUGLIB:=	no
 MKLINT:=	no
 MKPICINSTALL:=	no
 MKPROFILE:=	no
 MKSTATICLIB:=	no
+.else
+_LIB_PREFIX?=	lib
 .endif
 
 .if ${LIBISPRIVATE} != no



CVS commit: src/sys/arch

2013-02-09 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Sat Feb  9 17:42:35 UTC 2013

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0
src/sys/arch/i386/conf: XEN3_DOM0

Log Message:
Added wpi(4) to the XEN3_DOM0 kernel for both amd64 and i386
Tested on a Lenovo ThinkPad T60 2007 (amd64)


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/i386/conf/XEN3_DOM0

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/amd64/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.91 src/sys/arch/amd64/conf/XEN3_DOM0:1.92
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.91	Fri Nov 30 18:13:30 2012
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Sat Feb  9 17:42:34 2013
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.91 2012/11/30 18:13:30 riz Exp $
+# $NetBSD: XEN3_DOM0,v 1.92 2013/02/09 17:42:34 khorben Exp $
 
 include 	arch/amd64/conf/std.xen
 
@@ -372,6 +372,7 @@ vge*	at pci? dev ? function ?	# VIATech 
 vr*	at pci? dev ? function ?	# VIA Rhine Fast Ethernet
 wi*	at pci? dev ? function ?	# Intersil Prism Mini-PCI (802.11b)
 wm*	at pci? dev ? function ?	# Intel 8254x gigabit
+wpi*	at pci? dev ? function ?	# Intel PRO/Wireless 3945ABG
 xge*	at pci? dev ? function ?	# Neterion (S2io) Xframe-I 10GbE
 
 # MII/PHY support

Index: src/sys/arch/i386/conf/XEN3_DOM0
diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.71 src/sys/arch/i386/conf/XEN3_DOM0:1.72
--- src/sys/arch/i386/conf/XEN3_DOM0:1.71	Wed Oct 17 14:48:13 2012
+++ src/sys/arch/i386/conf/XEN3_DOM0	Sat Feb  9 17:42:35 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: XEN3_DOM0,v 1.71 2012/10/17 14:48:13 apb Exp $
+#	$NetBSD: XEN3_DOM0,v 1.72 2013/02/09 17:42:35 khorben Exp $
 #
 #	XEN3_0: Xen 3.0 domain0 kernel
 
@@ -350,6 +350,7 @@ vge*	at pci? dev ? function ?	# VIATech 
 vr*	at pci? dev ? function ?	# VIA Rhine Fast Ethernet
 wi*	at pci? dev ? function ?	# Intersil Prism Mini-PCI (802.11b)
 wm*	at pci? dev ? function ?	# Intel 8254x gigabit
+wpi*	at pci? dev ? function ?	# Intel PRO/Wireless 3945ABG
 xge*	at pci? dev ? function ?	# Neterion (S2io) Xframe-I 10GbE
 
 # MII/PHY support



CVS commit: [netbsd-6] src/sys/arch/arm/arm32

2013-02-09 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Feb  9 18:29:03 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [netbsd-6]: pmap.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #803):


revision 1.251
date: 2013/02/01 15:02:31;  author: matt;  state: Exp;  lines: +45 -24
cleanup PVF_WRITE  pvh_attrs interaction.

revision 1.250
date: 2013/01/31 22:01:49;  author: skrll;  state: Exp;  lines: +3 -3
Another typo in a comment.

revision 1.249
date: 2013/01/31 21:57:39;  author: skrll;  state: Exp;  lines: +3 -3
Typo in comment.

revision 1.247
date: 2013/01/11 12:04:00;  author: matt;  state: Exp;  lines: +13 -5
Fix a bug in pmap_modify_pv where we didnt set PVF_WRITE on a page after
changing its mapping to writeable.
Add more KASSERTS
Dont go into DDB by default in pmap_fixup.

revision 1.243
date: 2012/12/10 06:54:23;  author: matt;  state: Exp;  lines: +5 -3
Change a KASSERT to a KASSERTMSG

revision 1.233
date: 2012/08/29 17:08:41;  author: matt;  state: Exp;  lines: +4 -4
Support PMAP_NOCACHE in pmap_kenter_pa

revision 1.232
date: 2012/08/29 05:51:30;  author: matt;  state: Exp;  lines: +3 -3
Use the correct prot mask in vector_page_setprot



To generate a diff of this commit:
cvs rdiff -u -r1.228.2.1 -r1.228.2.2 src/sys/arch/arm/arm32/pmap.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/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.228.2.1 src/sys/arch/arm/arm32/pmap.c:1.228.2.2
--- src/sys/arch/arm/arm32/pmap.c:1.228.2.1	Thu Aug  9 06:36:46 2012
+++ src/sys/arch/arm/arm32/pmap.c	Sat Feb  9 18:29:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.228.2.1 2012/08/09 06:36:46 jdc Exp $	*/
+/*	$NetBSD: pmap.c,v 1.228.2.2 2013/02/09 18:29:02 riz Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -211,7 +211,7 @@
 #include machine/param.h
 #include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.228.2.1 2012/08/09 06:36:46 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.228.2.2 2013/02/09 18:29:02 riz Exp $);
 
 #ifdef PMAP_DEBUG
 
@@ -695,6 +695,12 @@ pmap_debug(int level)
 }
 #endif	/* PMAP_DEBUG */
 
+#ifdef PMAP_CACHE_VIPT
+#define PMAP_VALIDATE_MD_PAGE(md)	\
+	KASSERTMSG(arm_cache_prefer_mask == 0 || (((md)-pvh_attrs  PVF_WRITE) == 0) == ((md)-urw_mappings + (md)-krw_mappings == 0), \
+	(md) %p: attrs=%#x urw=%u krw=%u, (md), \
+	(md)-pvh_attrs, (md)-urw_mappings, (md)-krw_mappings);
+#endif /* PMAP_CACHE_VIPT */
 /*
  * A bunch of routines to conditionally flush the caches/TLB depending
  * on whether the specified pmap actually needs to be flushed at any
@@ -825,10 +831,10 @@ do {	\
 /*
  * main pv_entry manipulation functions:
  *   pmap_enter_pv: enter a mapping onto a vm_page list
- *   pmap_remove_pv: remove a mappiing from a vm_page list
+ *   pmap_remove_pv: remove a mapping from a vm_page list
  *
  * NOTE: pmap_enter_pv expects to lock the pvh itself
- *   pmap_remove_pv expects te caller to lock the pvh before calling
+ *   pmap_remove_pv expects the caller to lock the pvh before calling
  */
 
 /*
@@ -892,6 +898,13 @@ pmap_enter_pv(struct vm_page_md *md, pad
 
 #ifdef PMAP_CACHE_VIPT
 	/*
+	 * Even though pmap_vac_me_harder will set PVF_WRITE for us,
+	 * do it here as well to keep the mappings  KVF_WRITE consistent.
+	 */
+	if (arm_cache_prefer_mask != 0  (flags  PVF_WRITE) != 0) {
+		md-pvh_attrs |= PVF_WRITE;
+	}
+	/*
 	 * If this is an exec mapping and its the first exec mapping
 	 * for this page, make sure to sync the I-cache.
 	 */
@@ -1010,8 +1023,11 @@ pmap_remove_pv(struct vm_page_md *md, pa
 	 * mappings (ignoring KMPAGE), clear the WRITE flag and writeback
 	 * the contents to memory.
 	 */
-	if (md-krw_mappings + md-urw_mappings == 0)
-		md-pvh_attrs = ~PVF_WRITE;
+	if (arm_cache_prefer_mask != 0) {
+		if (md-krw_mappings + md-urw_mappings == 0)
+			md-pvh_attrs = ~PVF_WRITE;
+		PMAP_VALIDATE_MD_PAGE(md);
+	}
 	KASSERT((md-pvh_attrs  PVF_DMOD) == 0 || (md-pvh_attrs  (PVF_DIRTY|PVF_NC)));
 #endif /* PMAP_CACHE_VIPT */
 
@@ -1089,8 +1105,13 @@ pmap_modify_pv(struct vm_page_md *md, pa
 		}
 	}
 #ifdef PMAP_CACHE_VIPT
-	if (md-urw_mappings + md-krw_mappings == 0)
-		md-pvh_attrs = ~PVF_WRITE;
+	if (arm_cache_prefer_mask != 0) {
+		if (md-urw_mappings + md-krw_mappings == 0) {
+			md-pvh_attrs = ~PVF_WRITE;
+		} else {
+			md-pvh_attrs |= PVF_WRITE;
+		}
+	}
 	/*
 	 * We have two cases here: the first is from enter_pv (new exec
 	 * page), the second is a combined pmap_remove_pv/pmap_enter_pv.
@@ -1846,7 +1867,7 @@ pmap_vac_me_harder(struct vm_page_md *md
 		 * Only check for a bad alias if we have writable mappings.
 		 */
 		tst_mask = arm_cache_prefer_mask;

CVS commit: [netbsd-6] src/doc

2013-02-09 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Feb  9 18:32:10 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Ticket 803.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-6.1

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

Modified files:

Index: src/doc/CHANGES-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.84 src/doc/CHANGES-6.1:1.1.2.85
--- src/doc/CHANGES-6.1:1.1.2.84	Sat Feb  9 04:13:50 2013
+++ src/doc/CHANGES-6.1	Sat Feb  9 18:32:10 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.84 2013/02/09 04:13:50 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.85 2013/02/09 18:32:10 riz Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8210,3 +8210,10 @@ sys/secmodel/securelevel/secmodel_secure
 	security.models.bsd44.{curtain,securelevel}.
 	[jym, ticket #802]
 
+sys/arch/arm/arm32/pmap.c			1.232,1.233,1.243,1.247,
+		1.249-1.251 via patch
+
+	Fix a bug in pmap_modify_pv() where PVF_WRITE wasn't set
+	after changing its mapping to writeable.
+	[msaitoh, ticket #803]
+



CVS commit: src/etc/etc.evbarm

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 18:49:56 UTC 2013

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
hook image building for rpi.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.34 src/etc/etc.evbarm/Makefile.inc:1.35
--- src/etc/etc.evbarm/Makefile.inc:1.34	Tue Feb  5 20:31:55 2013
+++ src/etc/etc.evbarm/Makefile.inc	Sat Feb  9 13:49:55 2013
@@ -1,27 +1,24 @@
-#	$NetBSD: Makefile.inc,v 1.34 2013/02/06 01:31:55 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.35 2013/02/09 18:49:55 christos Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
 
+MKIMAGE= ${NETBSDSRCDIR}/distrib/utils/embedded/mkimage
+
 # If you change the list of distributed kernels, don't forget
 # to update the release documentation in distrib/notes/common/contents
 EVBARM_BOARDS=
 
 .if ${MACHINE_ARCH} == arm
 # Little endian platforms (armv4 or pre-armv5t)
-EVBARM_BOARDS+=		ADI_BRH CP3100 GEMINI GUMSTIX INTEGRATOR \
+EVBARM_BOARDS+=		ADI_BRH BCM5301X CP3100 GEMINI GUMSTIX INTEGRATOR \
 			IQ80310 IQ80321 MINI2440 MV2120 SMDK2410 \
 			SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL
 .endif
 
-.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm \
-|| ${MACHINE_ARCH} == earmhf
-# Little endian platforms with VFP
-EVBARM_BOARDS+=		BCM5301X BEAGLEBOARD BEAGLEBOARDXM BEAGLEBONE TISDP2420
-.endif
 .if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm
 # Little endian platforms (armv5t+)
-EVBARM_BOARDS+=		OPENRD SHEEVAPLUG 
+EVBARM_BOARDS+=		BEAGLEBOARD OPENRD SHEEVAPLUG TISDP2420
 .endif
 
 .if ${MACHINE_ARCH} == armeb
@@ -39,9 +36,16 @@ BUILD_KERNELS+=		${board}_INSTALL
 KERNEL_SETS+=		IXM1200 HDL_G
 .endif
 
-.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm \
-|| ${MACHINE_ARCH} == earmhf
+.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm
 KERNEL_SETS+=		RPI
+RPI.kernel=		${KERNSRCDIR}/arch/evbarm/compile/RPI/kernel.img
+RPI.img=		${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg/rpi.img
+snap_md_post:
+	TOOL_MAKEFS=${TOOL_MAKEFS} \
+	TOOL_DISKLABEL=${TOOL_DISKLABEL} \
+	TOOL_FDISK=${TOOL_FDISK} \
+	${MKIMAGE} -x -h rpi -D ${DESTDIR} -K ${RPI.kernel} \
+	-S ${NETBSDSRCDIR} ${RPI.img}
 .endif
 
 .if ${MACHINE_ARCH} == armeb
@@ -53,3 +57,4 @@ KERNEL_SUFFIXES=	bin srec ub
 
 INSTALLATION_DIRS+=	binary/gzimg		\
 			installation/instkernel
+



CVS commit: src/distrib/utils/embedded

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 18:50:11 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
add tool hooks.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.20 src/distrib/utils/embedded/mkimage:1.21
--- src/distrib/utils/embedded/mkimage:1.20	Sat Feb  9 06:20:56 2013
+++ src/distrib/utils/embedded/mkimage	Sat Feb  9 13:50:11 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.20 2013/02/09 11:20:56 jmcneill Exp $
+# $NetBSD: mkimage,v 1.21 2013/02/09 18:50:11 christos Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,6 +35,10 @@
 DIR=$(cd $(dirname $0)  pwd)
 PROG=$(basename $0)
 
+DISKLABEL=${TOOL_DISKLABEL:-disklabel}
+FDISK=${TOOL_DISKLABEL:-fdisk}
+MAKEFS=${TOOL_MAKEFS:-makefs}
+
 src=/usr/src
 release=/usr/obj/evbarm/release
 sets=base comp etc games man misc modules text
@@ -114,8 +118,6 @@ if [ -n $1 ]; then
 	shift
 fi
 
-. ${DIR}/conf/${h}.conf
-
 echo ${bar} configuring sets ${bar}
 (echo '/set type=dir uname=root gname=wheel mode=0755'
 for i in $selected_sets; do
@@ -130,12 +132,12 @@ populate
 (cd ${mnt}; mtree -c -k all | mtree -C -k all)  $tmp/selected_sets
 if [ -n ${msdosid} ]; then
 	echo ${bar} Populating msdos filesystem ${bar}
-	makefs -t msdos -O $((${init} / 2))m -s $((${boot} / 2))m \
+	${MAKEFS} -t msdos -O $((${init} / 2))m -s $((${boot} / 2))m \
 	${image} ${mnt}/boot
 fi
 
 echo ${bar} Populating ffs filesystem ${bar}
-makefs -t ffs -rx -O $(((${init} + ${boot} + ${swap}) / 2))m \
+${MAKEFS} -t ffs -rx -O $(((${init} + ${boot} + ${swap}) / 2))m \
 -F $tmp/selected_sets ${image} ${release} ${mnt}
 
 if [ -z $size ]; then
@@ -145,9 +147,9 @@ newsize=$((size / 2 / 1024))
 
 echo ${bar} Adding label ${bar}
 make_label  ${tmp}/label
-disklabel -R -F ${image} ${tmp}/label
+${DISKLABEL} -R -F ${image} ${tmp}/label
 if [ -n ${msdosid} ]; then
 	echo ${bar} Running fdisk ${bar}
-	fdisk -f -u -0 -s ${msdosid}/${init}/${boot} -F ${image}
+	${FDISK} -f -u -0 -s ${msdosid}/${init}/${boot} -F ${image}
 fi
 echo ${bar} Image is ${image} ${bar}



CVS commit: src/etc/etc.evbarm

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 18:59:19 UTC 2013

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
merge back changes I undid


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.35 src/etc/etc.evbarm/Makefile.inc:1.36
--- src/etc/etc.evbarm/Makefile.inc:1.35	Sat Feb  9 13:49:55 2013
+++ src/etc/etc.evbarm/Makefile.inc	Sat Feb  9 13:59:19 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.35 2013/02/09 18:49:55 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.36 2013/02/09 18:59:19 christos Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -11,14 +11,19 @@ EVBARM_BOARDS=
 
 .if ${MACHINE_ARCH} == arm
 # Little endian platforms (armv4 or pre-armv5t)
-EVBARM_BOARDS+=		ADI_BRH BCM5301X CP3100 GEMINI GUMSTIX INTEGRATOR \
+EVBARM_BOARDS+=		ADI_BRH CP3100 GEMINI GUMSTIX INTEGRATOR \
 			IQ80310 IQ80321 MINI2440 MV2120 SMDK2410 \
 			SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL
 .endif
 
+.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm \
+|| ${MACHINE_ARCH} == earmhf
+# Little endian platforms with VFP
+EVBARM_BOARDS+=		BCM5301X BEAGLEBOARD BEAGLEBOARDXM BEAGLEBONE TISDP2420
+.endif
 .if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm
 # Little endian platforms (armv5t+)
-EVBARM_BOARDS+=		BEAGLEBOARD OPENRD SHEEVAPLUG TISDP2420
+EVBARM_BOARDS+=		OPENRD SHEEVAPLUG 
 .endif
 
 .if ${MACHINE_ARCH} == armeb
@@ -36,7 +41,8 @@ BUILD_KERNELS+=		${board}_INSTALL
 KERNEL_SETS+=		IXM1200 HDL_G
 .endif
 
-.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm
+.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm \
+|| ${MACHINE_ARCH} == earmhf
 KERNEL_SETS+=		RPI
 RPI.kernel=		${KERNSRCDIR}/arch/evbarm/compile/RPI/kernel.img
 RPI.img=		${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg/rpi.img
@@ -57,4 +63,3 @@ KERNEL_SUFFIXES=	bin srec ub
 
 INSTALLATION_DIRS+=	binary/gzimg		\
 			installation/instkernel
-



CVS commit: src/lib/libm/src

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 19:37:48 UTC 2013

Added Files:
src/lib/libm/src: s_nan.c s_nearbyint.c

Log Message:
add FreeBSD implementations.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/s_nan.c \
src/lib/libm/src/s_nearbyint.c

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

Added files:

Index: src/lib/libm/src/s_nan.c
diff -u /dev/null src/lib/libm/src/s_nan.c:1.1
--- /dev/null	Sat Feb  9 14:37:48 2013
+++ src/lib/libm/src/s_nan.c	Sat Feb  9 14:37:48 2013
@@ -0,0 +1,114 @@
+/*	$NetBSD: s_nan.c,v 1.1 2013/02/09 19:37:48 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2007 David Schultz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/lib/msun/src/s_nan.c,v 1.2 2007/12/18 23:46:32 das Exp $
+ */
+#include sys/cdefs.h
+__RCSID($NetBSD: s_nan.c,v 1.1 2013/02/09 19:37:48 christos Exp $);
+
+#include sys/endian.h
+#include ctype.h
+#include float.h
+#include math.h
+#include stdint.h
+#include strings.h
+
+#include math_private.h
+
+/*
+ * Scan a string of hexadecimal digits (the format nan(3) expects) and
+ * make a bit array (using the local endianness). We stop when we
+ * encounter an invalid character, NUL, etc.  If we overflow, we do
+ * the same as gcc's __builtin_nan(), namely, discard the high order bits.
+ *
+ * The format this routine accepts needs to be compatible with what is used
+ * in contrib/gdtoa/hexnan.c (for strtod/scanf) and what is used in
+ * __builtin_nan(). In fact, we're only 100% compatible for strings we
+ * consider valid, so we might be violating the C standard. But it's
+ * impossible to use nan(3) portably anyway, so this seems good enough.
+ */
+void
+_scan_nan(uint32_t *words, int num_words, const char *s)
+{
+	int si;		/* index into s */
+	int bitpos;	/* index into words (in bits) */
+
+	bzero(words, num_words * sizeof(uint32_t));
+
+	/* Allow a leading '0x'. (It's expected, but redundant.) */
+	if (s[0] == '0'  (s[1] == 'x' || s[1] == 'X'))
+		s += 2;
+
+	/* Scan forwards in the string, looking for the end of the sequence. */
+	for (si = 0; isxdigit(s[si]); si++)
+		;
+
+	/* Scan backwards, filling in the bits in words[] as we go. */
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	for (bitpos = 0; bitpos  32 * num_words; bitpos += 4) {
+#else
+	for (bitpos = 32 * num_words - 4; bitpos = 0; bitpos -= 4) {
+#endif
+		if (--si  0)
+			break;
+		words[bitpos / 32] |= digittoint(s[si])  (bitpos % 32);
+	}
+}
+
+double
+nan(const char *s)
+{
+	union {
+		double d;
+		uint32_t bits[2];
+	} u;
+
+	_scan_nan(u.bits, 2, s);
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	u.bits[1] |= 0x7ff8;
+#else
+	u.bits[0] |= 0x7ff8;
+#endif
+	return (u.d);
+}
+
+float
+nanf(const char *s)
+{
+	union {
+		float f;
+		uint32_t bits[1];
+	} u;
+
+	_scan_nan(u.bits, 1, s);
+	u.bits[0] |= 0x7fc0;
+	return (u.f);
+}
+
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(nan, nanl);
+#endif
Index: src/lib/libm/src/s_nearbyint.c
diff -u /dev/null src/lib/libm/src/s_nearbyint.c:1.1
--- /dev/null	Sat Feb  9 14:37:48 2013
+++ src/lib/libm/src/s_nearbyint.c	Sat Feb  9 14:37:48 2013
@@ -0,0 +1,61 @@
+/*	$NetBSD: s_nearbyint.c,v 1.1 2013/02/09 19:37:48 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2004 David Schultz d...@freebsd.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above 

CVS commit: src/lib/libm/src

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 19:39:01 UTC 2013

Added Files:
src/lib/libm/src: s_nexttowardf.c

Log Message:
one more


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/s_nexttowardf.c

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

Added files:

Index: src/lib/libm/src/s_nexttowardf.c
diff -u /dev/null src/lib/libm/src/s_nexttowardf.c:1.1
--- /dev/null	Sat Feb  9 14:39:01 2013
+++ src/lib/libm/src/s_nexttowardf.c	Sat Feb  9 14:39:01 2013
@@ -0,0 +1,65 @@
+/*	$NetBSD: s_nexttowardf.c,v 1.1 2013/02/09 19:39:01 christos Exp $	*/
+
+/*
+ * 
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * 
+ */
+
+#include sys/cdefs.h
+#if 0
+__FBSDID($FreeBSD: src/lib/msun/src/s_nexttowardf.c,v 1.3 2011/02/10 07:38:38 das Exp $);
+#else
+__RCSID($NetBSD: s_nexttowardf.c,v 1.1 2013/02/09 19:39:01 christos Exp $);
+#endif
+
+#include float.h
+
+#include fpmath.h
+#include math.h
+#include math_private.h
+
+#define	LDBL_INFNAN_EXP	(LDBL_MAX_EXP * 2 - 1)
+
+float
+nexttowardf(float x, long double y)
+{
+	union IEEEl2bits uy;
+	volatile float t;
+	int32_t hx,ix;
+
+	GET_FLOAT_WORD(hx,x);
+	ix = hx0x7fff;		/* |x| */
+	uy.e = y;
+
+	if((ix0x7f80) ||
+	   (uy.bits.exp == LDBL_INFNAN_EXP 
+	((uy.bits.manh~LDBL_NBIT)|uy.bits.manl) != 0))
+	   return x+y;	/* x or y is nan */
+	if(x==y) return (float)y;		/* x=y, return y */
+	if(ix==0) {/* x == 0 */
+	SET_FLOAT_WORD(x,(uy.bits.sign31)|1);/* return +-minsubnormal */
+	t = x*x;
+	if(t==x) return t; else return x;	/* raise underflow flag */
+	}
+	if(hx=0 ^ x  y)			/* x -= ulp */
+	hx -= 1;
+	else	/* x += ulp */
+	hx += 1;
+	ix = hx0x7f80;
+	if(ix=0x7f80) return x+x;	/* overflow  */
+	if(ix0x0080) {		/* underflow */
+	t = x*x;
+	if(t!=x) {		/* raise underflow flag */
+	SET_FLOAT_WORD(x,hx);
+		return x;
+	}
+	}
+	SET_FLOAT_WORD(x,hx);
+	return x;
+}



CVS commit: src/lib/libm

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 20:19:14 UTC 2013

Modified Files:
src/lib/libm: Makefile
src/lib/libm/src: s_nan.c s_nexttowardf.c

Log Message:
Make this work for NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/lib/libm/Makefile
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_nan.c \
src/lib/libm/src/s_nexttowardf.c

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.126 src/lib/libm/Makefile:1.127
--- src/lib/libm/Makefile:1.126	Sun Feb  3 02:13:07 2013
+++ src/lib/libm/Makefile	Sat Feb  9 15:19:13 2013
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.126 2013/02/03 07:13:07 matt Exp $
+#  $NetBSD: Makefile,v 1.127 2013/02/09 20:19:13 christos Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -66,7 +66,8 @@ COMMON_SRCS+= fenv.c
 .endif
 .PATH:	${.CURDIR}/arch/i387
 
-COMMON_SRCS+= fenv.c s_nextafterl.c s_nexttoward.c
+COMMON_SRCS+= fenv.c s_nextafterl.c s_nexttoward.c s_nexttowardf.c \
+	s_nearbyint.c # s_nan.c
 ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
 	e_logf.S e_log10.S e_log10f.S e_log2.S e_log2f.S e_remainder.S \
 	e_remainderf.S e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.S s_atan.S \
@@ -75,7 +76,7 @@ ARCH_SRCS = e_acos.S e_asin.S e_atan2.S 
 	s_ilogb.S s_ilogbf.S s_ilogbl.S s_log1p.S s_log1pf.S \
 	s_logb.S s_logbf.S s_logbl.S \
 	s_rint.S s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \
-	s_significandf.S s_sin.S s_sinf.S s_tan.S s_tanf.S lrint.S
+	s_significandf.S s_sin.S s_sinf.S s_tan.S s_tanf.S lrint.S 
 # do not pick up the i387 asm version, it is incorrect
 s_modf.o s_modf.pico s_modf.po s_modf.d: s_modf.c
 

Index: src/lib/libm/src/s_nan.c
diff -u src/lib/libm/src/s_nan.c:1.1 src/lib/libm/src/s_nan.c:1.2
--- src/lib/libm/src/s_nan.c:1.1	Sat Feb  9 14:37:48 2013
+++ src/lib/libm/src/s_nan.c	Sat Feb  9 15:19:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_nan.c,v 1.1 2013/02/09 19:37:48 christos Exp $	*/
+/*	$NetBSD: s_nan.c,v 1.2 2013/02/09 20:19:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 2007 David Schultz
@@ -28,17 +28,27 @@
  * $FreeBSD: src/lib/msun/src/s_nan.c,v 1.2 2007/12/18 23:46:32 das Exp $
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: s_nan.c,v 1.1 2013/02/09 19:37:48 christos Exp $);
+__RCSID($NetBSD: s_nan.c,v 1.2 2013/02/09 20:19:13 christos Exp $);
 
 #include sys/endian.h
 #include ctype.h
 #include float.h
 #include math.h
 #include stdint.h
-#include strings.h
+#include string.h
 
 #include math_private.h
 
+/* XXX: Locale? not here? in ctype.h? */
+static int
+digittoint(char s) {
+	if (isdigit((unsigned char)s))
+		return s - '0';
+	if (islower((unsigned char)s))
+		return s - 'a' + 10;
+	return s - 'A' + 10;
+}
+
 /*
  * Scan a string of hexadecimal digits (the format nan(3) expects) and
  * make a bit array (using the local endianness). We stop when we
@@ -51,21 +61,21 @@ __RCSID($NetBSD: s_nan.c,v 1.1 2013/02/
  * consider valid, so we might be violating the C standard. But it's
  * impossible to use nan(3) portably anyway, so this seems good enough.
  */
-void
+static void
 _scan_nan(uint32_t *words, int num_words, const char *s)
 {
 	int si;		/* index into s */
 	int bitpos;	/* index into words (in bits) */
 
-	bzero(words, num_words * sizeof(uint32_t));
+	memset(words, 0, num_words * sizeof(*words));
 
 	/* Allow a leading '0x'. (It's expected, but redundant.) */
 	if (s[0] == '0'  (s[1] == 'x' || s[1] == 'X'))
 		s += 2;
 
 	/* Scan forwards in the string, looking for the end of the sequence. */
-	for (si = 0; isxdigit(s[si]); si++)
-		;
+	for (si = 0; isxdigit((unsigned char)s[si]); si++)
+		continue;
 
 	/* Scan backwards, filling in the bits in words[] as we go. */
 #if _BYTE_ORDER == _LITTLE_ENDIAN
Index: src/lib/libm/src/s_nexttowardf.c
diff -u src/lib/libm/src/s_nexttowardf.c:1.1 src/lib/libm/src/s_nexttowardf.c:1.2
--- src/lib/libm/src/s_nexttowardf.c:1.1	Sat Feb  9 14:39:01 2013
+++ src/lib/libm/src/s_nexttowardf.c	Sat Feb  9 15:19:13 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_nexttowardf.c,v 1.1 2013/02/09 19:39:01 christos Exp $	*/
+/*	$NetBSD: s_nexttowardf.c,v 1.2 2013/02/09 20:19:13 christos Exp $	*/
 
 /*
  * 
@@ -15,35 +15,38 @@
 #if 0
 __FBSDID($FreeBSD: src/lib/msun/src/s_nexttowardf.c,v 1.3 2011/02/10 07:38:38 das Exp $);
 #else
-__RCSID($NetBSD: s_nexttowardf.c,v 1.1 2013/02/09 19:39:01 christos Exp $);
+__RCSID($NetBSD: s_nexttowardf.c,v 1.2 2013/02/09 20:19:13 christos Exp $);
 #endif
 
 #include float.h
 
-#include fpmath.h
 #include math.h
 #include math_private.h
 
-#define	LDBL_INFNAN_EXP	(LDBL_MAX_EXP * 2 - 1)
-
+#ifdef EXT_EXP_INFNAN
 float
 nexttowardf(float x, long double y)
 {
-	union IEEEl2bits uy;
 	volatile float t;
 	int32_t hx,ix;
+	union ieee_ext_u uy;
 
 	GET_FLOAT_WORD(hx,x);
 	ix = hx0x7fff;		/* |x| */
-	uy.e = 

CVS commit: src/etc/etc.evbarm

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 20:47:07 UTC 2013

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
get the kernel from the release directory.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.36 src/etc/etc.evbarm/Makefile.inc:1.37
--- src/etc/etc.evbarm/Makefile.inc:1.36	Sat Feb  9 13:59:19 2013
+++ src/etc/etc.evbarm/Makefile.inc	Sat Feb  9 15:47:06 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.36 2013/02/09 18:59:19 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.37 2013/02/09 20:47:06 christos Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -44,8 +44,9 @@ KERNEL_SETS+=		IXM1200 HDL_G
 .if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm \
 || ${MACHINE_ARCH} == earmhf
 KERNEL_SETS+=		RPI
-RPI.kernel=		${KERNSRCDIR}/arch/evbarm/compile/RPI/kernel.img
-RPI.img=		${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg/rpi.img
+RPI.rel=		${RELEASEDIR}/${RELEASEMACHINEDIR}
+RPI.kernel=		${RPI.rel}/installation/instkernel/netbsd-RPI.bin.gz
+RPI.img=		${RPI.rel}/binary/gzimg/rpi.img
 snap_md_post:
 	TOOL_MAKEFS=${TOOL_MAKEFS} \
 	TOOL_DISKLABEL=${TOOL_DISKLABEL} \



CVS commit: src/distrib/utils/embedded/conf

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 20:47:46 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: rpi.conf

Log Message:
handle renaming and uncompressing the kernel


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/utils/embedded/conf/rpi.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/rpi.conf
diff -u src/distrib/utils/embedded/conf/rpi.conf:1.15 src/distrib/utils/embedded/conf/rpi.conf:1.16
--- src/distrib/utils/embedded/conf/rpi.conf:1.15	Sat Feb  9 06:07:26 2013
+++ src/distrib/utils/embedded/conf/rpi.conf	Sat Feb  9 15:47:46 2013
@@ -1,9 +1,9 @@
-# $NetBSD: rpi.conf,v 1.15 2013/02/09 11:07:26 jmcneill Exp $
+# $NetBSD: rpi.conf,v 1.16 2013/02/09 20:47:46 christos Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
 board=rpi
-kernel=$src/sys/arch/evbarm/compile/RPI/kernel.img
+kernel=$src/sys/arch/evbarm/compile/RPI/netbsd-RPI.bin
 
 . ${DIR}/conf/evbarm.conf
 
@@ -42,7 +42,14 @@ EOF
 	fi
 
 	echo ${bar} installing kernel ${bar}
-	cp ${kernel} ${mnt}/boot
+	case ${kernel} in
+	*.gz)
+		gzcat ${kernel}  ${mnt}/boot/kernel.img
+		;;
+	*)
+		cp ${kernel} ${mnt}/boot/kernel.img
+		;;
+	esac
 
 	echo -n ${bar} installing firmware files:
 	(cd ${mnt}/boot 



CVS commit: src/sys/arch/evbarm/conf

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 20:48:38 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: mk.rpi

Log Message:
name the kernel like other evbarms


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/mk.rpi

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/evbarm/conf/mk.rpi
diff -u src/sys/arch/evbarm/conf/mk.rpi:1.2 src/sys/arch/evbarm/conf/mk.rpi:1.3
--- src/sys/arch/evbarm/conf/mk.rpi:1.2	Mon Dec 10 00:02:14 2012
+++ src/sys/arch/evbarm/conf/mk.rpi	Sat Feb  9 15:48:38 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mk.rpi,v 1.2 2012/12/10 05:02:14 matt Exp $
+#	$NetBSD: mk.rpi,v 1.3 2013/02/09 20:48:38 christos Exp $
 
 CPPFLAGS+= -march=armv6z -mtune=arm1176jzf-s -mfpu=vfp
 
@@ -13,5 +13,7 @@ KERNEL_BASE_PHYS=0x8000
 KERNEL_BASE_VIRT=0xc0008000
 
 SYSTEM_LD_TAIL_EXTRA+=; \
-	echo ${OBJCOPY} -S -O binary $@ kernel.img; \
-	${OBJCOPY} -S -O binary $@ kernel.img
+	echo ${OBJCOPY} -S -O binary $@ $@.bin; \
+	${OBJCOPY} -S -O binary $@ $@.bin
+
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}



CVS commit: src/sys/arch/evbarm/beagle

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 22:11:29 UTC 2013

Modified Files:
src/sys/arch/evbarm/beagle: beagle_machdep.c

Log Message:
fix BEAGLEBONEXM linking


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/evbarm/beagle/beagle_machdep.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/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.35 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.36
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.35	Mon Jan 14 06:23:48 2013
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c	Sat Feb  9 17:11:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: beagle_machdep.c,v 1.35 2013/01/14 11:23:48 jmcneill Exp $ */
+/*	$NetBSD: beagle_machdep.c,v 1.36 2013/02/09 22:11:29 christos Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.35 2013/01/14 11:23:48 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: beagle_machdep.c,v 1.36 2013/02/09 22:11:29 christos Exp $);
 
 #include opt_machdep.h
 #include opt_ddb.h
@@ -705,15 +705,14 @@ omap3530_memprobe(void)
 static bool
 beagle_read_edid(uint8_t *edid_buf, size_t edid_buflen)
 {
+#if defined(OMAP_3530)
 	i2c_tag_t ic = NULL;
 	uint8_t reg;
 	int error;
 
-#if defined(OMAP_3530)
 	/* On Beagleboard, EDID is accessed using I2C2 (omapiic2). */
 	extern i2c_tag_t omap3_i2c_get_tag(device_t);
 	ic = omap3_i2c_get_tag(device_find_by_xname(omapiic2));
-#endif
 
 	if (ic == NULL)
 		return false;
@@ -728,6 +727,9 @@ beagle_read_edid(uint8_t *edid_buf, size
 	iic_release_bus(ic, 0);
 
 	return error == 0 ? true : false;
+#else
+	return false;
+#endif
 }
 
 void



CVS commit: src/lib/libm/src

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 22:32:47 UTC 2013

Added Files:
src/lib/libm/src: s_rintl.c

Log Message:
FreeBSD version


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libm/src/s_rintl.c

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

Added files:

Index: src/lib/libm/src/s_rintl.c
diff -u /dev/null src/lib/libm/src/s_rintl.c:1.1
--- /dev/null	Sat Feb  9 17:32:47 2013
+++ src/lib/libm/src/s_rintl.c	Sat Feb  9 17:32:47 2013
@@ -0,0 +1,90 @@
+/*-
+ * Copyright (c) 2008 David Schultz d...@freebsd.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD: src/lib/msun/src/s_rintl.c,v 1.5 2008/02/22 11:59:05 bde Exp $);
+
+#include float.h
+#include math.h
+
+#include fpmath.h
+
+#if LDBL_MAX_EXP != 0x4000
+/* We also require the usual bias, min exp and expsign packing. */
+#error Unsupported long double format
+#endif
+
+#define	BIAS	(LDBL_MAX_EXP - 1)
+
+static const float
+shift[2] = {
+#if LDBL_MANT_DIG == 64
+	0x1.0p63, -0x1.0p63
+#elif LDBL_MANT_DIG == 113
+	0x1.0p112, -0x1.0p112
+#else
+#error Unsupported long double format
+#endif
+};
+static const float zero[2] = { 0.0, -0.0 };
+
+long double
+rintl(long double x)
+{
+	union IEEEl2bits u;
+	uint32_t expsign;
+	int ex, sign;
+
+	u.e = x;
+	expsign = u.xbits.expsign;
+	ex = expsign  0x7fff;
+
+	if (ex = BIAS + LDBL_MANT_DIG - 1) {
+		if (ex == BIAS + LDBL_MAX_EXP)
+			return (x + x);	/* Inf, NaN, or unsupported format */
+		return (x);		/* finite and already an integer */
+	}
+	sign = expsign  15;
+
+	/*
+	 * The following code assumes that intermediate results are
+	 * evaluated in long double precision. If they are evaluated in
+	 * greater precision, double rounding may occur, and if they are
+	 * evaluated in less precision (as on i386), results will be
+	 * wildly incorrect.
+	 */
+	x += shift[sign];
+	x -= shift[sign];
+
+	/*
+	 * If the result is +-0, then it must have the same sign as x, but
+	 * the above calculation doesn't always give this.  Fix up the sign.
+	 */
+	if (ex  BIAS  x == 0.0L)
+		return (zero[sign]);
+
+	return (x);
+}



CVS commit: src/lib/libm

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 22:33:13 UTC 2013

Modified Files:
src/lib/libm: Makefile
src/lib/libm/src: s_rintl.c

Log Message:
Hook to the build.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/lib/libm/Makefile
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_rintl.c

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.127 src/lib/libm/Makefile:1.128
--- src/lib/libm/Makefile:1.127	Sat Feb  9 15:19:13 2013
+++ src/lib/libm/Makefile	Sat Feb  9 17:33:13 2013
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.127 2013/02/09 20:19:13 christos Exp $
+#  $NetBSD: Makefile,v 1.128 2013/02/09 22:33:13 christos Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -67,7 +67,7 @@ COMMON_SRCS+= fenv.c
 .PATH:	${.CURDIR}/arch/i387
 
 COMMON_SRCS+= fenv.c s_nextafterl.c s_nexttoward.c s_nexttowardf.c \
-	s_nearbyint.c # s_nan.c
+	s_nearbyint.c s_rintl.c # s_nan.c
 ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
 	e_logf.S e_log10.S e_log10f.S e_log2.S e_log2f.S e_remainder.S \
 	e_remainderf.S e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.S s_atan.S \

Index: src/lib/libm/src/s_rintl.c
diff -u src/lib/libm/src/s_rintl.c:1.1 src/lib/libm/src/s_rintl.c:1.2
--- src/lib/libm/src/s_rintl.c:1.1	Sat Feb  9 17:32:47 2013
+++ src/lib/libm/src/s_rintl.c	Sat Feb  9 17:33:13 2013
@@ -1,3 +1,5 @@
+/*	$NetBSD: s_rintl.c,v 1.2 2013/02/09 22:33:13 christos Exp $	*/
+
 /*-
  * Copyright (c) 2008 David Schultz d...@freebsd.org
  * All rights reserved.
@@ -25,25 +27,21 @@
  */
 
 #include sys/cdefs.h
+#if 0
 __FBSDID($FreeBSD: src/lib/msun/src/s_rintl.c,v 1.5 2008/02/22 11:59:05 bde Exp $);
+#else
+__RCSID($NetBSD: s_rintl.c,v 1.2 2013/02/09 22:33:13 christos Exp $);
+#endif
 
 #include float.h
 #include math.h
 
-#include fpmath.h
-
-#if LDBL_MAX_EXP != 0x4000
-/* We also require the usual bias, min exp and expsign packing. */
-#error Unsupported long double format
-#endif
-
-#define	BIAS	(LDBL_MAX_EXP - 1)
-
+#ifdef EXT_EXP_BIAS
 static const float
 shift[2] = {
-#if LDBL_MANT_DIG == 64
+#if EXT_FRACBITS == 64
 	0x1.0p63, -0x1.0p63
-#elif LDBL_MANT_DIG == 113
+#elif EXT_FRACBITS == 113
 	0x1.0p112, -0x1.0p112
 #else
 #error Unsupported long double format
@@ -54,16 +52,17 @@ static const float zero[2] = { 0.0, -0.0
 long double
 rintl(long double x)
 {
-	union IEEEl2bits u;
+	union ieee_ext_u u;
 	uint32_t expsign;
 	int ex, sign;
 
-	u.e = x;
-	expsign = u.xbits.expsign;
+	u.extu_ld = x;
+	u.extu_ext.ext_frach = ~0x8000;
+	expsign = u.extu_ext.ext_sign;
 	ex = expsign  0x7fff;
 
-	if (ex = BIAS + LDBL_MANT_DIG - 1) {
-		if (ex == BIAS + LDBL_MAX_EXP)
+	if (ex = EXT_EXP_BIAS + EXT_FRACBITS - 1) {
+		if (ex == EXT_EXP_BIAS + EXT_FRACBITS)
 			return (x + x);	/* Inf, NaN, or unsupported format */
 		return (x);		/* finite and already an integer */
 	}
@@ -83,8 +82,9 @@ rintl(long double x)
 	 * If the result is +-0, then it must have the same sign as x, but
 	 * the above calculation doesn't always give this.  Fix up the sign.
 	 */
-	if (ex  BIAS  x == 0.0L)
+	if (ex  EXT_EXP_BIAS  x == 0.0L)
 		return (zero[sign]);
 
 	return (x);
 }
+#endif



CVS commit: src/lib/libm/src

2013-02-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  9 22:56:00 UTC 2013

Modified Files:
src/lib/libm/src: s_ilogb.c s_ilogbf.c s_ilogbl.c

Log Message:
Use FP_ILOGB0 and FP_ILOGBNAN


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libm/src/s_ilogb.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/s_ilogbf.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_ilogbl.c

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

Modified files:

Index: src/lib/libm/src/s_ilogb.c
diff -u src/lib/libm/src/s_ilogb.c:1.13 src/lib/libm/src/s_ilogb.c:1.14
--- src/lib/libm/src/s_ilogb.c:1.13	Thu Jul 28 22:32:29 2011
+++ src/lib/libm/src/s_ilogb.c	Sat Feb  9 22:56:00 2013
@@ -12,7 +12,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBM_SCCS)  !defined(lint)
-__RCSID($NetBSD: s_ilogb.c,v 1.13 2011/07/28 22:32:29 joerg Exp $);
+__RCSID($NetBSD: s_ilogb.c,v 1.14 2013/02/09 22:56:00 matt Exp $);
 #endif
 
 /* ilogb(double x)
@@ -38,7 +38,7 @@ ilogb(double x)
 	if(hx0x0010) {
 	GET_LOW_WORD(lx,x);
 	if((hx|lx)==0)
-		return 0x8001;	/* ilogb(0) = 0x8001 */
+		return FP_ILOGB0;	/* ilogb(0) = 0x8001 */
 	else			/* subnormal x */
 		if(hx==0) {
 		for (ix = -1043; lx0; lx=1) ix -=1;
@@ -48,5 +48,5 @@ ilogb(double x)
 	return ix;
 	}
 	else if (hx0x7ff0) return (hx20)-1023;
-	else return 0x7fff;
+	else return FP_ILOGBNAN;	/* inf too */
 }

Index: src/lib/libm/src/s_ilogbf.c
diff -u src/lib/libm/src/s_ilogbf.c:1.7 src/lib/libm/src/s_ilogbf.c:1.8
--- src/lib/libm/src/s_ilogbf.c:1.7	Sun May 26 22:01:56 2002
+++ src/lib/libm/src/s_ilogbf.c	Sat Feb  9 22:56:00 2013
@@ -15,7 +15,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBM_SCCS)  !defined(lint)
-__RCSID($NetBSD: s_ilogbf.c,v 1.7 2002/05/26 22:01:56 wiz Exp $);
+__RCSID($NetBSD: s_ilogbf.c,v 1.8 2013/02/09 22:56:00 matt Exp $);
 #endif
 
 #include math.h
@@ -30,11 +30,11 @@ ilogbf(float x)
 	hx = 0x7fff;
 	if(hx0x0080) {
 	if(hx==0)
-		return 0x8001;	/* ilogb(0) = 0x8001 */
+		return FP_ILOGB0;	/* ilogb(0) = 0x8001 */
 	else			/* subnormal x */
 	for (ix = -126,hx=8; hx0; hx=1) ix -=1;
 	return ix;
 	}
 	else if (hx0x7f80) return (hx23)-127;
-	else return 0x7fff;
+	else return FP_ILOGBNAN;	/* inf too */
 }

Index: src/lib/libm/src/s_ilogbl.c
diff -u src/lib/libm/src/s_ilogbl.c:1.1 src/lib/libm/src/s_ilogbl.c:1.2
--- src/lib/libm/src/s_ilogbl.c:1.1	Thu Jul 28 22:32:29 2011
+++ src/lib/libm/src/s_ilogbl.c	Sat Feb  9 22:56:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_ilogbl.c,v 1.1 2011/07/28 22:32:29 joerg Exp $	*/
+/*	$NetBSD: s_ilogbl.c,v 1.2 2013/02/09 22:56:00 matt Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: s_ilogbl.c,v 1.1 2011/07/28 22:32:29 joerg Exp $);
+__RCSID($NetBSD: s_ilogbl.c,v 1.2 2013/02/09 22:56:00 matt Exp $);
 
 #include namespace.h
 
@@ -54,12 +54,12 @@ ilogbl(long double x)
 	union ieee_ext_u u;
 
 	if (x == 0.0L)
-		return 0x8001;	/* ilogbl(0) = 0x8001 */
+		return FP_ILOGB0;	/* ilogbl(0) = 0x8001 */
 
 	u.extu_ld = x;
 
 	if (u.extu_ext.ext_exp == EXT_EXP_INFNAN)
-		return 0x7fff;
+		return FP_ILOGBNAN;	/* inf too */
 
 	if (u.extu_ext.ext_exp == 0) {
 		/*



CVS commit: src/include

2013-02-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  9 22:56:20 UTC 2013

Modified Files:
src/include: math.h

Log Message:
Define FP_ILOGB0 and FP_ILOGBNAN


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/include/math.h

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

Modified files:

Index: src/include/math.h
diff -u src/include/math.h:1.59 src/include/math.h:1.60
--- src/include/math.h:1.59	Mon Jan 28 23:19:28 2013
+++ src/include/math.h	Sat Feb  9 22:56:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.59 2013/01/28 23:19:28 matt Exp $	*/
+/*	$NetBSD: math.h,v 1.60 2013/02/09 22:56:20 matt Exp $	*/
 
 /*
  * 
@@ -38,6 +38,7 @@ union __long_double_u {
 
 #include machine/math.h		/* may use __float_u, __double_u,
 	   or __long_double_u */
+#include limits.h			/* for INT_{MIN,MAX} */
 
 #ifdef __HAVE_LONG_DOUBLE
 #define	__fpmacro_unary_floating(__name, __arg0)			\
@@ -116,6 +117,9 @@ extern const union __float_u __nanf;
 #define	_FP_LOMD	0x80		/* range for machine-specific classes */
 #define	_FP_HIMD	0xff
 
+#define	FP_ILOGB0	INT_MIN
+#define	FP_ILOGBNAN	INT_MIN
+
 #endif /* !_ANSI_SOURCE  ... */
 
 /*



CVS commit: src/lib/libm/src

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb  9 23:14:44 UTC 2013

Modified Files:
src/lib/libm/src: s_nearbyint.c s_nexttowardf.c s_rintl.c

Log Message:
make these only work for things that have EXT_ foo definitions.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/s_nearbyint.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/src/s_nexttowardf.c \
src/lib/libm/src/s_rintl.c

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

Modified files:

Index: src/lib/libm/src/s_nearbyint.c
diff -u src/lib/libm/src/s_nearbyint.c:1.1 src/lib/libm/src/s_nearbyint.c:1.2
--- src/lib/libm/src/s_nearbyint.c:1.1	Sat Feb  9 14:37:48 2013
+++ src/lib/libm/src/s_nearbyint.c	Sat Feb  9 18:14:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_nearbyint.c,v 1.1 2013/02/09 19:37:48 christos Exp $	*/
+/*	$NetBSD: s_nearbyint.c,v 1.2 2013/02/09 23:14:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004 David Schultz d...@freebsd.org
@@ -30,9 +30,10 @@
 #if 0
 __FBSDID($FreeBSD: src/lib/msun/src/s_nearbyint.c,v 1.2 2008/01/14 02:12:06 das Exp $);
 #else
-__RCSID($NetBSD: s_nearbyint.c,v 1.1 2013/02/09 19:37:48 christos Exp $);
+__RCSID($NetBSD: s_nearbyint.c,v 1.2 2013/02/09 23:14:44 christos Exp $);
 #endif
 
+#include machine/ieee.h
 #include fenv.h
 #include math.h
 
@@ -58,4 +59,6 @@ fn(type x)			\
 
 DECL(double, nearbyint, rint)
 DECL(float, nearbyintf, rintf)
+#ifdef EXT_FRACBITS
 DECL(long double, nearbyintl, rintl)
+#endif

Index: src/lib/libm/src/s_nexttowardf.c
diff -u src/lib/libm/src/s_nexttowardf.c:1.2 src/lib/libm/src/s_nexttowardf.c:1.3
--- src/lib/libm/src/s_nexttowardf.c:1.2	Sat Feb  9 15:19:13 2013
+++ src/lib/libm/src/s_nexttowardf.c	Sat Feb  9 18:14:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_nexttowardf.c,v 1.2 2013/02/09 20:19:13 christos Exp $	*/
+/*	$NetBSD: s_nexttowardf.c,v 1.3 2013/02/09 23:14:44 christos Exp $	*/
 
 /*
  * 
@@ -15,10 +15,12 @@
 #if 0
 __FBSDID($FreeBSD: src/lib/msun/src/s_nexttowardf.c,v 1.3 2011/02/10 07:38:38 das Exp $);
 #else
-__RCSID($NetBSD: s_nexttowardf.c,v 1.2 2013/02/09 20:19:13 christos Exp $);
+__RCSID($NetBSD: s_nexttowardf.c,v 1.3 2013/02/09 23:14:44 christos Exp $);
 #endif
 
+#include string.h
 #include float.h
+#include machine/ieee.h
 
 #include math.h
 #include math_private.h
@@ -34,15 +36,13 @@ nexttowardf(float x, long double y)
 	GET_FLOAT_WORD(hx,x);
 	ix = hx0x7fff;		/* |x| */
 
-	memset(u, 0, sizeof u);
+	memset(uy, 0, sizeof(uy));
 	uy.extu_ld = y;
 	uy.extu_ext.ext_frach = ~0x8000;
 
-union ieee_single_u u[2];
-
 	if((ix0x7f80) ||
 	   (uy.extu_ext.ext_exp == EXT_EXP_INFNAN 
-	(uy.extu_ext.ext_frach | uy.extu_ext.ext_fracl) != 0)
+	(uy.extu_ext.ext_frach | uy.extu_ext.ext_fracl) != 0))
 	   return x+y;	/* x or y is nan */
 	if(x==y) return (float)y;		/* x=y, return y */
 	if(ix==0) {/* x == 0 */
@@ -50,7 +50,7 @@ nexttowardf(float x, long double y)
 	t = x*x;
 	if(t==x) return t; else return x;	/* raise underflow flag */
 	}
-	if(hx=0 ^ x  y)			/* x -= ulp */
+	if((hx = 0) ^ (x  y))			/* x -= ulp */
 	hx -= 1;
 	else	/* x += ulp */
 	hx += 1;
Index: src/lib/libm/src/s_rintl.c
diff -u src/lib/libm/src/s_rintl.c:1.2 src/lib/libm/src/s_rintl.c:1.3
--- src/lib/libm/src/s_rintl.c:1.2	Sat Feb  9 17:33:13 2013
+++ src/lib/libm/src/s_rintl.c	Sat Feb  9 18:14:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_rintl.c,v 1.2 2013/02/09 22:33:13 christos Exp $	*/
+/*	$NetBSD: s_rintl.c,v 1.3 2013/02/09 23:14:44 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 David Schultz d...@freebsd.org
@@ -30,11 +30,14 @@
 #if 0
 __FBSDID($FreeBSD: src/lib/msun/src/s_rintl.c,v 1.5 2008/02/22 11:59:05 bde Exp $);
 #else
-__RCSID($NetBSD: s_rintl.c,v 1.2 2013/02/09 22:33:13 christos Exp $);
+__RCSID($NetBSD: s_rintl.c,v 1.3 2013/02/09 23:14:44 christos Exp $);
 #endif
 
 #include float.h
-#include math.h
+#include machine/ieee.h
+
+#include math.h
+#include math_private.h
 
 #ifdef EXT_EXP_BIAS
 static const float



CVS commit: src/etc/etc.evbarm

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 10 01:24:41 UTC 2013

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Follow a different approach to install the kernel and compress the image.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.37 src/etc/etc.evbarm/Makefile.inc:1.38
--- src/etc/etc.evbarm/Makefile.inc:1.37	Sat Feb  9 15:47:06 2013
+++ src/etc/etc.evbarm/Makefile.inc	Sat Feb  9 20:24:40 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.37 2013/02/09 20:47:06 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.38 2013/02/10 01:24:40 christos Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -43,10 +43,10 @@ KERNEL_SETS+=		IXM1200 HDL_G
 
 .if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == earm \
 || ${MACHINE_ARCH} == earmhf
-KERNEL_SETS+=		RPI
+EXTRA_KERNELS+=		RPI
 RPI.rel=		${RELEASEDIR}/${RELEASEMACHINEDIR}
-RPI.kernel=		${RPI.rel}/installation/instkernel/netbsd-RPI.bin.gz
-RPI.img=		${RPI.rel}/binary/gzimg/rpi.img
+RPI.kernel=		${RPI.rel}/binary/kernel/netbsd-RPI.bin.gz
+RPI.img=		${RPI.rel}/binary/gzimg/rpi.img.gz
 snap_md_post:
 	TOOL_MAKEFS=${TOOL_MAKEFS} \
 	TOOL_DISKLABEL=${TOOL_DISKLABEL} \



CVS commit: src/distrib/utils/embedded

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 10 01:28:43 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
add compression support.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.21 src/distrib/utils/embedded/mkimage:1.22
--- src/distrib/utils/embedded/mkimage:1.21	Sat Feb  9 13:50:11 2013
+++ src/distrib/utils/embedded/mkimage	Sat Feb  9 20:28:42 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.21 2013/02/09 18:50:11 christos Exp $
+# $NetBSD: mkimage,v 1.22 2013/02/10 01:28:42 christos Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -118,6 +118,11 @@ if [ -n $1 ]; then
 	shift
 fi
 
+case $image in
+*.gz)	compress=true; image=${image%.gz};;
+*)	compress=false;;
+esac
+
 echo ${bar} configuring sets ${bar}
 (echo '/set type=dir uname=root gname=wheel mode=0755'
 for i in $selected_sets; do
@@ -152,4 +157,11 @@ if [ -n ${msdosid} ]; then
 	echo ${bar} Running fdisk ${bar}
 	${FDISK} -f -u -0 -s ${msdosid}/${init}/${boot} -F ${image}
 fi
+
+if $compress; then
+	echo ${bar} Compressing image ${bar}
+	gzip -9 ${image}
+	image=${image}.gz
+fi
+
 echo ${bar} Image is ${image} ${bar}



CVS commit: src/distrib/utils/embedded

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 10 02:09:47 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
- remove dup trap
- compare size to 0 for autosizing
- remove .gz file before compressing.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.22 src/distrib/utils/embedded/mkimage:1.23
--- src/distrib/utils/embedded/mkimage:1.22	Sat Feb  9 20:28:42 2013
+++ src/distrib/utils/embedded/mkimage	Sat Feb  9 21:09:47 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.22 2013/02/10 01:28:42 christos Exp $
+# $NetBSD: mkimage,v 1.23 2013/02/10 02:09:47 christos Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -49,6 +49,7 @@ bar
 tmp=$(mktemp -d /tmp/$PROG.XX)
 mnt=${tmp}/mnt
 mkdir -p ${mnt}/etc ${mnt}/dev ${mnt}/boot
+
 trap cleanup 0 1 2 3 15
 
 cleanup() {
@@ -109,8 +110,6 @@ do
 	esac
 done
 
-trap cleanup 0 1 2 3 15
-
 shift $(( $OPTIND - 1 ))
 if [ -n $1 ]; then
 	# take the next argument as being the image name
@@ -145,10 +144,10 @@ echo ${bar} Populating ffs filesystem ${
 ${MAKEFS} -t ffs -rx -O $(((${init} + ${boot} + ${swap}) / 2))m \
 -F $tmp/selected_sets ${image} ${release} ${mnt}
 
-if [ -z $size ]; then
-	size=$(getsize ${image})
+if [ ${size} = 0 ]; then
+	size=$(getsize ${image})
 fi
-newsize=$((size / 2 / 1024))
+newsize=$((${size} / 2 / 1024))
 
 echo ${bar} Adding label ${bar}
 make_label  ${tmp}/label
@@ -160,6 +159,7 @@ fi
 
 if $compress; then
 	echo ${bar} Compressing image ${bar}
+	rm -f ${image}.gz
 	gzip -9 ${image}
 	image=${image}.gz
 fi



CVS commit: src/distrib/utils/embedded

2013-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 10 03:09:08 UTC 2013

Modified Files:
src/distrib/utils/embedded: mkimage

Log Message:
really calling disklabel with the arguments of fdisk does not work.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/utils/embedded/mkimage

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

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.23 src/distrib/utils/embedded/mkimage:1.24
--- src/distrib/utils/embedded/mkimage:1.23	Sat Feb  9 21:09:47 2013
+++ src/distrib/utils/embedded/mkimage	Sat Feb  9 22:09:07 2013
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.23 2013/02/10 02:09:47 christos Exp $
+# $NetBSD: mkimage,v 1.24 2013/02/10 03:09:07 christos Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,7 +36,7 @@ DIR=$(cd $(dirname $0)  pwd)
 PROG=$(basename $0)
 
 DISKLABEL=${TOOL_DISKLABEL:-disklabel}
-FDISK=${TOOL_DISKLABEL:-fdisk}
+FDISK=${TOOL_FDISK:-fdisk}
 MAKEFS=${TOOL_MAKEFS:-makefs}
 
 src=/usr/src