TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:10666] Recompiling a tulip driver for lrp
> gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c tulip.c
> `[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`
>
> This produced about 100 errors - too many to list here. Now that I
> look at this again I am thinking it must have something to do with
> the following:
>
> [ -f /usr/include/linux/modversions.h ]
>
> but I haven't got back to rebooting the system and investigating it -
> not that I would have much luck figuring out the problem anyhow. What
> am I missing here??? Is there a modversions.h file in the 2.0.36 tree
> that I need to point to instead??? It must be obvious to someone!
The statement '[ -f /usr/include/linux/modversions.h ] && echo
-DMODVERSIONS' will output '-DMODVERSIONS' if the file
/usr/include/linux/modversions.h exists. The statement is encased in
backquotes, so any output from that statement is tacked onto the command
line:
If modversions.h exists:
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c tulip.c
-DMODVERSIONS
If not:
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c tulip.c
I'm guessing that the modversions.h file you have there is for Linux
2.2. Make sure that /usr/include/linux is a symlink to <path to linux
source>/include/linux I'm guessing that is the problem in some way..
You said you extracted linux in /usr/src/2.0.36. Linux tarballs usually
extract into a subdirectory named 'linux', so your path to the linux
source may be /usr/src/2.0.36/linux or /usr/src/linux/linux, rather than
just /usr/src/linux...
If that's the case, try either moving all the directories down a level
('mv * ..' might work) or just delete the mess and start over by doing:
cd /usr/src
mkdir linux-2.0.36
ln -s linux-2.0.36 linux
tar zxvf linux-2.0.36.tar.gz
--
_ _ _ _ _ ___ _ _ _ ___ _ _ __ Oxymoron: Bosnian
/ \/ \(_)| ' // ._\ / - \(_)/ ./| ' /(__ Cease-Fire
\_||_/|_||_|_\\___/ \_-_/|_|\__\|_|_\ __)
[ Mike Hicks | http://umn.edu/~hick0088/ | mailto:hick0088@umn.edu ]