LWN.net Logo

DRI, BSD, and Linux

DRI, BSD, and Linux

Posted Sep 3, 2008 10:41 UTC (Wed) by anholt (subscriber, #52292)
Parent article: DRI, BSD, and Linux

(For background, I was the FreeBSD DRM guy before I switched to Linux, and Robert Noland has taken over what used to be what I did on FreeBSD -- port inside of the shared-core tree)

> When working in the common code directory, developers know to be careful about not breaking other systems.

This was never the case. The shared-core tree only ever really worked on FreeBSD when I was the latest commit in the tree with "fix Linux developer's commit for FreeBSD". I was always grumpy about this, and would always do my best to avoid breaking Linux and often test (though often fail) on it, so I could have the high ground and point to how they weren't being careful enough with me. Even when it wasn't OS-specifics in the shared-core directory, non-shared components would move forward and I would need to go and re-diff linux versus bsd and port changes over.

But I also struggled to bring the other OSes into the shared-core tree. I was baffled by how the NetBSD, OpenBSD, and Solaris people didn't want to work in the shared tree. I tried to convince people to submit patches that could be merged (though usually I got a massive diff of "here's where I took shared-core 6 months ago and then ported it to my OS", which I couldn't manage).

But then, looking at the just netbsd/freebsd integration that was done once, the code was becoming an unmaintainable mess. I never even managed to integrate the next-NetBSD patches I got once, which made the situation worse. The shared-core was already breaking down for managing 2 versions of 2 OSes. It was only going to get worse.

What I'm realizing now, is that the process I tried to maintain with shared-core was hopeless. We had this "shared" tree, that actually only ever shipped on one OS -- FreeBSD. Linux distros shipped distro DRM plus a few backports of drm.git stuff, NetBSD ships their own port that isn't in drm.git, OpenBSD ships their own port that isn't in drm.git, and OpenSolaris ships their own port that isn't in drm.git. So this drm.git tree was only ever being shipped wholesale on FreeBSD when I ran my little sed script to import it into FreeBSD.

What we're doing is acknowledging that the drm.git code was only for release on one out of the 5 OSes that DRM exists on. The developers for that OS should bear the burden of porting to their OS. Linux developers aren't too interested, shockingly, in writing code to an API to allow FreeBSD to release their code, when they can't even integrate that code they write into their own kernel for release!

Yes, this means FreeBSD now has to port the features that are developed on Linux (where all the features are developed, since the feature development I did on FreeBSD something like 5 years ago) out of a linux-2.6 tree. They'll join the ranks of the 3 other OSes porting the DRM from Linux, which the other OSes didn't seem to have big complaints about. Luckily for them, we have git now, and the process for porting can be easier than it ever was back when I was doing it.


(Log in to post comments)

DRI, BSD, and Linux

Posted Sep 3, 2008 18:40 UTC (Wed) by rsidd (subscriber, #2582) [Link]

Interesting post. I used to use FreeBSD till about 5 years ago and remember your name as the DRM guy. So it's a bit startling to learn that you've now moved to Linux.

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