Date: Fri, 25 Nov 2011 17:13:12 +0000 From: "b. f." <bf1783@googlemail.com> To: Thomas Mueller <mueller6727@bellsouth.net> Cc: freebsd-questions@freebsd.org Subject: Re: Quick build of stripped-down kernel Message-ID: <CAGFTUwNQvW4CuVoKfGjEQaFEhqH_5xg9KAAtOZSTTOPwQ%2BYT=g@mail.gmail.com> In-Reply-To: <4ecf1dca.22d1440a.2dd2.3464SMTPIN_ADDED@mx.google.com> References: <CAGFTUwP-SRSq22QbqZC42sDgocwsxEU6d-A-TAATkBn4KirxOA@mail.gmail.com> <4ecf1dca.22d1440a.2dd2.3464SMTPIN_ADDED@mx.google.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/25/11, Thomas Mueller <mueller6727@bellsouth.net> wrote: > from "b. f." <bf1783@googlemail.com>: > >> If you are going to build most of the modules, but only want to >> exclude a few, then add the directories of the modules to be excluded >> (relative to /usr/src/sys/modules) to WITHOUT_MODULES, for example in >> /etc/make.conf. If you are only going to build a few modules, and want >> to exclude the majority of the modules, then add the directories of >> the modules that are to be built to MODULES_OVERRIDE. For no modules >> at all, set NO_MODULES. See /usr/src/sys/modules/Makefile and >> /usr/src/sys/conf/kern.post.mk for details. You may also save some >> time by using one of your faster machines to build the OS for the >> slower machines. > > Suppose you want to build more than one kernel so as to be able to choose at > boot time. > > Then you might not want to build modules redundantly. So how would you make > the modules from /boot/kernel accessible when booting /boot/kernel2? > If the kernel versions were compatible, and the set of modules were the same, I suppose you could set MODULES_WITH_WORLD and KODIR=/boot/modules during buildworld and installworld, to build the modules as part of buildworld and install them in /boot/modules during installworld, rather than in /boot/kernel or /boot/kernel2. Then you could build and install both of your kernels with NO_MODULES, as previously discussed, and with your different choices of KODIR for each kernel. Because /boot/modules is part of the default module_path defined in /boot/defaults/loader.conf, the modules ought to load as usual for either kernel. If you wanted to place them in a different directory, you could alter KODIR during buildworld and installworld, and add the directory to module_path in /boot/loader.conf. I haven't tested this, but I think that it will work, and I'd be interested to hear whether it does. There are of course alternative methods. b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGFTUwNQvW4CuVoKfGjEQaFEhqH_5xg9KAAtOZSTTOPwQ%2BYT=g>