summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-13 17:56:30 -0200
committerRenato Botelho <renato@netgate.com>2016-01-13 17:56:30 -0200
commit3e0bf52f358eb969d165c4b1e54942ee94cf2c8d (patch)
tree440bb9907871a5bc578d65b32f0c4aa339096175 /sys/modules
parent4b4ac714f11471e43f18410bcc86da8f9dc3b88c (diff)
parente357bdb742b2696dcb81404917b6247f9e840232 (diff)
downloadFreeBSD-src-3e0bf52f358eb969d165c4b1e54942ee94cf2c8d.zip
FreeBSD-src-3e0bf52f358eb969d165c4b1e54942ee94cf2c8d.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/Makefile4
-rw-r--r--sys/modules/i2c/controllers/Makefile2
-rw-r--r--sys/modules/i2c/controllers/ismt/Makefile8
-rw-r--r--sys/modules/if_gif/Makefile13
-rw-r--r--sys/modules/linprocfs/Makefile7
-rw-r--r--sys/modules/linsysfs/Makefile7
-rw-r--r--sys/modules/linux/Makefile53
-rw-r--r--sys/modules/linux64/Makefile55
-rw-r--r--sys/modules/linux_common/Makefile25
-rw-r--r--sys/modules/pseudofs/Makefile6
10 files changed, 149 insertions, 31 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 609c72c..5135093 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -197,6 +197,8 @@ SUBDIR= \
${_linprocfs} \
${_linsysfs} \
${_linux} \
+ ${_linux_common} \
+ ${_linux64} \
lmc \
lpt \
mac_biba \
@@ -749,6 +751,8 @@ _lindev= lindev
_linprocfs= linprocfs
_linsysfs= linsysfs
_linux= linux
+_linux64= linux64
+_linux_common= linux_common
_mly= mly
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mlx4= mlx4
diff --git a/sys/modules/i2c/controllers/Makefile b/sys/modules/i2c/controllers/Makefile
index c9d9fbb..2b4432f 100644
--- a/sys/modules/i2c/controllers/Makefile
+++ b/sys/modules/i2c/controllers/Makefile
@@ -3,7 +3,7 @@
.if ${MACHINE} == "pc98"
SUBDIR = lpbb
.else
-SUBDIR = alpm amdpm amdsmb ichsmb intpm nfsmb viapm lpbb pcf
+SUBDIR = alpm amdpm amdsmb ichsmb intpm ismt nfsmb viapm lpbb pcf
.endif
.include <bsd.subdir.mk>
diff --git a/sys/modules/i2c/controllers/ismt/Makefile b/sys/modules/i2c/controllers/ismt/Makefile
new file mode 100644
index 0000000..411bab1
--- /dev/null
+++ b/sys/modules/i2c/controllers/ismt/Makefile
@@ -0,0 +1,8 @@
+#$FreeBSD$
+
+.PATH: ${.CURDIR}/../../../../dev/ismt
+KMOD = ismt
+SRCS = device_if.h bus_if.h iicbb_if.h pci_if.h smbus_if.h \
+ ismt.c
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/if_gif/Makefile b/sys/modules/if_gif/Makefile
index a501dd6..d8ba44c 100644
--- a/sys/modules/if_gif/Makefile
+++ b/sys/modules/if_gif/Makefile
@@ -5,11 +5,18 @@
.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6
KMOD= if_gif
-SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mrouting.h
+SRCS= if_gif.c opt_inet.h opt_inet6.h opt_mrouting.h
.if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
+.endif
+.else
+OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo
+.if empty(OPT_INET)
+MK_INET_SUPPORT= no
+.endif
.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
@@ -25,6 +32,10 @@ MK_INET6_SUPPORT= no
.endif
.endif
+.if ${MK_INET_SUPPORT} != "no"
+SRCS+= in_gif.c
+.endif
+
.if ${MK_INET6_SUPPORT} != "no"
SRCS+= in6_gif.c
.endif
diff --git a/sys/modules/linprocfs/Makefile b/sys/modules/linprocfs/Makefile
index 4b1b375..979429f 100644
--- a/sys/modules/linprocfs/Makefile
+++ b/sys/modules/linprocfs/Makefile
@@ -5,11 +5,6 @@
KMOD= linprocfs
SRCS= vnode_if.h \
device_if.h bus_if.h \
- linprocfs.c \
- opt_compat.h
-
-.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+=-DCOMPAT_LINUX32
-.endif
+ linprocfs.c
.include <bsd.kmod.mk>
diff --git a/sys/modules/linsysfs/Makefile b/sys/modules/linsysfs/Makefile
index 4017967..13230ff 100644
--- a/sys/modules/linsysfs/Makefile
+++ b/sys/modules/linsysfs/Makefile
@@ -5,11 +5,6 @@
KMOD= linsysfs
SRCS= vnode_if.h \
device_if.h bus_if.h pci_if.h \
- linsysfs.c \
- opt_compat.h
-
-.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+=-DCOMPAT_LINUX32
-.endif
+ linsysfs.c
.include <bsd.kmod.mk>
diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile
index c10cb10..0e70ce6 100644
--- a/sys/modules/linux/Makefile
+++ b/sys/modules/linux/Makefile
@@ -7,15 +7,18 @@ CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32
.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_CPUARCH}/linux${SFX}
+VDSO= linux${SFX}_vdso
+
KMOD= linux
-SRCS= linux_fork.c linux${SFX}_dummy.c linux_emul.c linux_file.c \
+SRCS= linux_fork.c linux${SFX}_dummy.c linux_file.c linux_event.c \
linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \
- linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \
+ linux${SFX}_machdep.c linux_misc.c linux_signal.c \
linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \
- linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \
- linux_timer.c \
+ linux${SFX}_sysvec.c linux_uid16.c linux_time.c \
+ linux_timer.c linux_vdso.c \
opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \
- vnode_if.h device_if.h bus_if.h assym.s
+ vnode_if.h device_if.h bus_if.h assym.s \
+ linux${SFX}_support.s
DPSRCS= linux${SFX}_genassym.c
# XXX: for assym.s
@@ -24,37 +27,50 @@ SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h
SRCS+= opt_apic.h
.endif
-OBJS= linux${SFX}_locore.o linux${SFX}_support.o
+OBJS= ${VDSO}.so
.if ${MACHINE_CPUARCH} == "i386"
-SRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h
+SRCS+= linux_ptrace.c imgact_linux.c linux_util.c linux_mib.c \
+ linux_emul.c opt_cpu.h linux.c
.endif
+.if ${MACHINE_CPUARCH} == "i386"
EXPORT_SYMS=
EXPORT_SYMS+= linux_emul_path
EXPORT_SYMS+= linux_get_osname
EXPORT_SYMS+= linux_get_osrelease
-EXPORT_SYMS+= linux_ifname
EXPORT_SYMS+= linux_ioctl_register_handler
EXPORT_SYMS+= linux_ioctl_unregister_handler
+.endif
-CLEANFILES= linux${SFX}_assym.h linux${SFX}_genassym.o
+CLEANFILES= linux${SFX}_assym.h linux${SFX}_genassym.o linux${SFX}_locore.o
linux${SFX}_assym.h: linux${SFX}_genassym.o
-.if exists(@)
-linux${SFX}_assym.h: @/kern/genassym.sh
-.endif
- sh @/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET}
+ sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET}
-linux${SFX}_locore.o: linux${SFX}_locore.s linux${SFX}_assym.h
- ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
+linux${SFX}_locore.o: linux${SFX}_assym.h assym.s
+ ${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s \
+ -pipe -I. -I${SYSDIR} -Werror -Wall -fno-common -nostdinc -nostdlib \
+ -fno-omit-frame-pointer \
+ -Wl,-T${.CURDIR}/../../${MACHINE_CPUARCH}/linux${SFX}/${VDSO}.lds.s \
+ -Wl,-soname=${VDSO}.so.1,--eh-frame-hdr,-fPIC,-warn-common \
${.IMPSRC} -o ${.TARGET}
-linux${SFX}_support.o: linux${SFX}_support.s assym.s linux${SFX}_assym.h
+linux${SFX}_support.o: linux${SFX}_assym.h assym.s
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
-linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine x86
+.if ${MACHINE_CPUARCH} == "amd64"
+${VDSO}.so: linux${SFX}_locore.o
+ ${OBJCOPY} --input-target binary --output-target elf64-x86-64-freebsd \
+ --binary-architecture i386 linux${SFX}_locore.o ${.TARGET}
+.else
+${VDSO}.so: linux${SFX}_locore.o
+ ${OBJCOPY} --input-target binary --output-target elf32-i386-freebsd \
+ --binary-architecture i386 linux${SFX}_locore.o ${.TARGET}
+.endif
+
+linux${SFX}_genassym.o:
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
.if !defined(KERNBUILDDIR)
@@ -63,6 +79,9 @@ opt_inet6.h:
.if defined(KTR)
CFLAGS+= -DKTR
.endif
+.if defined(DEBUG)
+CFLAGS+= -DDEBUG
+.endif
.endif
.include <bsd.kmod.mk>
diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile
new file mode 100644
index 0000000..1656323
--- /dev/null
+++ b/sys/modules/linux64/Makefile
@@ -0,0 +1,55 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_ARCH}/linux
+
+VDSO= linux_vdso
+
+KMOD= linux64
+SRCS= linux_fork.c linux_dummy.c linux_file.c linux_event.c \
+ linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \
+ linux_machdep.c linux_misc.c linux_signal.c \
+ linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \
+ linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \
+ opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \
+ vnode_if.h device_if.h bus_if.h assym.s \
+ linux_support.s
+DPSRCS= linux_genassym.c
+
+# XXX: for assym.s
+SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_hwpmc_hooks.h
+
+CLEANFILES= linux_assym.h linux_genassym.o linux_locore.o
+
+OBJS= ${VDSO}.so
+
+linux_assym.h: linux_genassym.o
+ sh ${SYSDIR}/kern/genassym.sh linux_genassym.o > ${.TARGET}
+
+linux_locore.o: linux_locore.s linux_assym.h
+ ${CC} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \
+ -pipe -I. -I${SYSDIR} -Werror -Wall -fno-common -nostdinc \
+ -Wl,-T${.CURDIR}/../../${MACHINE_CPUARCH}/linux/${VDSO}.lds.s \
+ -Wl,-soname=${VDSO}.so.1,-fPIC,-warn-common -nostdlib \
+ ${.IMPSRC} -o ${.TARGET}
+
+${VDSO}.so: linux_locore.o
+ ${OBJCOPY} --input-target binary --output-target elf64-x86-64-freebsd \
+ -S -g --binary-architecture i386:x86-64 linux_locore.o ${.TARGET}
+
+linux_support.o: assym.s linux_assym.h
+ ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
+ ${.IMPSRC} -o ${.TARGET}
+
+linux_genassym.o:
+ ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
+
+.if !defined(KERNBUILDDIR)
+.if defined(DEBUG)
+CFLAGS+=-DDEBUG
+.endif
+.if defined(KTR)
+CFLAGS+=-DKTR
+.endif
+.endif
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile
new file mode 100644
index 0000000..91449f7
--- /dev/null
+++ b/sys/modules/linux_common/Makefile
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../compat/linux
+
+KMOD= linux_common
+SRCS= linux_common.c linux_mib.c linux_util.c linux_emul.c \
+ linux.c opt_compat.h device_if.h vnode_if.h bus_if.h
+
+EXPORT_SYMS=
+EXPORT_SYMS+= linux_emul_path
+EXPORT_SYMS+= linux_ioctl_register_handler
+EXPORT_SYMS+= linux_ioctl_unregister_handler
+EXPORT_SYMS+= linux_get_osname
+EXPORT_SYMS+= linux_get_osrelease
+
+.if !defined(KERNBUILDDIR)
+.if defined(DEBUG)
+CFLAGS+=-DDEBUG
+.endif
+.if defined(KTR)
+CFLAGS+=-DKTR
+.endif
+.endif
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/pseudofs/Makefile b/sys/modules/pseudofs/Makefile
index d5696c5..6ddb749 100644
--- a/sys/modules/pseudofs/Makefile
+++ b/sys/modules/pseudofs/Makefile
@@ -23,4 +23,10 @@ EXPORT_SYMS= pfs_mount \
pfs_enable \
pfs_destroy
+.if !defined(KERNBUILDDIR)
+.if defined(PSEUDOFS_TRACE)
+CFLAGS+=-DPSEUDOFS_TRACE
+.endif
+.endif
+
.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud