porting to kernel 2.4

David Zeuthen david at fubar.dk
Tue May 18 01:10:33 PDT 2004


On Tue, May 18, 2004 at 09:14:55AM +0200, Hubert Figuiere wrote:
> Hi,
> 
> As far as I understand, libhal is, when used on Linux, for kernel 2.6.
> I still run kernel 2.4 (for some reason, don't ask), and I'd like to
> know how hard it would be to port to Linux 2.4, if doable at all.
> 

libhal is indeed portable to anywhere where D-BUS is available which
will mean pretty much any UNIX platform when D-BUS is complete (given
the goals of D-BUS). The difficult part is the hal daemon that libhal
speaks to. If someone gets hald to work on 2.4 your application will
run both on 2.4 and 2.6.

However, I'm not sure how easy it would be to port to Linux 2.4. One
of the key things of hal is to marry bus and class devices (e.g. merge
stuff like input.device onto a USB device etc.) and my experiences
with this on 2.4 is that it's pretty difficult to do. Maybe someone
else on the list can provide more information?

That said, the hal spec is pretty loose in the sense (and this is
quite intentional) that it doesn't explictly says the set of devices
need to constitute a tree as derived from sysfs on Linux 2.6. For
e.g. storage devices it simply says that there should be devices with
capability block and storage, some well-defined relationship between
them and some well-defined properties on them.

I've been playing around with the idea of writing a backend using
libusb and libpci for use on other kernels, but I haven't got around
to writing any code yet. Of course this wouldn't really easily solve
all the storage device usecases we've been solving the past months but
for stuff like digital cameras and other devices with user space
drivers it would pretty much work out of the box. Maybe the storage
use cases could be solved by applying some the tricks 2.4 distros use
to get removable storage working?

Hope this helps,
David

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list