Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Move i386 and amd64 usermode configurations to their respect...
details: https://anonhg.NetBSD.org/src/rev/5d0457423b3d
branches: trunk
changeset: 779945:5d0457423b3d
user: reinoud <reinoud%NetBSD.org@localhost>
date: Sat Jun 30 15:03:56 2012 +0000
description:
Move i386 and amd64 usermode configurations to their respective directories
and make the usermode kernels buildalbe under build.sh.
The resulting kernels are build and packaged correctly as are the associated
modules.
diffstat:
distrib/sets/lists/modules/md.amd64 | 4 +++-
distrib/sets/lists/modules/md.i386 | 4 +++-
etc/etc.amd64/Makefile.inc | 3 ++-
etc/etc.i386/Makefile.inc | 3 ++-
sys/arch/amd64/conf/GENERIC_USERMODE | 20 ++++++++++++++++++++
sys/arch/i386/conf/GENERIC_USERMODE | 20 ++++++++++++++++++++
sys/arch/usermode/conf/GENERIC.amd64 | 20 --------------------
sys/arch/usermode/conf/GENERIC.i386 | 20 --------------------
sys/arch/usermode/conf/Makefile.usermode | 15 +++++++++++++--
sys/modules/Makefile | 10 +++++++++-
10 files changed, 72 insertions(+), 47 deletions(-)
diffs (236 lines):
diff -r ecf3f0a608dc -r 5d0457423b3d distrib/sets/lists/modules/md.amd64
--- a/distrib/sets/lists/modules/md.amd64 Sat Jun 30 12:42:37 2012 +0000
+++ b/distrib/sets/lists/modules/md.amd64 Sat Jun 30 15:03:56 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.32 2012/01/17 16:59:37 jakllsch Exp $
+# $NetBSD: md.amd64,v 1.33 2012/06/30 15:03:56 reinoud Exp $
./@MODULEDIR@/acpiacad base-kernel-modules kmod
./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod
./@MODULEDIR@/acpibat base-kernel-modules kmod
@@ -101,6 +101,8 @@
./@MODULEDIR@/powernow/powernow.kmod base-kernel-modules kmod
./@MODULEDIR@/pwdog base-kernel-modules kmod
./@MODULEDIR@/pwdog/pwdog.kmod base-kernel-modules kmod
+./@MODULEDIR@/syscallemu base-kernel-modules kmod
+./@MODULEDIR@/syscallemu/syscallemu.kmod base-kernel-modules kmod
./@MODULEDIR@/thinkpad base-kernel-modules kmod
./@MODULEDIR@/thinkpad/thinkpad.kmod base-kernel-modules kmod
./@MODULEDIR@/tprof_amdpmi base-kernel-modules kmod
diff -r ecf3f0a608dc -r 5d0457423b3d distrib/sets/lists/modules/md.i386
--- a/distrib/sets/lists/modules/md.i386 Sat Jun 30 12:42:37 2012 +0000
+++ b/distrib/sets/lists/modules/md.i386 Sat Jun 30 15:03:56 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.38 2012/01/17 16:59:38 jakllsch Exp $
+# $NetBSD: md.i386,v 1.39 2012/06/30 15:03:56 reinoud Exp $
./@MODULEDIR@/acpiacad base-kernel-modules kmod
./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod
./@MODULEDIR@/acpibat base-kernel-modules kmod
@@ -121,6 +121,8 @@
./@MODULEDIR@/savagedrm/savagedrm.kmod base-kernel-modules kmod
./@MODULEDIR@/sisdrm base-kernel-modules kmod
./@MODULEDIR@/sisdrm/sisdrm.kmod base-kernel-modules kmod
+./@MODULEDIR@/syscallemu base-kernel-modules kmod
+./@MODULEDIR@/syscallemu/syscallemu.kmod base-kernel-modules kmod
./@MODULEDIR@/tdfxdrm base-kernel-modules kmod
./@MODULEDIR@/tdfxdrm/tdfxdrm.kmod base-kernel-modules kmod
./@MODULEDIR@/thinkpad base-kernel-modules kmod
diff -r ecf3f0a608dc -r 5d0457423b3d etc/etc.amd64/Makefile.inc
--- a/etc/etc.amd64/Makefile.inc Sat Jun 30 12:42:37 2012 +0000
+++ b/etc/etc.amd64/Makefile.inc Sat Jun 30 15:03:56 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.12 2011/01/18 00:22:56 jym Exp $
+# $NetBSD: Makefile.inc,v 1.13 2012/06/30 15:03:57 reinoud Exp $
#
# etc.amd64/Makefile.inc -- amd64-specific etc Makefile targets
#
@@ -8,6 +8,7 @@
KERNEL_SETS= GENERIC
KERNEL_SETS+= XEN3_DOM0 XEN3_DOMU
+KERNEL_SETS+= GENERIC_USERMODE
BUILD_KERNELS= INSTALL INSTALL_XEN3_DOMU
diff -r ecf3f0a608dc -r 5d0457423b3d etc/etc.i386/Makefile.inc
--- a/etc/etc.i386/Makefile.inc Sat Jun 30 12:42:37 2012 +0000
+++ b/etc/etc.i386/Makefile.inc Sat Jun 30 15:03:56 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.65 2011/02/10 00:43:20 jym Exp $
+# $NetBSD: Makefile.inc,v 1.66 2012/06/30 15:03:57 reinoud Exp $
#
# etc.i386/Makefile.inc -- i386-specific etc Makefile targets
#
@@ -12,6 +12,7 @@
KERNEL_SETS+= XEN3_DOMU
KERNEL_SETS+= XEN3PAE_DOM0
KERNEL_SETS+= XEN3PAE_DOMU
+KERNEL_SETS+= GENERIC_USERMODE
# KERNEL_SETS+= GENERIC_TINY
# KERNEL_SETS+= GENERIC_PS2TINY
diff -r ecf3f0a608dc -r 5d0457423b3d sys/arch/amd64/conf/GENERIC_USERMODE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amd64/conf/GENERIC_USERMODE Sat Jun 30 15:03:56 2012 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: GENERIC_USERMODE,v 1.1 2012/06/30 15:03:57 reinoud Exp $
+
+machine usermode
+include "arch/usermode/conf/GENERIC.common"
+include "arch/amd64/conf/majors.amd64"
+
+no options EXEC_ELF32
+
+options INSECURE # required by sysinst
+
+options TEXTADDR=0x40000000 # 1 Gb `phys ram' / total space
+options KVMSIZE= 0x10000000 # KVM space reserved in VM map, 256 Mb
+options NKMEMPAGES_MAX=32768 # 128 Mb max
+
+makeoptions COPTS+="-m64"
+makeoptions LD="ld -melf_amd64"
+
+#options INCLUDE_CONFIG_FILE
+#ident "GENERIC32-$Revision: 1.1 $"
+
diff -r ecf3f0a608dc -r 5d0457423b3d sys/arch/i386/conf/GENERIC_USERMODE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/conf/GENERIC_USERMODE Sat Jun 30 15:03:56 2012 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: GENERIC_USERMODE,v 1.1 2012/06/30 15:03:57 reinoud Exp $
+
+machine usermode
+include "arch/usermode/conf/GENERIC.common"
+include "arch/i386/conf/majors.i386"
+
+no options EXEC_ELF64
+
+options INSECURE # required by sysinst
+
+options TEXTADDR=0x40000000 # 1 Gb `phys ram' / total space
+options KVMSIZE= 0x10000000 # KVM space reserved in VM map, 256 Mb
+options NKMEMPAGES_MAX=32768 # 128 Mb max
+
+makeoptions COPTS+="-m32"
+makeoptions LD="ld -melf_i386"
+
+#options INCLUDE_CONFIG_FILE
+#ident "GENERIC32-$Revision: 1.1 $"
+
diff -r ecf3f0a608dc -r 5d0457423b3d sys/arch/usermode/conf/GENERIC.amd64
--- a/sys/arch/usermode/conf/GENERIC.amd64 Sat Jun 30 12:42:37 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# $NetBSD: GENERIC.amd64,v 1.3 2012/01/15 00:25:33 jmcneill Exp $
-
-machine usermode
-include "arch/usermode/conf/GENERIC.common"
-include "arch/amd64/conf/majors.amd64"
-
-no options EXEC_ELF32
-
-options INSECURE # required by sysinst
-
-options TEXTADDR=0x40000000 # 1 Gb `phys ram' / total space
-options KVMSIZE= 0x10000000 # KVM space reserved in VM map, 256 Mb
-options NKMEMPAGES_MAX=32768 # 128 Mb max
-
-makeoptions COPTS+="-m64"
-makeoptions LD="ld -melf_amd64"
-
-#options INCLUDE_CONFIG_FILE
-#ident "GENERIC32-$Revision: 1.3 $"
-
diff -r ecf3f0a608dc -r 5d0457423b3d sys/arch/usermode/conf/GENERIC.i386
--- a/sys/arch/usermode/conf/GENERIC.i386 Sat Jun 30 12:42:37 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# $NetBSD: GENERIC.i386,v 1.5 2012/01/15 00:25:33 jmcneill Exp $
-
-machine usermode
-include "arch/usermode/conf/GENERIC.common"
-include "arch/i386/conf/majors.i386"
-
-no options EXEC_ELF64
-
-options INSECURE # required by sysinst
-
-options TEXTADDR=0x40000000 # 1 Gb `phys ram' / total space
-options KVMSIZE= 0x10000000 # KVM space reserved in VM map, 256 Mb
-options NKMEMPAGES_MAX=32768 # 128 Mb max
-
-makeoptions COPTS+="-m32"
-makeoptions LD="ld -melf_i386"
-
-#options INCLUDE_CONFIG_FILE
-#ident "GENERIC32-$Revision: 1.5 $"
-
diff -r ecf3f0a608dc -r 5d0457423b3d sys/arch/usermode/conf/Makefile.usermode
--- a/sys/arch/usermode/conf/Makefile.usermode Sat Jun 30 12:42:37 2012 +0000
+++ b/sys/arch/usermode/conf/Makefile.usermode Sat Jun 30 15:03:56 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.31 2012/01/07 20:44:41 reinoud Exp $
+# $NetBSD: Makefile.usermode,v 1.32 2012/06/30 15:03:57 reinoud Exp $
USETOOLS?= no
NEED_OWN_INSTALL_TARGET?= no
@@ -9,17 +9,27 @@
##
USERMODE= $S/arch/usermode
GENASSYM_CONF= ${USERMODE}/usermode/genassym.cf
+
+## support for crosscompiling
+.if ${MACHINE_ARCH:Uunset} == "unset"
MACHINE_ARCH!=uname -p
+.endif
##
## (2) compile settings
##
USERMODE_HOSTOS!=uname -s
USERMODE_HOSTMACHINE!=uname -m
-USERMODE_LIBS= -lc -lrt
+USERMODE_LIBS= -L${DESTDIR}/usr/lib -lrt
USERMODE_CPPFLAGS=${DEBUG} -U_KERNEL -I/usr/include
USERMODE_CPPFLAGS+=${CWARNFLAGS} ${NOGCCERROR:D:U-Werror}
+## XXX hack to make it work under build.sh
+.if ${TOOLDIR:Uno} != "no"
+USERMODE_LIBS+= crti.o
+SYSTEM_LD_FIX= cp ${DESTDIR}/usr/lib/crt0.o ${DESTDIR}/usr/lib/crtbegin.o ${DESTDIR}/usr/lib/crtend.o ${DESTDIR}/usr/lib/crti.o .;
+.endif
+
.if ${USERMODE_HOSTOS} == "Linux"
USERMODE_LIBS+= -lpthread
CPPFLAGS+=-Dstrtoul=netbsd_strtoul
@@ -63,6 +73,7 @@
SYSTEM_LD= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \
${_MKSHECHO}\
${CC} -static ${COPTS} -Wl,-Map,$@.map -o $@ ${LINKFORMAT} -Ttext ${TEXTADDR} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o ${USERMODE_LIBS}; \
+ ${SYSTEM_LD_FIX} \
${CC} -static ${COPTS} -Wl,-Map,$@.map -o $@ ${LINKFORMAT} -Ttext ${TEXTADDR} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o ${USERMODE_LIBS}
NVFLAGS= -n
diff -r ecf3f0a608dc -r 5d0457423b3d sys/modules/Makefile
--- a/sys/modules/Makefile Sat Jun 30 12:42:37 2012 +0000
+++ b/sys/modules/Makefile Sat Jun 30 15:03:56 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.106 2012/04/26 03:03:53 christos Exp $
+# $NetBSD: Makefile,v 1.107 2012/06/30 15:03:57 reinoud Exp $
.include <bsd.own.mk>
@@ -215,6 +215,14 @@
.include <bsd.own.mk>
+#
+# NetBSD/usermode support
+#
+.if ${MACHINE_ARCH} == "i386" || \
+ ${MACHINE_ARCH} == "x86_64"
+SUBDIR+= ../arch/usermode/modules/syscallemu
+.endif
+
# we need our device mapper for LVM
.if (${MKLVM} != "no")
SUBDIR+= dm
Home |
Main Index |
Thread Index |
Old Index