Solved

How To Deal With  Modules in Kernel Compilation ??

Posted on 2001-06-24
12
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 

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
 
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 To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

630 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