Cannot Make
Hi,
Firstly, when I try and type an apostrophe or slash in this form, it opens the firefox find bar. Which is a bit wierd. Secondly, I am currently installing Ubuntu on a desktop to try and decide whether to switch to linux as a desktop slash developer machine. I am installing a driver for a wireless card, and have extracted everything and Im trying to run a make command with no parameters, in the correct directory. I have seen a number of faqs and how tos giving instructions for the same version of the driver and sometimes the same distro. However everytime I run make i get: Entering directory xxxxx No rule to make target <apos>modules<apos>. Stop. Leaving directory xxxxx rt2500.ko failed to build! [modules] Error1 I assume something must be wrong in my environment, but I have been struggling with this for hours, any help appreciated!! Thanks Adam |
Quote:
Quote:
Code:
install -m 644 rt2500.ko /lib/modules/`uname -r`/kernel/drivers/rt2500.ko |
Yeah, I've had problems with the single quote (') and the forward slash (/) too. I think it has something to do with page rendering, because it would fix itself (sometimes) by manually clicking to reload a page. I don't run across it much anymore. It also seemed to happen when I had many tabs open and the browser had been running for a long period of time.
Anyway, about the make problem. Well, I don't think it's been compiled since it complains there's no rule for "modules". I don't have the docs, so I can't be certain, but here's my guess. Since this is a driver, you need to copy the source into the kernel source tree's modules sub-directory. There may be instructions on how to add the driver to "menuconfig" or other kernel config options. It may be as simple as modifying the kernel config file to say something like "DRIVER_NAME YES". Then, when you go to compile the kernel, there are hooks in place that tell it to compile the source files you copied over. Make sense? Don't take my word for it though, read the documentation carefully. The "modules" target is common from the pre-2.6 days where the routine to compile a kernel was something like: Code:
make mrproper |
Thanks. I tried running the install command an it didn't like that 'cannot stat rt2500.ko'. I guess it isn't installed.
The documentation really only says go to ./rt2500...../Module and type make. Also the Ubuntu Wiki has instructions for this if you search for rt2500 (I can't post URLs in my first few posts). Dark_Helmet - you suggest copying to the Modules subdirectory of the source tree and recompiling the kernel. Under /usr/src I have the following directories linux-headers-2.6.10-5 linux-headers-2.6.10-5-386 linux-headers-2.6.10-5-k7 linux-patches linux-source-2.6.10 rpm I did find . -name modules and couldn't find anything, although there is a <headers directors>/include/config/module? Thanks Adam |
No that doesn't sound right... My response is probably a red herring.
What driver for which wireless card, and where did you get it? I'll download a copy and take a look. |
Not sure if this will help but have you just tried
Code:
su - |
Quote:
|
Quote:
Cheers! |
Okeydokey... I didn't have any problems compiling, so I'll give the commands I issued exactly.
First, I downloaded rt2500-1.1.0-b2.tar.gz from the reference link in the wiki page you provided and saved it into ${HOME}/temp. From an xterm I then did the following: Code:
$ cd ~/temp The "no rule" error you're getting is a strong indication that the Makefile is corrupt or doesn't exist. If it doesn't exist, it's likely you don't have the kernel source installed on the system. So check into that, and see where you stand. |
In Synaptic (the ubuntu package mgr) I can see that the following are installed:
linux-source-2.6.10 - Linux kernel source for version... linux-tree linux-tree-2.6.10 However - my kernel version is 2.6.10-5-k7. In the makefile I have now hardcoded the directories to match the version numbers. So my KERNDIR is /usr/src/linux-source-2.6.10 (I have checked there is a Makefile in here). My MODDIR is /lib/modules/2.6.10-5-k7/extra. Now when I run make I get output! We have progress, houston :) Unfortunately I get hundreds of warnings and errors, so something still is not right. The errors run to a size larger than the buffer so I can't see the first few. It looks like a mix of unknown variables and syntax errors...so: 1) Can I pipe the make output to a file so I can see the start? I tried make > make.log but it only gets 4/5 lines that are output with the prefix make: 2) Is this likely to be to do with the difference in version between 2.6.10 and 2.6.10-5-k7? Cheers - Adam |
OK, I managed to see the earlier msgs by pressing CTRL-C straight after make.
The first errors are: Entering directory /usr/src/linux-source-2.6.10 Makefile:484 .config: No such file or directory CC [M] /home/adam/rt2500-1.1.0-b3/Module/rtmp_main.o In file included from /home/adam/rt2500-1.1.0-b3/Module/rt_config.h:58, /home/adam/rt2500-1.1.0-b3/Module/rtmp_main.c:50: include/linux/config.h:4:28: linux/autoconf.h (etc) Line 484 is an endif statement, which is a little odd! |
There shouldn't be any significant difference between 2.6.10 and 2.6.10-5-k7. Anything after the third number (10 in this case) is called the "EXTRAVERSION" and is a user-supplied add-on to the kernel version. It's located in the top level Makefile of the kernel source tree, and it's there for people to modify when compiling the kernel with a new set of configuration options so they can keep track of which kernel has what options, etc.
You say line 484 is an endif. Does it's matching if contain a reference to the .config file? It might be acting loopy because the Makefile may have an underlying assumption that the .config file exists. The .config file is created by whatever utility is used to configure the kernel (I think). The common ones are "make menuconfig", "make xconfig", and I think there are even qt and gtk based config utilities shipped with the kernel source. Anyway, those .config files contain information regarding your kernel's selected options for compile. There's something in that file needed for compilation. Sooooo, you'll probably need to find or create one. Before trying to make one, see if there's any documentation that says where you might find the standard configs used for the stock kernels with your distribution. If you can find it, you can probably use it to recreate the other .config files. My guess would be to start up menuconfig, load the stock kernel config, save, and exit. I wish I could help more, but Houston is getting very, very tired :) |
OK, thanks!
I ran make config, and now make modules works! Presumably I now have the .config file... Thanks for your help! |
All times are GMT -5. The time now is 05:14 PM. |