Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Nov 2002 12:49:35 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Kernel Building
Message-ID:  <20021104124935.GC16056@happy-idiot-talk.infracaninophi>
In-Reply-To: <1036386197.57682.28.camel@lobo>
References:  <1036386197.57682.28.camel@lobo>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021104124935.GC16056>