LWN.net Logo

HALs considered harmful

HALs considered harmful

Posted Mar 20, 2005 23:02 UTC (Sun) by salkin (subscriber, #1569)
Parent article: HALs considered harmful

If the purpose of all the HALs is for driver writers to be able to abstract away the differences between Linux, Windows, Solaris, et al, then perhaps the "Right Answer(tm)" is for someone to step up and write just one, single, good HAL. Having one HAL that was actively maintained through many product release cycles, used by many hardware vendors, etc. would remove the "orphaned code" problem and still let hardware vendors save some design and maintenance money . In fact it would make it a lot easier for them to decide to do a linux-native driver in the first place. And just one HAL in the kernel (as opposed to at least one per vendor) shouldn't be too big a headache. (Plus it could be tuned - the payoff would be there if many drivers used it.)

Obviously there are downsides, not least of which is that no such effort exists, and qualified and motivated developers would need to be found and organized. But the vendors have a strong motivation here, and money to save. Perhaps there is some traction there - to organize this development effort so that each vendor doesn't have to maintain their own HAL and can save on driver development costs.


(Log in to post comments)

HALs considered harmful

Posted Mar 24, 2005 21:25 UTC (Thu) by eli (guest, #11265) [Link]

The purpose of a HAL is, as you say, "to abstract away the differences between Linux, Windows, Solaris, et al." (Add VxWorks, and other RTOS's to that list.)
The interesting thing here is that "just one, single, good HAL" means writing an API for drivers to code against, and writing an implementation of that API for every supported OS; one for Windows XP, one for Windows 2003, ..., one for Linux 2.6, one for Linux 2.6.10+, one for Linux 2.4.n+, one for Solaris x.y, one for VxWorks a.b+, etc.

But once you do that, you've started a separate project. You might be able to get your HAL.Linux.2.6.current driver accepted into the mainline kernel (maybe), but that's only one part; you need to get the hardware vendors on board too. That might be feasible... write their driver to your HAL API once, and they can run on 17 different OS flavors. The license would be an interesting bit of legal work... GPL compatible for the Linux layers, (BSD if you could argue it wasn't a derived work), probably BSD or the like for the rest.

It'd be an interesting possibility--but it would be its own project separate from the Linux kernel development.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds