Post a Comment
Wasn't there an article somewhere about someone implementing a Solaris driver in Java?
Now that Java is going to be open it would be nice.
Well, except that even if Nvidia, ATI, Netgear, or whoever could write one driver that could potentially work with 20 operating systems they wouldn't because Java can be decompiled pretty easily.
a day which will live in anonymity
What the heck does that mean? Are you sure you don't mean "infamy?"
On topic, though, I would love to see this become a reality. A large part of why some new OSes don't get off the ground is because they work on such limited hardware.
"The only nitpick I have is that the name EDI already has a meaning (Electronic Data Interchange - ANSI X12).
Maybe you should call it XDI instead? It has an 'X' in it, so it has to be cool, right?"
Eerr... http://en.wikipedia.org/wiki/XDI, http://www.xdi.org etc. I guess any three letter acronym is used somewhere, as long as the context is clear, it's no problem, imho.
Edited 2006-12-05 09:54
I have to admit, it works pretty well for Syllable. You don't have to implement a complete Linux API either; Linux tends to offer a whole bunch of little macros and functions that tend to do very simple things, and you can actually do without a lot of it. You can still make larger structural changes to your kernel and still maintain a fair level of compatibility with the important parts of the Linux API's. Something like a spinlock can only be implemented so many ways, or a set of atomic operations, for example.
Now that's not to say that something like EDI couldn't make things even easier, but I suspect the API's would eventually end up looking pretty similar to existing systems.
There are a couple of reasons not to implement Linux APIs:
1.If you mean Linux's user-mode API, I think it likely that device drivers will *implement* file system operations and should therefore not rely upon them.
2.If you mean Linux's in-kernel driver API, it can't be emulated or implemented because it doesn't exist. Linux's internal driver code runs on a continuous ad-hoc agreement between kernel hackers and driver developers, utterly without a specified API.
As we're discussing driver development, I'm talking about the API between the driver and the kernel. Yes, Linux does have one. It may technically comprise every single function and table in the entire kernel, but it is still an API.
The thing is, you don't need to emulate every single Linux kernel function. You just need to support some areas of functionality in a way that is close enough to the way Linux does them that you can port a driver from Linux with a few small changes. This is exactly how Syllable does it; there is a well defined driver API, but where functionality intercepts with Linux the implementations are similiar.
For example our atomic functions are almost identical, because there's only so many ways to implement an atomic increment operation on IA32, so why not just do it the same way? Memory management, mutexes: all of the low level functionality, is similiar enough to Linux that it's easy to port a driver. This sort of stuff doesn't change often within Linux.
The few places where implementing Linux functionality would be cumbersome are covered by a simple system header file "linux_compat.h" which wraps Syllable functionality to present a set of functions and macros that work well enough to be used with a lot of Linux drivers.
So yes, it can be done and we're doing it. Not only are we doing it, but it is in fact working out very well for us!
>As we're discussing driver development, I'm talking about the API between the driver and the kernel. Yes, Linux does have one. It may technically comprise every single function and table in the entire kernel, but it is still an API.
Except that implementing Linux's driver API also requires that drivers code for a monolithic kernel. Oops, there go all those interesting microkernel projects where the drivers can't access symbols inside the kernel.
Linux's driver API also can't work on microkernels because you would have to code a runtime driver API layer that polled "kernel variables" in order to send messages to the real kernel. Probably technically possible, but very hard and not likely to happen.
EDI, in contrast, requires only functionality that a user-mode library could translate into messages or even implement itself.
Edited 2006-12-01 15:43
I didn't understand the technical details of this entirely (slightly over my head) but could this be used to write a driver for 3d hardware that protects the trade secrets and whatnot, that can be combined with the other half of the driver - the OS half, so that a single binary object (per ABI and hardware platform of course) could be compiled into many OSs (like Linux, Windows, Haiku, etc.)?
It would be awesome if there could be at least some practical separation (even if it isn't necessary or enforced) between the hardware side and the OS side (I assume that's what this is all about, but I've been wrong before) that would allow the hardware manufacturers to guard their precious (mostly hardware related) secrets by releasing the compiled libraries that go with their hardware, while allowing the OS part of the driver to be Open Source, for all to port and poke at.
Even better if there is an easy tool kit that will help hardware makers write their drivers to run on all of Linux, Windows and Mac OS X.
The archive seems to have had its line endings changed (been eaten by mingw or cygwin, perhaps?). I've put up a fixed version at http://www.8325.org/EDI-3.4.tar.bz2.
Edited 2006-12-01 00:07
Well it's supposed to be on sourceforge.net.
http://sourceforge.net/project/showfiles.php?group_id=148100&packag...
However, I've tried several mirrors so far and the EDI archive is utterly corrupted. Ugh.
Same here, download is corrupted and appears empty.
I'm very interested in looking into this though. A few years ago I too read the UDI specifications (of which there are hundreds of pages of it) in high hopes of making my fledgling OS interact with others, but eventually discarded it as the author did after realizing the sheer magnitude of the specification and what all was required. The idea of someone creating a similar but simpler idea is very appealing.
Hiya all.
First of all, the archive is indeed corrupted. Sourceforge seems to eat every tarball I upload to them. I sent a new one to no avail. Anyone know a better hosting site for a broke high-school senior's coding projects? It also ate my kernel release.
nick8325's fixed mirror at http://www.8325.org/EDI-3.4.tar.bz2 works. I don't know what I'd do without kind guys like Nick. http://www.mytempdir.com/1092730 will also work. I don't know what to do about the official link in the article.
I hate Sourceforge. They never remember my password correctly, and now they require that everyone dos2unix (or the reverse?) source tarballs.
This is not at all what I hoped for the public introduction and release of EDI.
Edited 2006-12-01 05:43
is OSS, can be revitalized and there can be a licence where driver developers on UDI should give their source code. UDI is not for trade secrets, its for ease of development of OSS drivers. Imagine you have to write a different FireWire or BlueTooth stack for Linux/OpenBSD Haiku? Wasted effort. But UDI can help and is extensible. I think I should make a closer look.
I have looked at the specification, and UDI looks very C-based. How is this going to work with JNode (Java-based), House (Haskell-based) or any other OS that des not use the Unix paradigm of kernel, processes, address spaces, and so on?
It seems to me like this is going to hit the same trap os OSKit and OSLib did: Too specific to one way of thinking. If you want to restrict programmers so tightly, why not just write the final OS?
And this one too shows what I am talking about:
> EDI also calls for a partial implementation of POSIX threading, and
> allows drivers to take advantage of multithreading. I'm very sorry about
> having to standardize this, but most systems implement some kind of
> threading and many drivers require it.
C'mon, POSIX threading in a Haskell-based OS?
We need an aproach that is *independent* from the OSes where it is going to be used.
Maybe we could use a CORBA interface between the driver and the OS, so that the interface would be truly language independent.
;-)
My "suggestion" was just there to show that if you try to provide an API which would work for also for a Java, Haskell OS, there is a real possibility that the result is an unusable monster..
Solving the driver problem for OS which can interoperate with C easily looks good enough to me.






.
