Module Name:    src
Committed By:   martin
Date:           Mon Mar 31 11:43:53 UTC 2014

Modified Files:
        src/sys/arch/playstation2/conf: Makefile.playstation2.inc
            build.playstation2.sh config.playstation2 files.playstation2
            std.playstation2

Log Message:
Adapt to current (and new pkgsrc toolchain)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
    src/sys/arch/playstation2/conf/Makefile.playstation2.inc \
    src/sys/arch/playstation2/conf/build.playstation2.sh
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/playstation2/conf/config.playstation2
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/playstation2/conf/files.playstation2
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/playstation2/conf/std.playstation2

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/playstation2/conf/Makefile.playstation2.inc
diff -u src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.4 src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.5
--- src/sys/arch/playstation2/conf/Makefile.playstation2.inc:1.4	Mon Mar 31 11:25:49 2014
+++ src/sys/arch/playstation2/conf/Makefile.playstation2.inc	Mon Mar 31 11:43:53 2014
@@ -1,20 +1,25 @@
-#	$NetBSD: Makefile.playstation2.inc,v 1.4 2014/03/31 11:25:49 martin Exp $
+#	$NetBSD: Makefile.playstation2.inc,v 1.5 2014/03/31 11:43:53 martin Exp $
 
-EETOOLDIR	=	/usr/pkg/cross-ps2
-TARGET	=	mipsEEel-netbsd
+.if !defined(TOOLCHAIN_MISSING) || ${TOOLCHAIN_MISSING}=="no"
+.error please do not run "make" directly, use sh ../../conf/build.playstation2.sh instead
+.endif
 
-CC	=	${EETOOLDIR}/bin/${TARGET}-gcc
-LD	=	${EETOOLDIR}/bin/${TARGET}-ld
-CXX	=	${EETOOLDIR}/bin/${TARGET}-g++
-AS	=	${EETOOLDIR}/bin/${TARGET}-as
-CPP	=	${EETOOLDIR}/bin/${TARGET}-cpp
-RANLIB	=	${EETOOLDIR}/bin/${TARGET}-ranlib
-AR	=	${EETOOLDIR}/bin/${TARGET}-ar
-NM	=	${EETOOLDIR}/bin/${TARGET}-nm
-SIZE	=	${EETOOLDIR}/bin/${TARGET}-size
-STRIP	=	${EETOOLDIR}/bin/${TARGET}-strip
+# working around makesystem bugs: redefine CC and friends here or it does
+# not properly get picked up by mkdep in sub-makes for "make depend" of
+# libkern and friends - XXX fix this
+PREFIX=/usr/pkg
+PLATFORM=mips--netbsdelf
 
-CFLAGS+= -mcpu=r5900 -mips1 -fno-pic \
-		-D__NetBSD__ -Ulinux -U__linux__ -U__linux
-AFLAGS+= -mcpu=r5900 -mips1 -fno-pic \
-		-D__NetBSD__ -Ulinux -U__linux__ -U__linux
+CC=${PREFIX}/bin/${PLATFORM}-gcc
+CPP=${PREFIX}/bin/${PLATFORM}-cpp
+AS=${PREFIX}/bin/${PLATFORM}-as
+AR=${PREFIX}/bin/${PLATFORM}-ar
+LD=${PREFIX}/bin/${PLATFORM}-ld
+RANLIB=${PREFIX}/bin/${PLATFORM}-ranlib
+NM=${PREFIX}/bin/${PLATFORM}-nm
+SIZE=${PREFIX}/bin/${PLATFORM}-size
+STRIP=${PREFIX}/bin/${PLATFORM}-strip
+
+# Playstation2 uses 128 bit access, which currently requires n32 ABI
+CFLAGS+= -mabi=n32 -march=r5900 -fno-pic
+AFLAGS+= -mabi=n32 -march=r5900 -fno-pic
Index: src/sys/arch/playstation2/conf/build.playstation2.sh
diff -u src/sys/arch/playstation2/conf/build.playstation2.sh:1.4 src/sys/arch/playstation2/conf/build.playstation2.sh:1.5
--- src/sys/arch/playstation2/conf/build.playstation2.sh:1.4	Mon Mar 31 11:25:49 2014
+++ src/sys/arch/playstation2/conf/build.playstation2.sh	Mon Mar 31 11:43:53 2014
@@ -1,17 +1,14 @@
 #!/bin/sh
-DESTDIR=/work/playstation2/root;	export DESTDIR
-RELEASEDIR=/work/playstation2/release;	export RELEASEDIR
-root=/usr/pkg/cross-ps2
-target=mipsEEel-netbsd
 
