Solved

How To Deal With  Modules in Kernel Compilation ??

Posted on 2001-06-24
12
277 Views
Last Modified: 2013-12-15
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
0
Comment
Question by:raghvendra
  • 5
  • 5
  • 2
12 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 6222884
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
 

Author Comment

by:raghvendra
ID: 6223265
Please explain more consiering me as a novice in kernel
compilation
0
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 6224403
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
 

Author Comment

by:raghvendra
ID: 6226269
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
 
LVL 5

Expert Comment

by:garboua
ID: 6228741
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
 

Author Comment

by:raghvendra
ID: 6229966
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 5

Expert Comment

by:garboua
ID: 6232186
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
 
LVL 5

Expert Comment

by:garboua
ID: 6232196
sorry that is CONFIG_NE2000=m
0
 
LVL 5

Expert Comment

by:garboua
ID: 6232275
again, make net will not make it, but make modules will, because it is under drivers and not network util.  :-)
0
 

Author Comment

by:raghvendra
ID: 6233797
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
 
LVL 5

Expert Comment

by:garboua
ID: 6236366
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
 

Author Comment

by:raghvendra
ID: 6247913
Hello ,
        Thanks to all   for the comments/answer they have
         given , points are not only the sole things which are important.
       
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now