LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Pointing /lib/modules/2.4.20-6/build at sources (https://www.linuxquestions.org/questions/linux-wireless-networking-41/pointing-lib-modules-2-4-20-6-build-at-sources-147326/)

Myrdos 02-17-2004 04:57 PM

Pointing /lib/modules/2.4.20-6/build at sources
 
I'm trying to get my wireless adapter installed, with no luck. It's a WUSB11 ver 2.8

I've found two drivers, both of which have several hundred parse errors when I try to run make:
at76c503a.berlios.de
atmelwlandriver.sourceforge.net
(add http to get these to work)

The Berlios docs say I need to make sure the /lib/modules/2.4.20-6/build file is pointing at the root directory of my kernel sources. How would I set this up?
at76c503a.berlios.de/support.html#compile

Right now the build file is a dead link, pointing at:
../../../usr/src/linux-2.4.20-6

The adapter is for Debian Linux, but I need to compile on a Red Hat 9 machine and copy the files over. My Debian machine has very limited disk space (256 megs) and has no gcc. Both machines have kernel ver 2.4

Any help is greatly appreciated, I've been fighting with this for 6 hours now.

Myrdos 02-17-2004 05:56 PM

Yes indeed, I believe I'm on the right track with this kernel source stuff. Here's the end of the .config file generated from the sourceForge make config:

DEBUG=
CONFIG_MODVERSIONS=N
# runtime variables. Generated by setup.sh
KERNEL_SRC =
HAS_FORMS = n
PCMCIA_CONFIG = /etc/pcmcia
PCMCIA_SRC = PCMCIA was not configured
PCI_DES = /lib/modules/2.4.20-6/kernel/drivers/net
PCMCIA_DES = /lib/modules/2.4.20-6/kernel/drivers/net/pcmcia
USB_DES = /lib/modules/2.4.20-6/kernel/drivers/usb
USB_CONFIG = /etc/hotplug
MAN_PATH = /usr/share/man/man1
NEW_KERN = n

The KERNEL_SRC = line is blank! Where do I find these kernel sources? Are they the *.src.rpm files from my source code CDs? Or maybe a select few of them?

320mb 02-17-2004 06:06 PM

he he, the kernel source is usually in /usr/src/linux
and the linux directory is usually a symlink to linux<version>
Code:

ln -s /usr/src/linux-2.4.22 linux


now the build directory in /lib/modules/<version> is usually a symlink pointing to>>>>> /usr/src/linux
Code:

ln -s /usr/src/linux build

Myrdos 02-17-2004 08:13 PM

/usr/src/ contains only 2 directories: redhat and debug
Debug is empty, and redhat contains only empty sub-directories.

When I type 'uname -r', I get 2.4.20-6

On my source CDs, I found kernel-2.4.20-6.src.rpm, but I can't figure out how to get at its contents.

While crawling the web, I found kernel-source-2.4.20-6.i386.rpm, which tries to update my system when I run it, but again provides no sources.

I also found linux-2.4.20.tar.bz2, which uncompresses nicely into folders with .c files in them. But, when I try to point build to its directory and run 'make', I get

gcc -MD -O2 -Wall -Wstrict-prototypes -pipe -fno-strict-aliasing -fno-common -Wno-sign-compare -Wno-unused -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DDRIVER_VERSION=\"v0.11\" -I/lib/modules/2.4.20-6/build/include -c at76c503.c
In file included from /lib/modules/2.4.20-6/build/include/linux/config.h:4,
from at76c503.c:76:
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
In file included from /lib/modules/2.4.20-6/build/include/linux/dcache.h:6,
from /lib/modules/2.4.20-6/build/include/linux/fs.h:19,
from /lib/modules/2.4.20-6/build/include/linux/capability.h:17, from /lib/modules/2.4.20-6/build/include/linux/binfmts.h:5,
from /lib/modules/2.4.20-6/build/include/linux/sched.h:9,
from at76c503.c:79:
/usr/include/asm/atomic.h:40:2: warning: #warning Using kernel header in userland program. BAD!

...which is the start of hundreds and hundreds of errors. What to do?


All times are GMT -5. The time now is 11:01 AM.