-PATH=\
-$PATH:\
-${root}/${target}/bin:\
-${root}/bin
-export PATH
+# This assumes the compiler comes from pkgsrc/cross/gcc-mips-current
+# (as R5900 support is not available on other branches of gcc yet)
+root=/usr/pkg
+target=mips--netbsdelf
+
+TOOLCHAIN_MISSING=yes;			export TOOLCHAIN_MISSING
 
-CC=${root}/bin/${target}-gcc;		export CC
 LD=${root}/bin/${target}-ld;		export LD
+CC=${root}/bin/${target}-gcc;		export CC
 CXX=${root}/bin/${target}-g++;		export CXX
 AS=${root}/bin/${target}-as;		export AS
 CPP=${root}/bin/${target}-cpp;		export CPP
@@ -21,21 +18,7 @@ NM=${root}/bin/${target}-nm;		export NM
 SIZE=${root}/bin/${target}-size;	export SIZE
 STRIP=${root}/bin/${target}-strip;	export STRIP
 
-STRIPFLAGS="--strip-debug";		export STRIPFLAGS
-STRIPPROG=${target}-strip;		export STRIPPROG
-
-HOSTED_CC=cc;				export HOSTED_CC
-
-TARGET=mipsel;				export TARGET
-MACHINE=playstation2;			export MACHINE
-MACHINE_ARCH=mipsel;			export MACHINE_ARCH
-MACHINE_CPU=mips;			export MACHINE_CPU
-
-DESTDIR=${bsd_root};			export DESTDIR
-
 MAKE="make";				 export MAKE
-#MAKE="make -f /work/cvsrep/sharesrc/share/mk/sys.mk -f Makefile"; export MAKE
-#MAKEFLAGS="-I /work/cvsrep/sharesrc/share/mk";	export MAKEFLAGS
 
 set -x
 exec $MAKE "$@"

Index: src/sys/arch/playstation2/conf/config.playstation2
diff -u src/sys/arch/playstation2/conf/config.playstation2:1.24 src/sys/arch/playstation2/conf/config.playstation2:1.25
--- src/sys/arch/playstation2/conf/config.playstation2:1.24	Mon Mar 31 11:25:49 2014
+++ src/sys/arch/playstation2/conf/config.playstation2	Mon Mar 31 11:43:53 2014
@@ -1,7 +1,7 @@
 #
 # deafult config file.
 #
-# 	$NetBSD: config.playstation2,v 1.24 2014/03/31 11:25:49 martin Exp $
+# 	$NetBSD: config.playstation2,v 1.25 2014/03/31 11:43:53 martin Exp $
 #
 
 maxusers	16
@@ -79,7 +79,6 @@ pseudo-device	bpfilter		# packet filter 
 pseudo-device	ipfilter		# IP filter, NAT
 
 pseudo-device	vnd			# virtual disk ick
-pseudo-device	rnd			# /dev/random and in-kernel generator
 pseudo-device	clockctl		# user control of clock subsystem
 
 pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)

Index: src/sys/arch/playstation2/conf/files.playstation2
diff -u src/sys/arch/playstation2/conf/files.playstation2:1.20 src/sys/arch/playstation2/conf/files.playstation2:1.21
--- src/sys/arch/playstation2/conf/files.playstation2:1.20	Mon Mar 31 11:25:49 2014
+++ src/sys/arch/playstation2/conf/files.playstation2	Mon Mar 31 11:43:53 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.playstation2,v 1.20 2014/03/31 11:25:49 martin Exp $
+#	$NetBSD: files.playstation2,v 1.21 2014/03/31 11:43:53 martin Exp $
 
 maxpartitions 8
 
@@ -25,7 +25,7 @@ file arch/playstation2/playstation2/mach
 file arch/playstation2/playstation2/sifbios.c
 file arch/mips/mips/mips3_clock.c
 
-file common/bus_dma/bus_dmamem_common.c
+file dev/bus_dma/bus_dmamem_common.c
 
 file dev/kloader.c					kloader
 file arch/playstation2/playstation2/kloader_machdep.c	kloader

Index: src/sys/arch/playstation2/conf/std.playstation2
diff -u src/sys/arch/playstation2/conf/std.playstation2:1.10 src/sys/arch/playstation2/conf/std.playstation2:1.11
--- src/sys/arch/playstation2/conf/std.playstation2:1.10	Mon Mar 31 11:25:49 2014
+++ src/sys/arch/playstation2/conf/std.playstation2	Mon Mar 31 11:43:53 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: std.playstation2,v 1.10 2014/03/31 11:25:49 martin Exp $
+#	$NetBSD: std.playstation2,v 1.11 2014/03/31 11:43:53 martin Exp $
 
 machine playstation2 mips
 include		"conf/std"	# MI standard options

Reply via email to