Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jan 2000 13:47:55 +0100 (CET)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        dgilbert@velocet.ca
Cc:        freebsd-current@FreeBSD.ORG
Subject:   cross-building a kernel (was: On a lighter note... how-to upgrade)
Message-ID:  <200001231247.NAA74825@saturn.kn-bremen.de>
In-Reply-To: <14474.15305.507542.292721@trooper.velocet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <14474.15305.507542.292721@trooper.velocet.net> you write:
>I have followed the UPDATES file... and I have source-make-world
>upgraded several machines from 3.3 and 3.4 to 4.0-CURRENT recently.  I 
>thought I'd contribute a method that is reasonably likely to work and
>reasonably likely to not be going overboard.  Someone should maintain
>a file like this.
>
>(generate things needed to make kernel)
>make all->install usr.sbin/config
>make all->install usr.bin/genassym
>
>(it appears that a lot of things don't work right until the new kernel 
> is in place, and it can be installed first)
>make 4.0 kernel
>reboot with 4.0 kernel
>...

I recently had to build a -current kernel on -stable too, and ended
up with this in the config file:

makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols

# kernel cross-build...
makeoptions	CC=gcc295
options 	__FreeBSD__=4
# needed?
options 	unix
options 	__FreeBSD_cc_version=400003

 I don't know if the last two are really needed and the DEBUG of course
is optional too, but without the others my kernel wouldn't even build.
(I forgot what exactly failed with the old cc, but the __FreeBSD__=4
is necessary for parts that use #ifdefs to decide things like which
version of a kernel interface to use, the case of this i saw was in the
isdn stuff.  Of course this produces redifinition warnings so probably
should be done some other way but at least it works... :)

 Regards,
-- 
Juergen Lock <nox.foo@jelal.kn-bremen.de>
(remove dot foo from address to reply)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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