From owner-freebsd-questions@FreeBSD.ORG Sat Oct 30 13:15:21 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFF4216A4CE for ; Sat, 30 Oct 2004 13:15:21 +0000 (GMT) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07D6943D31 for ; Sat, 30 Oct 2004 13:15:18 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 16654 invoked by uid 207); 30 Oct 2004 13:15:16 -0000 Received: from keramida@ceid.upatras.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.190):. Processed in 0.835475 secs); 30 Oct 2004 13:15:16 -0000 Received: from dialup190.ach.sch.gr (HELO gothmog.gr) ([81.186.70.190]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 30 Oct 2004 13:15:14 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i9UDFCgW041567; Sat, 30 Oct 2004 16:15:12 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i9UDFCS8041566; Sat, 30 Oct 2004 16:15:12 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 30 Oct 2004 16:15:12 +0300 From: Giorgos Keramidas To: Brad Waite Message-ID: <20041030131511.GB41290@gothmog.gr> References: <2614.67.165.234.240.1099073745.squirrel@webmail.wcubed.net> <20041029183742.GB76157@dan.emsphone.com> <20041029202605.GC1046@gothmog.gr> <3019.67.165.234.240.1099114217.squirrel@webmail.wcubed.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3019.67.165.234.240.1099114217.squirrel@webmail.wcubed.net> cc: freebsd-questions@freebsd.org Subject: Re: Building part of world X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 13:15:22 -0000 On 2004-10-29 23:30, Brad Waite wrote: > > Brave people might even get away by building the sk module only, by > > emulating the specific part of the kernel build: > > > > # cd /usr/src/sys/modules/sk > > # env MAKEOBJDIRPREFIX=/tmp/sk \ > > KMODDIR=/boot/kernel DEBUG_FLAGS="-g" MACHINE=i386 \ > > KERNBUILDDIR="/usr/obj/usr/src/sys/MYKERNEL" make obj > > # env MAKEOBJDIRPREFIX=/tmp/sk \ > > KMODDIR=/boot/kernel DEBUG_FLAGS="-g" MACHINE=i386 \ > > KERNBUILDDIR="/usr/obj/usr/src/sys/MYKERNEL" make all > > > > If all this works, you can just kldload the new if_sk.ko from > > `/tmp/sk/usr/src/sys/modules/sk' to test your changes. > > Wow, Giorgos, this really *does* help. It never dawned on me that FBSD > even supported loadable kernel modules. Feel kinda sheepish now, but hey, > I guess you learn something new every day. > > In my stumbling around since you've enlightened me, I noticed a sk/ dir in > /usr/src/sys/modules, and in there a Makefile. 'make install' apparently > builds the .ko and installs it into /modules. > > Am I missing something here, or is this the way to go? No, you're not missing anything. I used the environment variables to keep the /usr/src tree as clean as possible, but what you describe works too :-)