Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: foobar on 9 June 2002, 00:40

Title: ker-nel-headers
Post by: foobar on 9 June 2002, 00:40
Hi.
Where the heck can i find the kernel headers from my Mandrake 8.1 distro ? I need it to compile modem drivers, so i can visit this site under linux   (http://smile.gif)
Title: ker-nel-headers
Post by: slave on 9 June 2002, 01:00
I believe the kernel headers are located in /usr/src/linux-2.4.8 (if you haven't updated the Linux kernel) in Mandrake Linux 8.1.

Really, though, you should be using Windows; you don't have to compile anything on Windows because Microsoft is the only one with the source code anyway.
Title: ker-nel-headers
Post by: Heru on 9 June 2002, 01:35
I think someone hijacked XP User's account.

Anyhow, that is where they should be, obviously replace the 2.4.8 with the version of the kernel you have.  Have fun getting that modem to work though, it isn' always so simple.  Dail-up modems are sometimes tricky little beasts.
Title: ker-nel-headers
Post by: foobar on 10 June 2002, 18:25
I think so too   :D  

When i installed the distro, my /usr/src dir was completely empty but an /usr/src/RPM dir, which was empty, too !

Isn't there a .RPM file to contain these suckers ?
My kernel is 2.486mdk, i thought ....
Title: ker-nel-headers
Post by: Calum on 10 June 2002, 18:58
there will be an rpm somewhere on yr mandrake installation disks though, i haven't a clue how to find it amongst the other hundreds that are in there...
Title: ker-nel-headers
Post by: choasforages on 10 June 2002, 19:03
easy way to find the damn thing
mount the cd
then cast this unix spell hehhe

ls /mnt/cdrom/wherever/the/rpms/are |grep kernel

you should be able to find it. it should be something link kernel-source-blah-blah-blah.rpm
and also it should be kernel-headers-blab-blah-blah.rpm
atleast that is how redhat is, and since drak is rpm based it should be layed out simerly, but i don't have a mandrake cd laying around to test it though
Title: ker-nel-headers
Post by: foobar on 10 June 2002, 20:05
i've tried that once, i don't know on which RPM it was, but the modem compiler said it was an other kind of headers, and that you never should use them
and then make[1] errored out.

Do you know anything about different kernel headers ??
Title: ker-nel-headers
Post by: choasforages on 10 June 2002, 20:09
can you tell me what some of the stuff before make errored out, just the fact that make farked up only means that something farked up, howabout, posting maybe a page or two before and right up untile the make file errd then i might be able to figure out whats up
Title: ker-nel-headers
Post by: foobar on 10 June 2002, 22:51
I will soon post a report about make goin' bad,
but i have yet another question:

Aren't those kernel headers downloadable ??
Title: ker-nel-headers
Post by: voidmain on 10 June 2002, 23:38
You can bet that they are on your distribution CD. But of course they are also downloadable but you *must* make sure you download the headers for the EXACT version of kernel you are currently running on your machine, and best be the kernel headers that came with your distro.  If you really want to download them rather than installing them from your CD go to http://www.rpmfind.net (http://www.rpmfind.net) and type in "kernel-headers" and pick the one from your distro.

Now for compiling a kernel driver it may also be necessary to have the "kernel-source" RPM installed and built, but shouldn't be necessary.  You really should search google for "kernel howto" and read up on the subject.

[ June 10, 2002: Message edited by: VoidMain ]

Title: ker-nel-headers
Post by: foobar on 12 June 2002, 21:03
Ok.
So i downloaded the suckers, and i have this RPM file which contains something like this:

*.h
/linux
/anotherdir
/anotherdir

and in /linux:
*.h
/anotherdir
/anotherdir

Now, when i installed the RPM, it self-extracted into /usr/include (is this bad ????)
So i did
# ln -s /usr/src/linux /usr/include

And the ltmodem compiler said he couldn't find them.

Maybe i need to
# ln -s /usr/src/linux /usr/include/linux

Or would that make no diffrence ?
Or did i get the wrong package ?
like void said, i downloaded it at kernelfind.net
(or whatever the name was) !!

[ June 12, 2002: Message edited by: -=f00bar=- ]