How To Deal With Modules in Kernel Compilation ??

Hello ,
          I am Using the Ne2000 ethernet card , while installing of the Linux Red Hat 7.1 then module for the card ( which is ne ) was installed and located in the /lib/modules/2.4.2/kernel/drivers/net/ne.o
and thus the kernel was working properly .

After that there arose some need to compile kernel and i compiled it and in the ethernet section there i put the ne2000
as m ( module ) and i made the bzImage after that i
have renamed the /lib/modules/2.2.4 to 2..2.4.old  
then i have done make modules and then after that
make modules_install then changed the lilo.conf to point to new image and done lilo.

After rebooting the system , modprobe was unable to load the
module eth0  , what was missing was there
no module in the /lib/modules/2.4.2/kernel/drivers/net/
which named ne.0 .

How can i solve this problem ??

Please Help
raghvendraAsked:
Who is Participating?
 
jlevieConnect With a Mentor Commented:
Okay, to use one of the RedHat configs as a starting point first copy a config that matches your CPU type from the configs dir to /usr/src/linux-2.4/.config. As and example:

disorder# cd /usr/src/linux-2.4
/usr/src
disorder# uname -m
i586
disorder# cp configs/kernel-2.4.2-i586.config
disorder# make mrproper
disorder# make menuconfig
...

If running X you can use "make xconfig" which is a little easier to use. Using that config as a base condition, adjust the configuration to disable/enable things as desired and then build the kernel in the normal manner.

Note that any time the CPU architecture is changed, or the very first time that you build a kernel, it is essential to do a "make mrproper". You can skip that for subsequent kernel builds for the same architecture.
0
 
jlevieCommented:
Since you did a "make modules" and "make modules_install" and didn't wind up with the correct modules for the NIC, then your kernel config file is wrong and desn't have the correct settings for networking and/or the NE2000 modules. Go back to the kernel config and make sure that you are selecting the correct options. RedHat ships their kernel sources with a configs dir containing the configurations that they use to build the release kernels. One of those is a good starting point for any later kernel tweaking.
0
 
raghvendraAuthor Commented:
Please explain more consiering me as a novice in kernel
compilation
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
raghvendraAuthor Commented:
Yes i followed upto some extent , but please explain
in some more detail , also where i can get the
present ( when installing the red hat ) kernel config
file is it the same as you were telling i.e by uname -m




Bye
0
 
garbouaCommented:
I think your problem is NE2000 is an ISA device and it is NOT automatically configure in neither configurations.
do this
cd /usr/src/linux
make xconfig, or make menuconfig
look under network device and choose the ethernet(10 or 100) sub menu
check the "other ISA cards" and then make NE2000 a module, click on "m" infront of it.
exit and make your kernel
you can edit the makefile and add an extention to the kernel, to be 2.4.2-raghven
"make dep clean bzImage modules modules_install install"
and type lilo and u should be home free.

by renaming the kernel image, you keep your working kernel in case OF anythinggggggggggggggg :-)
good luck
0
 
raghvendraAuthor Commented:
hello garboua ,
             I have done the same thing but i didn't
created the module ( ne.o ) .then what you think the problem will be ?
0
 
garbouaCommented:
okay You have all my attention now.
You did what jlevie suggested "make mrproper" to bring source code to it original state right? okay edit file .config and look for "CONFIG_NE000=m"
if it is NOT there, you are doing something wrong, if it is try to do a simple make for the network devices modules only "make dep clean net"
0
 
garbouaCommented:
sorry that is CONFIG_NE2000=m
0
 
garbouaCommented:
again, make net will not make it, but make modules will, because it is under drivers and not network util.  :-)
0
 
raghvendraAuthor Commented:
Ok ,

  But i am not having the .config file ??? i am having the
  configs directory in which there are many config files ,
  also the , that i understand how to take the appropriate file i.e by the uname -m .Please clarify .
0
 
garbouaCommented:
you should have the .config file, to see it type "ls -a " and it should show you all the hidden files.  you will see two ".config" and ".config.old".  
type "man uname" and you will get plenty explanation about your system, the release, kernel, system etc etc. uname is just a linux command to tell you how your system is configured.
try that

0
 
raghvendraAuthor Commented:
Hello ,
        Thanks to all   for the comments/answer they have
         given , points are not only the sole things which are important.
       
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.