I know ... but at the same time we all love well documented code don't we? Quite a double standard, which admittedly I'm also guilty of.Kevin wrote:I totally agree with you in theory. But in practice we all prefer hacking on code rather than writing documentation. So what happens is quite natural...
I've never ported a driver 1:1. But I've used Linux, *BSD or eCos numerous times as reference implementations to figure out how a specific hardware component needs to be interfaced with so it behaves the way I want. Also in that regard the GPL isn't a problem either, unless you are sticking too close to the GPL'd implementation.Kevin wrote: Also, re "some effort": Have you ever tried porting a Linux driver?
EDIT: Oh my god that sounds so much like justifying plagiarisms "if you just change it enough so no one will know". I hope everyone understands that this is not what I'm trying to say!
Yes I only have a handful of drivers (for the hardware that I use). Maybe I haven't reached the point where drivers are just stupid boring work yet or it is because I don't really consider drivers to be "part" of the OS as much as applications are. I rather consider the interface (driver API) the important part and with a standardized interface you "give away" a big part of your OS. Not saying that is bad, I mean there are things in an OS that people just expect - terminal (with ls, cd), files, BSD sockets, C library, POSIX functionality, a windowed environment (if the OS should have a GUI) - so in a way everyone is already letting "someone else" determine how their OS should be structured.Kevin wrote: Let me guess: Your OS doesn't have more than a handful of drivers yet. Because soon you'd realise that drivers are not where you can be creative and where your OS could try doing things differently. Drivers are just stupid boring work.
Also in my book once you hit the "mass" market and need a vast number of drivers you are out of the hobby environment anyway.
Lastly if my goal was supporting as many platforms are possible of course I would give up total control of the device driver interface structure so I could just use available drivers.
Yes not scattering man power over a dozen different projects that all basically do the same thing is a good thing but as much as we love to hack on code than write documentation we also love hacking on our own projects rather than someone else's .Kevin wrote: Sharing code with other projects for boring standard parts is a good thing and an important reason for the strength of open source. (Which is also why I recommended using an existing interface for the drivers, seeing that he's not really doing anything different from CDI here.)