Where can I find the Kernel Headers?

Using applications, configuring, problems
Post Reply
Message
Author
Xyen
Posts: 12
Joined: Thu 20 Nov 2008, 09:37

Where can I find the Kernel Headers?

#1 Post by Xyen »

hello everybody

in order to compile a vpn client, its installation program asks for the "kernel headers" and mentions that they should be in a directory like "/usr/src/linux*". well ... i cannot find such a directory...
i am running Puppy Linux from usb stick.
can someone tell me where i can find these files?


... this is the vpn client i am talking about:

LinuxTexan
Posts: 15
Joined: Thu 20 Nov 2008, 14:50

#2 Post by LinuxTexan »

Are you using the devx_xxx.sfs file? I believe all of the kernel headers are included in that package. For Puppy 4.0, copy the devx_410.sfs file to the /mnt/home directory on your USB stick.

IIRC the files will then be in /usr/include.

User avatar
gray
Posts: 316
Joined: Fri 23 Feb 2007, 22:42
Location: Adelaide - South Australia

kernel headers

#3 Post by gray »

Unfotunately the kernel headers have not been in the devx_xxx.sfs for a few releases now. If you are using a puppy with the 2.6.25.16 kernel I created an sfs pack for the headers, it is called kernelheaders_409.sfs and can be found at http://www.puppylinux.ca/tpp/NOP. You just have to rename it so that it is found by the bootmanager i.e for puppy 4.1.1 rename to kernelheaders_411.sfs. Note it has to be used with the devx sfs.

LinuxTexan
Posts: 15
Joined: Thu 20 Nov 2008, 14:50

#4 Post by LinuxTexan »

Thanks for clearing that up. I guess I was remembering an earlier release. Keep me honest!

Xyen
Posts: 12
Joined: Thu 20 Nov 2008, 09:37

#5 Post by Xyen »

thank you for packing the kernel headers for me. i have tried to download the pack since yesterday, but the message "Concurrent download limit exceeded." appears permanently.
nevertheless, my puppy version is 4.1.1. can you tell me how i can find the kernel headers by myself?
and what do you mean by "it has to be used with the devx sfs"? (is there a devx_xxx.sfs file? pfile can only find pup_411, libsys*, dir2sfs, dosfsck, mkdosfs, PUPXXXSFSS as .sfs files. where is it?)
after that, do i have to pack them into an sfs file (how?) and copy this to the /mnt/home/ dir on my usb stick? (recently there is not subdir on my puppy usb stick, there are just a few files in the root dir.)

LinuxTexan
Posts: 15
Joined: Thu 20 Nov 2008, 14:50

#6 Post by LinuxTexan »

puppy sfs files are loaded to your drive at /mnt/home. These squash files are 'add in' files and are not included with the distro. Here's the link for the 'devx' files. You want the correct one; 4.1 uses the 410 file, 4.1.1 uses 411.
http://distro.ibiblio.org/pub/linux/dis ... modules-4/

Download the file and copy it to your USB drive. When you boot puppy from the drive, a menu will pop up asking you whether you want the files to start on boot up. Select the mode you want.

Now you will have gcc and all the subsequent tools for development on your PC! This is extremely cool and kudos to Barry et al for this.

User avatar
rp777
Posts: 6
Joined: Sun 08 Jun 2008, 19:02
Location: Kauai, Hawaii, USA

Labjack Interface

#7 Post by rp777 »

HI,

I am also interested in kernel headers. the driver i am trying to make & install is for the LabJack U3 analog/digital interface. Any information on how to obtain these would be greatly appreciated. (I also tried, and was denied the download posted by gray.)

thanks all, Ron

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#8 Post by Pizzasgood »

I think installing the full kernel source will automatically cover it, right? You could grab the kernel-source package for your Puppy from here:
ftp://ibiblio.org/pub/linux/distributio ... modules-4/
(Check your kernel version with uname -r)

Once you download the file, if you have a non-full-hd install, you can rename the file to kernel_XXX.sfs (where XXX is the Puppy version without dots, for example 410 for 4.10) and then install it like any other .sfs file. If you have a full-hd install, you install it manually by mounting it (just click), opening a terminal in that directory, and copying all the contents to / like so: cp -a * /
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
rp777
Posts: 6
Joined: Sun 08 Jun 2008, 19:02
Location: Kauai, Hawaii, USA

thanks, Pizzasgood

#9 Post by rp777 »

Thanks, Pizzasgood, that's the ticket. Got the LabJack driver working easily with the kernel source installed. If you need to measure or count something with your puppy, it's pretty nice. This is on an Alix1.C, running in my electric car, measuring motor current and voltage, counting Kwh.

User avatar
gray
Posts: 316
Joined: Fri 23 Feb 2007, 22:42
Location: Adelaide - South Australia

Alternative download site

#10 Post by gray »

Kernel header sfs for k2.6.25.16 can also be found at:
http://download.tuxfamily.org/nop

gammagone
Posts: 21
Joined: Wed 19 Nov 2008, 12:12

#11 Post by gammagone »

I think installing the full kernel source will automatically cover it, right? You could grab the kernel-source package for your Puppy from here:
ftp://ibiblio.org/pub/linux/distributio ... modules-4/
at ibiblio the src package is named:

kernel-src-2.6.25.15-patched-puppy4.1.sfs

is this a typo?
or did i download the wrong thing?

using 4.1.1 standard full install

Xyen
Posts: 12
Joined: Thu 20 Nov 2008, 09:37

#12 Post by Xyen »

