How do i compile with Linux Debian30r1?

calvink

Member
Feb 3, 2003
146
0
0
I am new to linux, and i can't figure out how to compile my network drivers. I've already transfered all of the files(.c, and .h's) to a temporary directory on the drive, but i don't know how to compile it. It came with a Makefile, so i tried typing in make Makefile and gcc Makefile. When i typed in gcc Makefile it returned the error "parse error" When I type in make Makefile, I get the error Linux kernel source not found. Any help is appreciated, I have almost no knowledge of Unix or Linux. Thanks.



Note: Does it matter if i un gz/tared all of the files first on a windows machine, copied them to a floppy then copied them onto a linux machine?
 

Chaotic42

Lifer
Jun 15, 2001
35,386
2,503
126
Whoa, ok. One step at a time.

What kind of network card do you have? Most are supported in the kernel. Make sure you do everything listed here as root.
You should just be able to type make. Check README.TXT in the directory that all of those .c and .h files are in for more info.
You probably need to get the kernel source. You can get it from ftp://ftp.funet.fi. IIRC, it's in pub/linux/kernels/v2.4/linux-2.4.20.tar.gz. It's probably about 35 MB.

Copy it into /usr/src, then type tar zxvf linux-2.4.20.tar.gz, when in the /usr/src/ directory. It should shoot up a bunch of files. Then hit cd linux, then make menuconfig.

It should provide you with a menu like system. Go through it carefully. Check off what you need. When you get done, type in, in this order:

make dep
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/linux-2.4.20

Then, edit /etc/lilo.conf (assuming you are using lilo), and add:

--
title Linux Test
image=/boot/linux-2.4.20
root={whatever your linux / partition is}
boot
--

Now, I haven't used lilo in a while, so someone tell me if that's wrong. Just make it look like the existing entry, but with /boot/linux-2.4.20 instead of vmlinuz.

Then hit lilo and reboot with the new entry. If you did everything right, your NIC should be eth0.

 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Support for that is already in the kernel - you want the via-rhine.o module. Just follow Chaotic's instructions and choose the modules from the Network Device Support section. No need to download anything extra from Via.
 

calvink

Member
Feb 3, 2003
146
0
0
Originally posted by: BingBongWongFooey
Ok, you likely don't have to do anything except "modprobe via-rhine", as root.

I attempted typing "modprobe via-rhine" in as root, and didn't display any errors but i still can't ping anything on the network or outside of the network.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: calvink
Originally posted by: BingBongWongFooey
Ok, you likely don't have to do anything except "modprobe via-rhine", as root.

I attempted typing "modprobe via-rhine" in as root, and didn't display any errors but i still can't ping anything on the network or outside of the network.

If it didn't display errors then it should have loaded fine. Do an "echo via-rhine >> /etc/modules" so that it will load on every boot.

Simply loading the driver for your network card does not configure your network for you, you need to edit /etc/network/interfaces if you have not done so yet (man 5 interfaces), and use "/etc/init.d/network {stop|start|restart}" to take down / bring up / reconfig your interfaces.
 

calvink

Member
Feb 3, 2003
146
0
0
If it didn't display errors then it should have loaded fine. Do an "echo via-rhine >> /etc/modules" so that it will load on every boot.

Simply loading the driver for your network card does not configure your network for you, you need to edit /etc/network/interfaces if you have not done so yet (man 5 interfaces), and use "/etc/init.d/network {stop|start|restart}" to take down / bring up / reconfig your interfaces.

Sorry, I am a newbie at Linux. "man 5 interfaces"? Thanks for your help.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: calvink
If it didn't display errors then it should have loaded fine. Do an "echo via-rhine >> /etc/modules" so that it will load on every boot.

Simply loading the driver for your network card does not configure your network for you, you need to edit /etc/network/interfaces if you have not done so yet (man 5 interfaces), and use "/etc/init.d/network {stop|start|restart}" to take down / bring up / reconfig your interfaces.

Sorry, I am a newbie at Linux. "man 5 interfaces"? Thanks for your help.

Sure, I'll explain those commands a little more in detail.

echo via-rhine >> /etc/modules

This appends the text "via-rhine" to the file "/etc/modules". /etc/modules is the file that is looked in at boot time to determine what kernel modules should be loaded. via-rhine will be in there, and thus, it will be loaded at boot.

/etc/network/interfaces is like all config files; just plain text. Edit it with any text editor, as root.

man 5 interfaces is a command, using the "man" (manual viewer) command, to look at section 5 of the manual (the "files" section), for the manual page for the interfaces file. run the command "man man" to learn more about man, or google it, there's tons of info out there.

When I wrote /etc/init.d/networking {stop|start|restart} , I meant 3 different comands.

/etc/init.d/networking stop will bring down your network interfaces (network cards, basically)
/etc/init.d/networking start will bring those interfaces back up.
/etc/init.d/networking restart will basically just run stop and then start in one command.

/etc/init.d/networking is an init script, basically an executable script that takes care of your network interfaces, and reads from the interfaces file to determine how to config your interfaces.

edit: sorry, got mixed up, it's actually /etc/init.d/networking, not network