Index: sys/conf/kern.opts.mk =================================================================== --- sys/conf/kern.opts.mk +++ sys/conf/kern.opts.mk @@ -37,6 +37,7 @@ IPSEC_SUPPORT \ ISCSI \ KERNEL_SYMBOLS \ + LINUX_EMULATION \ NETGRAPH \ PF \ REPRODUCIBLE_BUILD \ @@ -82,6 +83,7 @@ # Things that don't work because the kernel doesn't have the support # for them. .if ${MACHINE} != "i386" && ${MACHINE} != "amd64" +BROKEN_OPTIONS+= LINUX_EMULATION BROKEN_OPTIONS+= OFED .endif Index: sys/modules/Makefile =================================================================== --- sys/modules/Makefile +++ sys/modules/Makefile @@ -221,11 +221,6 @@ libalias \ libiconv \ libmchain \ - ${_linprocfs} \ - ${_linsysfs} \ - ${_linux} \ - ${_linux_common} \ - ${_linux64} \ linuxkpi \ ${_lio} \ lmc \ @@ -489,6 +484,19 @@ SUBDIR+= iscsi_initiator .endif +.if ${MK_LINUX_EMULATION} != "no" || defined(ALL_MODULES) +.if ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= linux64 +SUBDIR+= linux_common +.endif + +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +SUBDIR+= linprocfs +SUBDIR+= linsysfs +SUBDIR+= linux +.endif +.endif + .if ${MK_NAND} != "no" || defined(ALL_MODULES) _nandfs= nandfs _nandsim= nandsim @@ -601,9 +609,6 @@ .endif _ix= ix _ixv= ixv -_linprocfs= linprocfs -_linsysfs= linsysfs -_linux= linux .if ${MK_SOURCELESS_UCODE} != "no" _lio= lio .endif @@ -711,8 +716,6 @@ _ioat= ioat _ixl= ixl _ixlv= ixlv -_linux64= linux64 -_linux_common= linux_common _ntb= ntb _pms= pms _qlxge= qlxge Index: tools/build/options/WITHOUT_LINUX_EMULATION =================================================================== --- /dev/null +++ tools/build/options/WITHOUT_LINUX_EMULATION @@ -0,0 +1,6 @@ +.\" $FreeBSD$ +Set to not build the Linux emulation kernel module and the +.Xr linprocfs 5 +and +.Xr linsysfs 5 +file systems. Index: tools/build/options/WITH_LINUX_EMULATION =================================================================== --- /dev/null +++ tools/build/options/WITH_LINUX_EMULATION @@ -0,0 +1,6 @@ +.\" $FreeBSD$ +Set to build the Linux emulation kernel module and the +.Xr linprocfs 5 +and +.Xr linsysfs 5 +file systems.