ok, what i guess to have understood is:
the kernel headers are in the file devx_411.sfs (i am using Puppy 4.1.1) which i download from http://distro.ibiblio.org/pub/linux/dis ... modules-4/. (this is the kernel headers, and i do not need any other files, right???)

i copied the devx file into the ~ directory, mounted it, and the files of the devx have appeared in the /mnt/+root+devx_411.sfs directory.

so, where are the kernel headers exactly now? are they in the /mnt/+root+devx_411.sfs/usr/include directory???

i tried to install my vpn client (file attached to my first post) with this directory, but there appears an error message ("Making module ./driver_build.sh: line 50: make: command not found". driver_build.sh's line 50 is "make "KERNEL_SOURCES=${KSRCDIR}"".), so the kernel headers seem not to be there.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#13 Post by Sit Heel Speak »

Xyen wrote:...i guess...the kernel headers are in the file devx_411.sfs...
You're almost there. devx_411.sfs is the compiler. For Puppy 4.11 you can get the kernel headers, as gray says, from
http://download.tuxfamily.org/nop/kerne ... 16_410.sfs

Instructions for frugal and full installs:

Frugal install:
1. Download (or copy) devx_411.sfs and the kernelheaders .sfs to /mnt/home.
2. Rename the kernelheaders .sfs to kernelheaders_k2.6.25.16_411.sfs (or whatever Puppy version).
3. Menu --> System --> BootManager --> Choose which extra SFS files... --> click the right-arrow "Add" to move the two .sfs's over to the right-hand side. If you have other .sfs's in /mnt/home, you may wish to check the "Ignore above user selection, load all with '_411' in filename" checkbox.
4. Click OK then Quit to exit BootManager.
5. Reboot.
6. Menu --> Utility --> rxvt and issue

Code: Select all

gcc
and you should see "no input files". Open rox and see if subdir /usr/src/linux-2.6.25.16 exists. If yes, then you now have the compiler and the kernel headers.

Full install:
1. Download (or copy) devx_411.sfs and the kernelheaders .sfs to /root.
2. Click on the icon for devx_411.sfs, to mount it.
3. In the /mnt/root+devx_411.sfs rox window, right-click-in-whitespace, Window --> Terminal Here, issue

Code: Select all

cp -a * /
sync
to copy the contents of devx_411.sfs into your main filesystem.
4. Click again on the icon for /root/devx_411.sfs, to unmount it.
5. Click on the icon for kernelheaders_k2.6.25.16_410.sfs, to mount it (no need to rename it as in the frugal install).
6. In the /mnt/root+kernelheaders_k2.6.25.16_410.sfs rox window, right-click-in-whitespace, Window --> Terminal Here, issue

Code: Select all

cp -a * /
sync
to copy the contents of kernelheaders_k2.6.25.16_410.sfs into your main filesystem.
7. Click again on the icon for /root/kernelheaders_k2.6.25.16_410.sfs, to unmount it.
8. Open an rxvt window and issue

Code: Select all

gcc
and you'll see "no input files" if succeeded.
9. No need to reboot, if a full install.

HTH, SHS
Last edited by Sit Heel Speak on Mon 01 Dec 2008, 07:01, edited 1 time in total.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#14 Post by Sit Heel Speak »

If you discover that, for some strange reason, gray's kernel-headers .sfs does not contain certain kernel headers which your make tells you are missing, then you can get the full Puppy 4.11 kernel source from

http://puptrix.org/sources/kernel-2.6.25.16/

It is linux-2.6.25.16-src-patched_squashfs_unionfs_aufs_lzma_mt.tar.gz

For example if you downloaded it to the already-mounted partition /mnt/sda1
then open an rxvt console and issue

Code: Select all

cd /mnt/sda1
tar -xzvf linux-2.6.25.16-src-patched_squashfs_unionfs_aufs_lzma_mt.tar.gz
mkdir /usr/src
mkdir /usr/src/linux-2.6.25.16
cd linux-2.6.25.16
cp -a * /usr/src/linux-2.6.25.16
cd /usr/src
ln -s linux-2.6.25.16 linux
exit
and now you have the real full set of kernel headers. Try the compile again.

Xyen
Posts: 12
Joined: Thu 20 Nov 2008, 09:37

#15 Post by Xyen »

thank you Sit Heel Speak for your clear and really detailed installation steps!!

at first, i have been trying the method in your second post (linux-2.6.25.16-src-patched_squashfs_unionfs_aufs_lzma_mt.tar.gz).
i followed every of your steps, it worked fine, and at the end, i got the /usr/src/linux with all the files of the tar file.

is that the directory to be stated for the location of the kernel headers?

when i try the installation of that vpn client with /usr/src/linux, there still appears the same error message. (same for /usr/src/linux/include).


edit:
now, i have also tried the full installation described in your first post.
there was an error message while copying the files of the devx into / ("cp -a * /"), it is:
cp: cannot create regular file '/bin/clear': Text file busy
cp: cannot create regular file '/usr/bin/strings': Text file busy

but :D i just ignored it *g , went on doing your steps without further error messages, then tried the installation of the vpn client
and IT WORKS!! the vpn client is installed successfully =)))))

(there is now just a problem with this client.. it says: "Could not attach to driver. Is kernel module loaded? The application was unable to commicate with the VPN sub-system.")

gammagone
Posts: 21
Joined: Wed 19 Nov 2008, 12:12

#16 Post by gammagone »

thank you Sit Heel Speak for your clear and really detailed installation steps!!
ditto :D worked flawlessly!

Xyen
Posts: 12
Joined: Thu 20 Nov 2008, 09:37

#17 Post by Xyen »

Sit Heel Speak, finally i have also tried your frugal installation method
... works perfectly!

Post Reply