From owner-freebsd-current Sun Jan 23 5:15:31 2000 Delivered-To: freebsd-current@freebsd.org Received: from blaubaer.kn-bremen.de (blaubaer.kn-bremen.de [195.37.179.254]) by hub.freebsd.org (Postfix) with ESMTP id 660D91510E for ; Sun, 23 Jan 2000 05:15:24 -0800 (PST) (envelope-from nox@saturn.kn-bremen.de) Received: from saturn.kn-bremen.de (uucp@localhost) by blaubaer.kn-bremen.de (8.9.1/8.9.1) with UUCP id OAA08361; Sun, 23 Jan 2000 14:06:04 +0100 Received: (from nox@localhost) by saturn.kn-bremen.de (8.9.3/8.8.5) id NAA74825; Sun, 23 Jan 2000 13:47:55 +0100 (CET) Date: Sun, 23 Jan 2000 13:47:55 +0100 (CET) From: Juergen Lock Message-Id: <200001231247.NAA74825@saturn.kn-bremen.de> To: dgilbert@velocet.ca Subject: cross-building a kernel (was: On a lighter note... how-to upgrade) X-Newsgroups: local.list.freebsd.current In-Reply-To: <14474.15305.507542.292721@trooper.velocet.net> Organization: home Cc: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 (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