[hsflinux] hsfconfig: compilation problems on recent kernels

Denis Dupeyron denis.dupeyron at mxmlab.com
Thu Apr 3 12:27:42 EST 2003


Thierry, 
 
There was somewhere on this board a patch for kernel 2.5.40 against version 021010 of the hsf 
driver. Here's the link: 
http://www.mbsi.ca/pipermail/hsflinux/2002q4/000561.html 
 
I tried to apply it to the current hsf driver, but it failed due to the code being modified quite a 
bit since then. I managed to manually reintegrate all the code to the new version. Then I 'make 
install' and run hsfconfig. It compiled OK with gcc 3.2.2 and kernel 2.5.66 (I'm using Gentoo 
Linux). So far so good. 
 
When I try to modprobe hsfserial, though, I get an 'Invalid module format' error. I tried to look 
into it, but got confused. What I gather is that often modules for kernel 2.4 don't always include 
a module init function, since it is not mandatory. For 2.5, however, it appears mandatory. 
Some of the compiled modules in the hsf driver do not seem to have a module init, and that 
could explain the error, but hsfserial.o for instance does have one. So... I then got diverted by 
this thing they call 'work' and stopped investigating. Anyway, I'm no kernel hacker, so this is 
getting complicated for my little brain. 
 
Anybody interested if I produce a patch ? I could also send a tarball of my modified version in 
its current state. What I don't understand is why the original patch was not merged with the 
official code base, as it was compatible with older kernels. Marc could probably answer this. 
 
I don't want to trigger a 2.4/2.5 kernel discussion, but it is obvious that today 2.5 is getting 
more and more usable, and personally, I find it far better than 2.4 since 2.5.65 (new scheduler, 
acpi and alsa included, input devices management, ATAPI burners support, <add your most 
desired feature here>). I agree it's a development version, but work on an hsf driver for kernel 
2.5 will have to be done some day, and anyway there is no such thing as a stable kernel. 
 
Denis Dupeyron. 
 
----- 
 
Thierry Lathuille wrote: 
 
Hello, 
 
I've experienced problems as I tried to execute hsfconfig with a 2.5.64  
kernel. The compilation of the modules is impossible, I get the same errors  
as David Weenink with his 2.4.20-2.54 kernel. 
 
This is caused  by changes in the kernel code (these errors are due to changes  
of the task_struct structure defined in include/linux/sched.h)  
 
So, parts of the hsf code will have to be changed accordingly some day. Is  
anyone already working on this (Marc ?) ? 
 
For information, I had  other problems before this one : 
 
- Some error with __attribute_used__  which I don't remember exactly. 
 
- The include/asm-i386 directory in the kernel source tree now contains  
subdirectories for different machine architectures, and we must know from  
which one to include some files (irqvectors.h, included from irq.h, was the  
problem).   
 
These ones I could workaround  (in a not-very-clean way...) but the rest seems  
to be a much bigger job. And these recent kernels are much better suited if  
you want to keep your laptop cool...  
 
So, thank you to anyone who will help fixing this soon ! 
 
Thierry Lathuille 
 




More information about the hsflinux mailing list