From owner-freebsd-questions@FreeBSD.ORG Thu Jan 3 12:57:19 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6C73F16F for ; Thu, 3 Jan 2013 12:57:19 +0000 (UTC) (envelope-from info@martinlaabs.de) Received: from relay02.alfahosting-server.de (relay02.alfahosting-server.de [109.237.142.238]) by mx1.freebsd.org (Postfix) with ESMTP id 266A96D7 for ; Thu, 3 Jan 2013 12:57:18 +0000 (UTC) Received: by relay02.alfahosting-server.de (Postfix, from userid 1001) id 499B332C0E97; Thu, 3 Jan 2013 13:57:10 +0100 (CET) X-Spam-DCC: : X-Spam-Level: X-Spam-Status: No, score=0.0 required=7.0 tests=BAYES_50 autolearn=disabled version=3.2.5 Received: from alfa3018.alfahosting-server.de (alfa3018.alfahosting-server.de [109.237.140.30]) by relay02.alfahosting-server.de (Postfix) with ESMTP id DC77732C0E96 for ; Thu, 3 Jan 2013 13:57:08 +0100 (CET) Received: from pc.martinlaabs.de (p54B34C1B.dip.t-dialin.net [84.179.76.27]) by alfa3018.alfahosting-server.de (Postfix) with ESMTPSA id A8B68515C179 for ; Thu, 3 Jan 2013 13:57:08 +0100 (CET) Message-ID: <50E58023.9050000@martinlaabs.de> Date: Thu, 03 Jan 2013 13:57:07 +0100 From: Martin Laabs User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: FreeBSD Questions Subject: Build linux,ko kernel module standalone X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Status: No X-Virus-Checker-Version: clamassassin 1.2.4 with ClamAV 0.97.3/16321/Thu Jan 3 11:39:17 2013 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2013 12:57:19 -0000 Hello, if I wanna build a kernel module standalone (without the kernel e.g. for testing) I do it the following way (wlan in this example): cd /usr/src/sys/modules/wlan make all maybe make install if I wanna install it. Now I want do build the linux.ko module with the symbol DEBUG defined and tried the following: cd /usr/src/sys/modules/linux make -DDEBUG all but unfortunately this ends up with: cc -c -O2 -pipe -march=athlon64 -DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option /usr/src/sys/modules/linux/../../amd64/linux32/linux32_genassym.c In file included from ./machine/param.h:46, from @/sys/param.h:115, from /usr/src/sys/modules/linux/../../amd64/linux32/linux32_genassym.c:4: ./machine/_align.h:6:24: error: x86/_align.h: No such file or directory Building the module insinde a make buildkernel works fine - so there are actually no missing files. Do you have any ideas what I'am missing? Thank you, Martin Laabs