From owner-freebsd-questions Mon Nov 4 4:49:48 2002 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 045B637B401 for ; Mon, 4 Nov 2002 04:49:47 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id E53C143E4A for ; Mon, 4 Nov 2002 04:49:45 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gA4CneMO017732 for ; Mon, 4 Nov 2002 12:49:40 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id gA4CnZrT017731 for freebsd-questions@FreeBSD.ORG; Mon, 4 Nov 2002 12:49:35 GMT Date: Mon, 4 Nov 2002 12:49:35 +0000 From: Matthew Seaman To: freebsd-questions@FreeBSD.ORG Subject: Re: Kernel Building Message-ID: <20021104124935.GC16056@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , freebsd-questions@FreeBSD.ORG References: <1036386197.57682.28.camel@lobo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1036386197.57682.28.camel@lobo> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-14.7 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03, USER_AGENT,USER_AGENT_MUTT version=2.41 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Nov 03, 2002 at 11:03:17PM -0600, Ryan Sommers wrote: > I'm assuming it's possible to build a kernel for a different computer > then it's compiled on as long as they are the same architecture. How do > I go about compiling my kernel for my laptop on my desktop? First I > don't think the laptop could hold the source and more importantly I > think the 850 box will compile it faster then the 200mhz laptop. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/small-lan.html First make sure that /etc/make.conf settings are compatible with both machines --- pay particular attention to the CPUTYPE variable. Copy the /etc/make.conf file to both machines. Copy the kernel config for your laptop into /usr/src/sys/i386/conf on the build machine. To build a kernel for the laptop, log into the build machine and just: cd /usr/src make buildkernel KERNCONF=LAPTOP then NFS mount the /usr/src and /usr/obj directories on the laptop, and (while logged into the laptop) run: make installkernel KERNCONF=LAPTOP You'll want to do likewise with buildworld and installworld so the kernel and userland are in synch on both machines, obviously. As a convenience, on the build machine you can set KERNCONF to a list of kernel configs. All will be built, but the first one is assumed to be the build machine's own config. It's quite handy to add the correct KERNCONF setting to /etc/make.conf on each machine. eg. KERNCONF = BUILDBOX LAPTOP on the build box, and KERNCONF = LAPTOP on the laptop. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message