DSL 4 kernel headers ?
Topic: DSL 4 kernel headers ?
started by: pmisch
Posted by pmisch on Dec. 04 2007,19:43I compiled wlan-driver modules for DSL 3.x successfully and posted them in the DSL-wiki (rt73.0, rt61.o, zd1211b.o).
These modules run well with DSL 3.x but not with DSL 4.x, because of the different kernel (DSL3: 2.4.26 vs. DSL4: 2.4.31) so I had to compile them again.
When trying to compile these modules for DSL 4.x I ran into following problem:
I downloaded <kernelsource.dsl>, <linux-kernel-headers.dsl> and <gcc1-with-libs.dsl>
but when I try to load the dsl-extensions as usual they dont show up.
No kernel-headers or kernel-source showup anywhere (not in /usr/src/linux or elsewhere)
What am I doing wrong?
Compiling worked so fine in DSL 3.x !
Any suggestions welcome.
Am I using the wrong extensions or wrong files?
Peter from Germany.
Posted by ^thehatsrule^ on Dec. 04 2007,20:40- DSL 4 uses a different kernel as stated, so you cannot use the old headers
- extensions should still load and should still show up, as they are just files
- even in DSL 3 you should not load linux-kernel-headers.dsl
- get the new kernel source in [download mirror]/current/kernel (I don't think there's a headers-only package yet) or kernel.org - but it is not a mydsl extension
Posted by pmisch on Dec. 04 2007,22:36Thanx for your quick reply,
You said, normal extensions should still load and should still show up in DSL4.x, as they are just files.
=> Yes, true, they do, but not these kernel-source files...
Even in DSL 3 you should not load linux-kernel-headers.dsl:
=> OK, this was my fault, please forget it.
Get the new kernel source in [download mirror]/current/kernel (I don't think there's a headers-only package yet) or kernel.org - but it is not a mydsl extension.
=> Well, thats exactly the point:
There are (at this moment) no kermel-source and kernel-header file available as DSL-EXTENSIONS for DSL 4.x. Those which are available work only with 3.x. As I said before, I tried these which are available and they dont work with 4.x.
So my wishes are:
1. Please could anyone make the correct source- and header-files
for DSL 4.x available as DSL-extensions so that compiling modules
is possible? They should be present somewhere, maybe with "roberts"?
2. And please specify the correct DSL-version in the MyDSL download repository names, e.g kernel-headers-3.x.dsl or kernel-headers-4.x.dsl.
That would be a great help for those who need kernel-modules. If I myself accomplish to compile modules for DSL4.x I will make them available via DSL wiki (wireless cards) as I did before for DSL 3.x.
Posted by ^thehatsrule^ on Dec. 04 2007,23:00
It's not a show stopper for you to download the vanilla source, unless you have some issue with the size?
2. Probably not a good idea, as the kernel are different in other versions (see older releases). It might be nice to have it listed in the .info though. And it's not hard to look at torsmo showing your kernel version.
Posted by pmisch on Dec. 04 2007,23:20Well, it seems that I made not clear enough where the problem is.
In DLS3.x compiling modules requires only:
- your module source-code
and everything compiles fine. Right or not?
I did this many times :-)
In DSL4.x something has been changed:
- Module source-code
and nothing works....
Even those loaded files dont show up.
It is not only a matter of wrong headerfiles
because we dont need them - at least in DSL 3.x.
Look, if we cannot compile modules correctly in DSL 4.x
then many friends wont be able to work with DSL 4.x ;-)
Thats the reason I started this topic.
Posted by ^thehatsrule^ on Dec. 04 2007,23:25You're still not getting what I wrote. Plus you're writing steps that are not recommended. Please re-read my posts.
Posted by pmisch on Dec. 04 2007,23:35Thanx anyway for your time,
I will reread your post.
Posted by john.martzouco on Dec. 05 2007,00:05Peter,
This is what you are looking for...
< kernel code for DSL 4.1 >
Take a look in < this folder >, there are 3 other files you'll need.
Posted by Juanito on Dec. 05 2007,03:38I compiled all of the modules enabled by the dsl-4 .config file using compile-3.3.5.uci (mydsl testing) and the full 2.4.31 kernel sources - there are some details in the info file.
The bluetooth and irda modules compiled in this way seem to work fine.
Posted by pmisch on Dec. 05 2007,14:22OK,
I followed your advices:
Installed Kernelsource 2.4.31, installed compiler gcc1-with-libs (and later tried also compile-3.3.5.uci) -
then adjusted Makefile of my module (RT61 WLAN PCMCIA card) -
then ran <./Configure> successfully.
Then <make> and got the error:
gcc -D -I/usr/src/linux-2.4.31/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.31/include/linux/modversions.h -DAGGREGATION_SUPPORT -DWMM_SUPPORT -Wall -Wstrict-prototypes -Wno-trigraphs -c -o rtmp_main.o rtmp_main.c
<command line>:138471553:59592: /usr/src/linux-2.4.31/include/linux/modversions.h: No such file or directory
Looked into /usr/src/linux-2.4.31/include/linux and indeed it is full of files, but there is no <modversions.h>
GRRR: In DSL3.4 it was present :-(
Now I will try to take the old kernel-source and copy the missing file(s) over to the new kernel-source. If this works I will try to strip the huge kernel.source down to a size according to the old one (3 MB).
If this is successful I will publish the kernel-source-2.4.31 as zip-file.
Posted by Juanito on Dec. 05 2007,15:33All the modversions.h file from the knoppix-3.4 cd contains is:
- but good point, this needs adding to compile-3.3.5
Posted by ^thehatsrule^ on Dec. 05 2007,15:49
It would be better to specify which one you are using if you are having problems...
Posted by pmisch on Dec. 05 2007,17:13I tried both with no success.
It seems not to be a matter of wrong compiler-type
but of incomplete kernel-source. I will try to create the
<modversions.h> according to Juanitos suggestions.
Thank you meanwhile
Posted by ^thehatsrule^ on Dec. 05 2007,17:16Looks familiar - did you try to patch and configure the kernel source tree first (and make dep)?
Posted by pmisch on Dec. 05 2007,17:19I thought this is already done :-(
If you could please tell me the procedure (never done this before)
I will try.
But anyhow the missing file must be made present, or?
Posted by ^thehatsrule^ on Dec. 05 2007,19:42The `make dep` step should create it for you, although you could try to hack it by manually creating it.
Posted by pmisch on Dec. 05 2007,22:49Well,
I copied <modversions.h> and two other files from the old
kernelsource, but that did not work. There were many
different compiler errors afterwards.
So the next step (tomorrow) will be to try your suggestion:
Hope that will do the trick :-)
Thanx for your help so far.
Posted by stupid_idiot on Dec. 07 2007,07:03Dear pmisch:
The kernel source is normally installed at '/usr/src/linux-2.x.xx' and symlinked to '/usr/src/linux'. The kernel headers are normally at '/usr/include/linux/'.
For kernel source:
1. Unpack kernel source in '/usr/src/'
2. Make '/usr/src/linux' symlink: 'ln -s linux-2.4.xx linux'
3. 'make dep'
For kernel headers:
I don't think there is a MyDSL extension for kernel headers currently.
< This page > [linuxfromscratch.org] shows how to generate kernel headers easily. I can confirm that it works (was able to compile software with the new headers).
Posted by Juanito on Dec. 07 2007,07:14From my notes (and help from Curaga) that (the linuxfromscratch page) is how I built the headers when compiling the 2.4.31 modules in dsl-3.4.7 using compile-3.3.5.uci and the full 2.4.31 kernel sources.
Posted by pmisch on Dec. 08 2007,09:38YIPPIIIIIEEEEH !!!!!
It works !
Thank you all for your good advices
to make the kernel sources for 2.4.31.
I am so happy ...
Now I have compiled the needed kernel module
for my PCMCIA wlancard flawlessly and am online
What I have done is:
1. Unpack downloaded kernelsource in '/usr/src/'
2. Make '/usr/src/linux' symlink: 'ln -s linux-2.4.31 linux'
3. 'make dep'
4. 'make symlinks'
5. 'linux/scripts/patch-kernel linux'
6. 'cd linux'
7. Copy 'modversions.h' over from old kernel-source.
The kernelsource was too big for my old system.
So I removed everything considered as unneeded
(looking in old kernelsource.dsl).
I zipped the resulting kernelsource and tested it several times.
Kernelsource-2.4.31.tar.gz is only 2MB -
I would like to make it available to all DSL-friends.
Could anyone please describe the exact procedure
to upload the kernel-source to the DSL-repository?
Meanwhile you can get the DSL-Extension HERE =>
< kernelsource-2.4.31.dsl > ~ 2 MB
as a small present to the DSL community who has given
me so much joy by using linux with DamnSmallLinux.
Posted by stupid_idiot on Dec. 10 2007,04:14
Extensions are submitted to Robert at extensions_AT_damnsmalllinux.org.
I think Robert updates MyDSL every 1 or 2 weeks, during the weekend.
Posted by irun5k on Dec. 31 2007,10:48
Thanks a millon for the DSL extension- saved me a lot of time! You da man!
Happy new year
Posted by pme127 on Aug. 31 2008,09:32Peter (pmisch)
According to VirtualBox: all you need are GCC, make (which isn't in MyDSL), and the packages containing header files for your kernel, is that your kernelsource-2.4.31.dsl (which I see is not yet in MyDSL). I dont think DSL is ging to be VB friendly any time soon.
Could you give simple step by step instructions for preparing DSL to receive VB Linux Guest Additions?
If it works will my shared folder then show up in the DSL File Manager?
Posted by Juanito on Aug. 31 2008,09:54
gcc and make are in compile-3.3.5.uci in the mydsl testing section. I'm also pretty sure that gcc and make are in gcc1-with-libs.dsl in the system section...
Posted by ^thehatsrule^ on Aug. 31 2008,14:40
Posted by pme127 on Aug. 31 2008,18:17Thank you
I have downloaded compile-3.3.5.uci and kernelsource-2.4.31.dsl and read the info files.
How do you do an md5 checksum in Linux?
Juanito, if the $ entries, are straight coppy in at the xterm prompt, I can just about follow as fare as make install as root, would that be sudo make install ? Make install what?
But I,m lost after that. How much of this is aplicable to VB Linux Guest Additions.
I am just beginning bash, Mark G Sobell's book.
Posted by curaga on Aug. 31 2008,18:45To calculate a md5sum:
Yes, one way of make install as root would be "sudo make install". Others would be starting a root shell from the menu, cd to the compiling directory, and then just "make install", and many other ways.
Posted by ^thehatsrule^ on Aug. 31 2008,22:21This is really getting off-topic, but I'll reply here. Should you need more help, it'd might be better to start a new thread.
Since DSL was already running on vbox (proprietary edition) as a guest, I took the liberty of seeing if the vbox guest additions would compile.
- booted a DSL 3.4.x frugal in vbox
- mydsl-load: compile-3.3.5.uci kernelsource*.dsl (2.4.26 seems to be included in compile-3.3.5.uci) XFree86.dsl (or xorg I guess)
- vbox host interface: devices > install guest additions
- in DSL, start a root shell
- link X to XFree86, i.e. `cd /usr/X11R6/bin; ln -sf XFree86 X ` (will be different for Xorg, you could also modify $PATH instead etc.)
- make the modules.* files writeable, wrote up something quick
- mount the cd, i.e. `mount /mnt/cdrom/ `
- run the installer, i.e. `./mnt/cdrom/*.sh `
- wait and it should successfully build
- it says to add a command to ~/.xinitrc so you could use a text editor and add it somewhere in the beginning with & appended
- it also says to restart the guest, but do not do that... you could probably just restart X
- did not test any further (was still running xvesa)
Posted by pme127 on Sep. 02 2008,09:59Thanks to all,
I got as far as 'cd $libmoddir' and error No file or folder. I'll give it a rest for now.
However, DSL in VirtualBox is also damnd fast and ideal for practicing commands, editors and shell programming, and can be cleanly restored in less than a minute.
Posted by ^thehatsrule^ on Sep. 02 2008,17:10I missed the / prefix. Edited post to reflect changes.
Again, this is getting very off topic.