[KLUG Members] kernel build question

Todd Pillars todd at terralabs.com
Thu Sep 22 09:19:13 EDT 2005


Ron Sweeney wrote:
> Im trying to build a 2.6.11 kernel on a 2.6.9 box (Fedora Core).
> 
> I downloaded the source from kernel.org <http://kernel.org/> and can 
> successfully build and install the kernel locally, however im building 
> it for "external" purposes to the 2.6.9 box.
> 
> In particularly I just want to build the modules for the kernel.
> 
> on my 2.6.9 box, I have a directory /lib/modules/2.6.9....  when I run 
> make modules, things work, but its not creating this directory....
> 
> for purposes of what I am trying to accomplish, which is a zen based 
> linux image kernel with nothing more than CIFS enabled, I need the 
> /lib/modules/2.6.11 structure, and in particularly modules.dep
> 
> what am I missing...  ????
A couple of things.

First, you (should) need to set your EXTRAVERSION="something unique" in 
the Makefile for your new kernel tree.

Second, you can build the kernel as a normal user and send the bzImage 
to a specific directory with
O= (capital o)

 From the README, hmmm wonder why they call it that? :)
<snip>
    To configure and build the kernel use:
    cd /usr/src/linux-2.6.N
    make O=/home/name/build/kernel menuconfig
    make O=/home/name/build/kernel
    sudo make O=/home/name/build/kernel modules_install install

    Please note: If the 'O=output/dir' option is used then it must be
    used for all invocations of make.
</snip>

Third, notice the above with kernel > 2.6 you need an extra step

make modules
   becomes
make modules_install

The EXTRAVERSION will keep the modules seperate from your install kernel 
modules

Hope this helps
Todd


More information about the Members mailing list