[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modules.




Travis,

Heh, looks like you're making this harder than  it needs to be. Kernel
compiling is enough of a "pain in the butt" when you don't give yourself
extra work or worries ;)

Compiling a kernel is very straightforward, and has a finite set of steps.
Kernel patches are only necessary if you wish to "patch" your kernel
source, rather than obtaining the new kernel source. Patches are sometimes
used to fix bugs in initial releases, etc. They have nothing to do with
your modules.

To compile a kernel, first do your make configuration. You can use make
config, make menuconfig, or make xconfig whichever you prefer. I like the
make menuconfig option, but I tend to recommend make xconfig to new users
(as long as you currently have X support).

After you have configured your kernel, the kernel configuration gets
written to a .config file in your /usr/src/linux directory.

There are three more steps in the actual compilation of your kernel.

1. make clean  -->This cleans up temporary files in the source directory.
2. make dep --> ensures kernel dependancies (kernel header files) are OK.
3. make zImage or make bzImage (dependant on kernel image size. be safe,
go bzImage)

After the image is created, it's located in /usr/src/linux/arch/i386/boot
and named either zImage or bzImage depending on what make method you used.
Copy this file into the /boot directory. Rename it to whatever method you
like, typically something like vmlinuz-2.2.10 (or whatever kernel version
you recompiled). NOTE: This step can be completed after you've done all
your kernel and module compiling..

Next you need to compile and install your modules. To do this:

4. make modules
5. make modules_install

After you're done with all this, you need to edit your /etc/lilo.conf file
to be able to boot your new kernel, and you're done! I recommend you add
your new kernel as an additional boot option to your old kernel. To do
this, you need to duplicate the image= section currently available for
your current version.

Say right now, your image= section looks like this:

image=/boot/vmlinuz-2.2.5
        label=linux
        root=/dev/hda2
        read-only   

Edit it to look like this:

image=/boot/vmlinuz-2.2.r105
        label=linux
        root=/dev/hda2
        read-only   
image=/boot/vmlinuz-2.2.5
        label=linux-old
        root=/dev/hda2
        read-only   


Notice the first image= /boot/vmlinuz-whatever that new kernel version you
named it. Also note for the old image= to change the label to linux-old or
even the old kernel version like linux-2.2.5 whatever you'll keep
straight.

After editing your /etc/lilo.conf file, you have to write your changes,
exit, and rerun lilo. Do this by simply entering /sbin/lilo at the root
prompt. You'll see something like

Added linux *
Added linux-old

Now you're ready to reboot and try your new kernel.

Now for the zinger.. Want to simplify all this? Here's the steps now that
you understand what's going on..

1. make menuconfig (or whatever config you use)
2. make clean dep bzImage modules modules_install
3. copy bzImage to /boot, rename it.
4. edit /etc/lilo.conf and rerun /sbin/lilo
5. reboot and enjoy! 

Hope this simplifies things for you. BTW, you may notice an
initrd=something label in your lilo.conf, or have heard of people talking
about the inird ram disk image. This image is only needed if you have SCSI
devices or something required during boot, which support isn't compiled
into the kernel. You probably don't need to worry about this. I've never
had to use one of these ram disk images ;)

 Kara Pritchard
Linux Users of Central Illinois
(217)698-1694
kara@luci.org

On Sun, 18 Jul 1999, Travis Davies wrote:

> 
> 
> O.K. i just compiled my new kernel version 2.2.2. Now correct me if Im
> wrong but in order to load the things that wanted compiled as a module
> i need patch2.2.2. Which I have already downloaded. I've looked through
> a bunch of documentation and can't find where i should extract the
> tared file.
> 
> After that is complete should I go to the /usr/src/linux directory and 
> type the following?
> 
> "make modules"
> "make modules_install"
> 
> --Travis
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, send email to majordomo@luci.org with
> "unsubscribe luci-discuss" in the body.
> 


--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.