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

Re: 4 doubts on Kernel compilation (A dual boot Win-Lin Machine)



Thus spake shyamk@eth.net:
> I was told that the following were the steps for making a kernel :
> cd /usr/src/linux
> make config
> make dep
> make clean
> make bzImage
> make modules
> 
> I have 4 doubts :
> 1. If I have made a kernel module , say  prn.o , does this automatically get entry
> into a kernel through this procedure ?
> 
> 2. Could somebody please tell me what
> ' make '  really is about ?
> 
> 3. Could you tell me what each of the above steps is intended for ?
> 
> 4. I am having a dual - boot Win - Lin machine . Will any form of kernel compilation
> affect either :
>     a. The dual - boot structire
>     b. The Linux partition and OS
>     c.  The Windows partition and OS
> 
> Thanks,
> (shyamk@eth.net)
> Shyam

1)  You also have to make modules_install in order for the modules to
written to the right tree in /lib/modules/<kernel-version>.  Then you
can tell the kernel to load what modules you definitely want at boot by
adding them to /etc/modules - just skip the trailing .o

2) make is program that reads a set of rules and executes them from a
Makefile in the present working directory - beyond that, I don't know.

3)cd /usr/src/linux - pretty straight forward - where your kernel source
is kept.  Need to be in this directory to read the Makefile there.

make config (actually make menuconfig or make xconfig are much
pleasanter alternatives) - let's you decide what kernel options to
include.

make dep - not sure, although it looks like it's calculating
dependencies within the kernel.

make clean - removes cruft that's either unwanted or built up during
compilation

make bzImage - builds a compressed kernel image, the one you actually
boot from

make modules and make modules_install builds the modules you want and
puts them in the right tree.

the last steps are:
cp /usr/src/linux/arch/<arch>/boot/bzImage /boot/<whatever you want to
name it>
edit /etc/lilo.conf so that your first image is /boot/<whatever you want
to name it>
/sbin/lilo to update lilo.
reboot, fingers crossed . . . 
Good luck,
Steve
p.s. - I'm told the debian way is much easier, but I've never used it,
so others can tell you more.

-- 
Abstainer:  A weak person who yields to the temptation of denying himself a
pleasure.  A total abstainer is one who abstains from everything but
abstention, and especially from inactivity in the affairs of others.
-- Ambrose Bierce

Attachment: pgpq0_K_2Zny3.pgp
Description: PGP signature


Reply to: