PDA

View Full Version : Linux Newb Needs Help - Compiling


Cyborg Corp.
11-29-2003, 12:58 AM
I installed Xandros 1.0 today but I have no idea how to install drivers. I cant connect to the internet on that computer cause I have no network drivers. I open the driver file and i'm supposed to compile it but I'm a complete newb and have zero idea on how to do that...any ideas?

Mazer
11-29-2003, 01:16 AM
Well, first of all see if there is a readme in the folder, after you unziped-it... Normaly compiling is as simple as doing ./configure, make, make install. But in your case I don't know, be more specific about hardware/software, maybe I can help then.

Cyborg Corp.
11-29-2003, 01:24 AM
Originally posted by Mazer
Well, first of all see if there is a readme in the folder, after you unziped-it... Normaly compiling is as simple as doing ./configure, make, make install. But in your case I don't know, be more specific about hardware/software, maybe I can help then.

Well the problem is the read me goes like what you said "./configuire" and stuff but where do i type all that?! Here's the product and where you can get the drivers
http://support.dlink.com/Products/view.asp?productid=DFE-530TX+
please remember, i'm a complete newb :cry:

Mazer
11-29-2003, 01:59 AM
Ok..... wel, you realy need to read your docs...
You must tipe the comands in a terminal... If you are using Kde you can right-click in the directory and choose "Open terminal here" but you realy realy need to go and read you docs...
Good luck and dont give up, it's worth the efford ;)

Cyborg Corp.
11-29-2003, 02:11 AM
I'm still having trouble. I cant find anything in the documents on compiling :eek:

elvis
11-29-2003, 08:57 AM
typically with any driver you download there will be a "README" or "INSTALL" file which you *MUST* read. not doing so will leave you stranded.

LINUX TERMINALS 101:

to open a terminal in any linux, browse your KDE or GNOME menus. different distros put them in different places, but typically speaking it will be called a "terminal", "xterm", "shell" or something similar.

once you run it, it will be a window with a prompt waiting for you to type information into. typically in the form of:


[hostname] $


after the "$" bit is where you put your input.

to change to a folder, the "cd" (Change Director) command is used. eg, if i were in the "home" folder, to get to "/tmp" i would type


cd /tmp


remembering that everything in linux starts at the root of the tree, or "/". some your home folder is usually uder "/home/username".

to list files in a folder, "ls" can be used. for a more verbose output, try "ls -lah".

remember! linux is CASE SENSITIVE! the file "INSTALL" and "install" are not the same file! case matters in linux! anyways... onwards.

once you've downloaded your driver file, it will most likely be in tar.gz format. tar is a program that joins a whole bunch of files together into a "tar ball". originally this was designed to make ti easier to get files onto tape (TAR = Tape ARchive). gz is "GNU Zip". so a .tar.gz is a whole bunch of files tarred together, and then zipped.

anyways, to decompress the example file "driver.tar.gz" you would type:


tar xvzf example.tar.gz


x = extract
v = verbose (lots of feedback to the screen)
z = gnu-unzip the file first
f = we're dealing with a file (not a tape/disk device)

once that's done, a folder called "example" will be created. if you can't find it, our old pal "ls" will help you. "cd" to that folder. remember to either use absolute paths ("cd /home/username/example") or relative paths ("cd example").

once in, ls again and see if there's a README or INSTALL file. these are what you need to read to see how to compile the driver. the command "less" can be used to read a file, using the arrow and pageup/pagedown keys. "less INSTALL" will read the INSTALL file. alternatively you can use your favourite GUI file manager to browse to the file and double-click it if that's easier.

typically speaking, most drivers are installed in the following manner. in the folder with the driver, type in order (after each part has finished doing it's thing, of course).


./configure
make
sudo make install


"./configure" runs the driver's configuration script, making sure all environment variables are present, and everything is there that you need. if you see any errors after this part, you'll need to hunt them down and fix them before you can compile the driver.

"make" runs the GCC (GNU C Compiler) to actually make the drivers into a binary.

"sudo" is "Super User DO", which promotes you to system administrator level for the operation following the command. you'll need this to install the driver. "make install" runs GCC and tells it to put the driver where it belongs.

assuming you've done all that, the driver should be installed and ready. if it's a loadable module, you'll need to install it with "insmod". so a quick


sudo insmod drivername


replacing "drivername" with the actual driver of course, and it will be loaded and ready for use. the README and INSTALL parts will have the exact information you need to get this bit done if required.

again, make sure you read ALL of the documentation that comes with the driver before doing any of this. linux stuff is generally extrememly well documented, and really does need to be read first. even seasoned linux users will read this stuff, so it's not a case of glance over it and forget about it.

i hope the above gets you on your way, or at least starts you off in the right direction. if you are serious about using linux, i strongly recommend having a look at linuxquestions:

http://www.linuxquestions.org/

and browsing around there to get a good head start on linux and how to use it. linux for better or worse is not point-and-click like windows or Mac, and I don't think it ever fully will be. however it is extremely powerful and customisable as a tradeoff, and for it will have a slightly sharper learning curve.

good luck!

MCronin
11-29-2003, 09:15 AM
The problem he has is it's just a .c file, no make file, no configuration file. There's no readme or even instructions on the site or in the comments explaining anything about this driver.

Cyborg, I just want you to know that you;ve run into something that is not normal at all with this piece of hardware and most companies that provide drivers at least have the courtesy to provide you with documentation to get it working.

What you are going to have to to is put that file in your home directory, open a terminal and type in

gcc -I /usr/src/linux/include -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c rtl8139.c `[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS` and hope it spits out a driver for you.

If it does, you can drop it into the folder the rest of your driver modules are stored in, and add it to your module autoload file. If it doesn't compile or gives you some sort of error, you are going to state specificly what the error is so someone here can help you out.

Found their instructions

http://support.dlink.com/faq/view.asp?prod_id=487&question=General%20Linux

Cyborg Corp.
11-29-2003, 12:26 PM
wow, thanks for the great replies guys :thumbsup: I'll try these commands out tomrow since i shut down my linux computer

CGTalk Moderation
01-16-2006, 07:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.