Solved

Re-compiling kernel to add hardware for idiots

Posted on 1998-12-08
13
248 Views
Last Modified: 2013-12-15
I've successfully installed Redhat 4.2 on my old 486. At the time it had no ethernet card. Now I want to add a 3com 3c509 ethernet card. I've found various drivers for this card, I've got a file called 3c509.c on my disk at the moment. Apparantly I have to re-compile the kernel (or something!) to get it to work. I couldn't get it to work. I am a total Unix / Linux idiot (I'm pretty good with MSDOS), so please someone give me some idiot instructions on how to do this. Some help on getting a TCP/IP stack working would be nice too.
0
Comment
Question by:pug_nut
13 Comments
 
LVL 4

Expert Comment

by:mcdonc
ID: 1631832
You'll need to recompile the kernel with either:

1)  Module support and include the 3C509 driver as a module.
or...
2)  With the 3C509 driver compiled into the kernel (not as a module).

Read the Kernel-HOWTO for instructions.  It can be found at http://www.math.psu.edu/ward/kernel-howto/

It sounds compilcated and heavy but its actually pretty easy.

Once you do it, the rest should almost take care of itself.
0
 

Author Comment

by:pug_nut
ID: 1631833
I've got a bit further, I can run the device driver successfully by typing
insmod /lib/modules/2.0.27/net/3c509.o
and it seems to work
next I though I'd have a go at recompiling, as that's what the Linux site says to do, I've done the following successfully:-
cd /usr/include
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi

next I did "cd /usr/src/linux"
when I tried to do "make config" I get the error message "make: *** No rule to make target 'config'. Stop."
Now I'm stuck - Help!

0
 
LVL 1

Expert Comment

by:talwyn
ID: 1631834
try "make menuconfig"
0
 

Author Comment

by:pug_nut
ID: 1631835
I get the same error message except it says:-
make: *** No rule to make target 'menuconfig'. Stop.

0
 
LVL 2

Expert Comment

by:wqclatre
ID: 1631836
Mabe you don't have to compile the kernel.

Try to run kernelcfg.
1. kernelcfg
2. klick add and chose eth
3. chose eth0 as moduletype and 3c509 as module.
4. tell which io base and irq you have on the card.
(It can be a good idea to do a cat /proc/ioports and cat /proc/pci and cat /proc/interrupts to check for a free IRQ and io adress. And then use the configuration disk and set the right irq and io adress on the card. (Under dos)

Good Luck!
0
 
LVL 2

Expert Comment

by:wqclatre
ID: 1631837
And btw. Do you have the kernelsource installed`? Do you have any Makefile in /usr/src/linux ?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:pug_nut
ID: 1631838
Using kernelcfg and netcfg commands under xwindows solved my problems in the end.
kernelcfg added support for my card to the OS
netcfg allowed me to add all the TCP/IP settings
These two programs only work in X
I still don´t know why "make config" doesn´t work, but it doesn´t matter now
0
 
LVL 2

Expert Comment

by:wqclatre
ID: 1631839
What files do you have under /usr/src/linux?
Do you have the Makefile???? Do you have the whole source installed??
0
 

Author Comment

by:pug_nut
ID: 1631840
I have a directory to /usr/src/linux, it is a symbolic link to a directory called /usr/src/linux-2.0.27
that directory contains a directory called "include" and nothing else
within "include" are "asm" (symbolic link to asm-i386"), "asm-generic", "asm-i386", "linux", "net", and "scsi"
within the /usr/src/linux-2.0.27/include/linux are some .h files and a directory called "modules" containing .ver files
0
 
LVL 2

Accepted Solution

by:
wqclatre earned 40 total points
ID: 1631841
Well then the problem is that you don't have the kernelsource installed. I think that you only have the kernel headers and the kernel installed.

Try a rpm -qa | grep kernel
And you will se if you have kernel-source installed.
Otherwise you can download it as rpm from ftp.redhat.com or as a tar.gz file from ftp://ftp.kernel.org/pub/linux/kernel/v2.0/

0
 

Author Comment

by:pug_nut
ID: 1631842
Thanks,
When I do "rpm -qa | grep kernel" I get the following response:-
kernel-2.0.27-5
kernel-headers-2.0.27-5
kernel-modules-2.0.27-5
kernelcfg-0.3-3
What does that mean?
0
 
LVL 2

Expert Comment

by:wqclatre
ID: 1631843
It means that you have those packages installed. If you had the kernel source installeed you should get kernel-source-2.0.27-5 to when you try the command  rpm -qa | grep kernel
0
 
LVL 2

Expert Comment

by:wqclatre
ID: 1631844
You can probably find  a kernel-source-2.0.27-5 rpm on youre redhat cd. do a rpm -ivh filename.rpm and You will get the soure installeed.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
what is the difference between "sudo su" and "su - root" 6 105
cannot connect to openvpn server 9 60
What language/protocol is the Angular Chat? 2 57
Backup & Restore 3 46
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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…
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.

920 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

15 Experts available now in Live!

Get 1:1 Help Now