Results 1 to 5 of 5
hi,
I am reading this book Linux Device Drivers 3rd edition(alessandro rubini) ,in the second chapter about 'Building and Running Modules' , the book says that
-------------------------
% make
make[1]: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-11-2006 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
Need Help in configuring and building kernel 2.6.16.18
hi,
I am reading this book Linux Device Drivers 3rd edition(alessandro rubini) ,in the second chapter about 'Building and Running Modules' , the book says that
-------------------------
% make
make[1]: Entering directory `/usr/src/linux-2.6.10'
CC [M] /home/ldd3/src/misc-modules/hello.o
Building modules, stage 2.
MODPOST
CC /home/ldd3/src/misc-modules/hello.mod.o
LD [M] /home/ldd3/src/misc-modules/hello.ko
make[1]: Leaving directory `/usr/src/linux-2.6.10'
% su
root# insmod ./hello.ko
Hello, world
root# rmmod hello
Goodbye cruel world
root#
Please note once again that , for the above sequence of commands to work,you must
have a properly configured and built kernel tree in a place where the makefile is able to
find it(/usr/src/linux-2.6.10 in the example shown).
----------------------------
what does it means to have a configured and built kernel? , does it mean that i need
to compile the kernel?
I have the source of kernel 2.6.16.18 in the /root directory,
how do i configure and build it?
Please help I am totally new to device drivers!
- 10-11-2006 #2If you booted into Linux you have a configured and built kernel, it may not have optimal settings but it should do.what does it means to have a configured and built kernel? , does it mean that i need to compile the kernel?
Did you download an rpm file or the actual kernel source code from kernel.org?I have the source of kernel 2.6.16.18 in the /root directory,
how do i configure and build it?
install rpm files as root.
rpm -Uhv filename.rpm
If its actual sourcecode, then yes you'll need to compile that.I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
I'd rather be lost at the lake than found at home.
- 10-13-2006 #3Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
I have placed the kernel sources in /usr/src/linux-2.6.16.18 directory.
I tried to compile the kernel using these commands :
# make xconfig
# make bzImage
# make modules
# make modules_install
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.16.18
# mkinitrd /boot/initrd-2.6.16.18.img 2.6.16.18
# make install
But when i boot into the OS with the new kernel, it gives an error at the boot time "Kernel Panic, attempted to kill init.........." ,and the OS doesn't boot! please tell me where i am wrong!
thanks.
- 10-13-2006 #4Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
sorry for the double posts!!!
- 10-15-2006 #5
I think the problem here could be that, Fedora doesn't use
make bzimagecp arch/i386/boot/bzImage /boot/vmlinuz-2.6.16.18When you typemkinitrd /boot/initrd-2.6.16.18.img 2.6.16.18it does it for you.make install
Try again and omit these steps.
EDIT: also Fedora uses the /usr/src/kernels/version-number directory and NOT /usr/src/linuxI do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
I'd rather be lost at the lake than found at home.


Reply With Quote
