Adam Rosi-Kessel: Republic National Committee Helps Obama Fundraising
The only plausible result from this RNC mailing, I think, is increased fundraising for Obama over the next few days:

"Terrorists Don't Care Who They Hurt"
The only plausible result from this RNC mailing, I think, is increased fundraising for Obama over the next few days:

"Terrorists Don't Care Who They Hurt"
I've just started a new job, so I decided to take a few days holiday in
between and work on something that's been on my todo list for way too long
now -- making the debian-installer work on the D-Link DNS-323.
After a couple of days of work, I've just finished off the install of
Debian on my DNS-323, which I initiated by loading a firmware image into
the web interface of the stock firmware, and then SSHing into the machine
at the appropriate moment. What this means is that anyone with a
DNS-323 can install Debian on it. I think that's worthy of a small, quiet
"woo hoo!"...
Looking back now, it seems to have been a fairly simple and
straightforward operation, but I can remember that it didn't look so
simple when I started a week ago. So, in the interests of perhaps
short-cutting someone else's adventure into the world of d-i hacking, I'm
writing everything up while it's fresh in my mind (the benefits of being
on holidays -- plenty of time to write long blog posts). Alternately, if
anyone has a random device they'd like to see d-i on but doesn't have the
inclination to do it themselves, feel free to send me one and I'll do it
for you.
Before I begin, I've got a few "shout outs" (I think that's what the cool
kids are calling it these days) to people who've helped me along the way.
First off, Martin Michlmayr has answered innumerable dumb questions from
me, and I think wrote most of the parts of d-i that I've extended -- it's
fair to say that I'd have had no hope of doing this without him. Thanks
also to the people in #debian-boot and #debian-arm for
answering questions and putting up with my frequent bouts of
self-congratulation whenever I passed the most miniscule milestone.
Finally, everyone who has put work into d-i has my thanks, too -- it's not
perfect, but it's a damn sight better (both to use and also to hack on)
than any other installer I've ever met.
So, without further ado, off we go...
Work out how to get a console
Unless you are a guru of unbelievable skill, you will undoubtedly not do
everything quite perfectly the first time, and you'll want to see the
kernel/init boot messages, and maybe in some cases try some investigation
and diagnostic work. For that, you're going to have to have some sort of
console access.
If the device doesn't have a full screen/keyboard thing going on, the
chances are you'll almost certainly end up with a serial console. A few
devices have a network management thingo that will give you a console,
usually over VNC or some sort of horrid Java applet, but I've only ever
encountered that in rackmount servers, which have a keyboard/video
interface anyway...
In theory, I suppose, the kernel could provide a network console, but I've
never heard of such a thing being attempted, and Google is not helping me
out. I might add that to the todo list as a future hacking project...
On the DNS-323, it was a serial console that was needed. Like a lot of the
embedded devices I've seen, it didn't quite talk RS-232, so I needed an
adapter (I got a TTL-232R-3V3 USB-to-3.3v-serial adapter from a
local electronics supply place, which worked perfectly with Linux as
soon as I plugged it in). I needed to solder a few wires to a connecter
inside, and connect that up to the USB doohickey, but it all came good in
the end. The chances are someone's done a similar job for your device of
choice, so a search for things like "devicename serial console" will almost
certainly pay off.
Work out how to load and boot a kernel/initrd
Your development work will involve booting weird kernels and initial
ramdisks to make everything work; you need some way of stuffing those into
the device and booting from them. Everything has a boot loader of one
sort or another; working out what you've got and how to make it sing and
dance is the ultimate quest here.
How this is done will vary greatly from device to device; the WRT-54GL,
for example, waits for a tftp connection for a couple of seconds on
startup, which you can use to send a new firmware; many other devices have
a boot loader that you have to explicitly control (via the console), but
it will make a tftp connection out to another machine if you ask it to.
Some devices you just need to load the data in via serial cable (at
115200bps it's bearable; at the 9600bps I've heard some devices work at,
it would be tres painful).
The DNS-323 runs uBoot as the boot loader, which will do a tftp request by
default. However, D-link, or Marvell, or someone in the
decision-making chain for this thing decided to knobble it and removed most
of the useful commands, so sending the thing via serial port is the only
option. Since writing to flash takes a pile of extra time, I found
(eventually) that you can just load the data into RAM somewhere and boot
from there, without needing to write it to flash (also handy to avoid
wasting precious write cycles), since you can tell uBoot to boot a kernel
located anywhere in the address space. Obviously you need to reload the
kernel/initrd on every boot if you don't write it to flash, so if you've
got a "stable" kernel or initrd that you think you'll be using for a while
(when you're testing the other item) you should flash it then.
One note on uBoot, that took me far too long to work out -- you can't just
stuff a kernel fresh off the Makefile in and assume it'll work -- uBoot
needs a special header prepended that tells it all about what you're
loading (architecture, file type, compression method, etc). You "wrap" a
file in this uBoot header with the "mkimage" command (in the
uboot-mkimage package in Debian).
Incidentally, if you need to remove the uBoot bits from a file, just strip
the first 64 bytes off -- that's all the uBoot header is, so something
like this will do nicely:
dd if=file.uboot of=file bs=64 skip=1A final uBoot warning: it's fairly important to specify a "load address" for the files; if you get them wrong, your kernel and initrd may or may not boot (I never quite got the hang of why some wrong values worked and some didn't). If your device uses uBoot, and you have the ability to extract the uBoot-enabled kernel and initrd from a vendor-provided firmware image, you can use mkimage -l to inspect what all the values need to be for your own kernels and initrds. Just stick with them. Does Debian support your hardware? Obviously, if you want to run Debian on something, Debian has to support that hardware. The easiest way to test this out is to try an install. For this, you'll need to retrieve an appropriate kernel and initrd pair for the installer. Some arches, like i386 and amd64, only have one kernel and initrd for the installer, so you just have to choose if you're going to netboot, or do a full CD install, or whatever. Other arches, though, like arm, have subtly different images for different machines. There are two reasons they vary: firstly, they often need to split into subarches, where they all share a general CPU architecture but there are enough differences in the hardware that they're not all supportable by the same kernel. At a more fine-grained level some different machines of the same sub-architecture need differently formatted firmware images to boot. On ARM, in particular, it's pretty common to need to prepend a "device ID" to the kernel image so that the kernel knows what sort of machine it's booting on, which means that every machine typically needs it's own kernel image, regardless of any other issues with firmware formats. Choosing the sub-architecture should be relatively straightforward, if you know much about the machine you're targetting. Picking a machine type can be a bit harder, but again, if you know what your boot loader needs, it shouldn't be too hard to find a kernel/initrd from the existing machines in your subarch that you can mangle to fit. Load up your kernel/initrd into the device, boot it, and see how far it gets. You might get lucky, and the kernel inits, your hard drives are detected, your NIC is initialised, and you're off and running without further ado. Or you might not be so lucky. The worst case is that the kernel doesn't even get as far as loading the initrd -- it might not print anything at all, or the kernel might hang part way through the boot. This is likely to require a fair amount of debugging fun, as initial boot failures get a bit tricky. A better situation is where the kernel boots OK, and d-i starts, but something in the install process falls over. This can either be a kernel/driver problem, or a d-i problem. Either way, since d-i has started, you're likely to be able to get a shell and do some debugging. In order to make d-i work, you need to have somewhere to install to (disks, usually) and a source of packages to install from (CD/DVD if you're on a suitably large device, or the network otherwise). These are the two key ingredients you need; most everything else is stuff that ranges between "nice to have" and "critical" for operational purposes, but which has absolutely zero impact on your ability to do the install, so we'll ignore it for now. For the DNS-323, I had a few kernel problems (which I'd been warned about by Martin before I started) -- the NIC wasn't initialised with it's MAC address, which meant it was running around my Ethernet screaming "I am 00:00:00:00:00:00! Ph33r m3!", and the SATA controller just didn't seem to exist at all. These were kinda critical to doing an install, so it was time to get hacking to make those work. There were also a couple of parts of d-i that needed tweaking -- the preseeding code didn't support the device, and I needed to package a tool to build a "complete" uploadable firmware image and teach d-i how to use it. Apart from that, though, things were looking pretty good. Make the Debian kernel support your hardware Once you've worked out what hardware you need to make work, you need to dig into the kernel and fix it. Sometimes, if you're really lucky, a kernel version newer than the one currently in Debian has better support for something, and you can backport the fix / feature improvement. Other times, there's something similar already in the kernel for a different device and you can crib off that (I did this extensively for my little fixes). Then there's the "ask an expert" school, where you find someone who knows what they're on about and pick their brain (I did a bit of that, too). Finally, there's plain old "research and development", for which there are piles of documentation already out there. My changes for the DNS-323 came to 121 added lines and 16 deleted lines, most of which was cribbed-and-tweaked from other parts of the kernel. I might have written 10-20 lines of code "from scratch". It's not always scary-hard. Cross-compiling your own kernel One thing that I think needs mentioning in the kernel hacking department is cross-compiling a modified kernel for testing purposes. Chances are your main workstation has a lot more grunt (and build tools) than whatever you're trying to get Debian onto, so cross-compilation is the way to go. You need to first grab a copy of the source you want to build (from apt-get source linux-image-blahdiblah, or a release tarball, or Linus' git repo, it doesn't really matter) and a cross-compilation toolchain. For my cross-compilation toolchain, I just added this to my sources.list:
deb http://www.emdebian.org/debian/ unstable mainthen I ran apt-get update, and installed these packages:
binutils-arm-linux-gnueabi gcc-4.1-arm-linux-gnueabi gcc-4.3-arm-linux-gnueabi-base libc6-dev-armel-crossKudos to the emdebian team for making that such an utterly painless exercise, by the way -- the days of needing to faff round with gcc sources to get a cross-compilation toolchain are apparently over. Once you've got a source tree and a cross-compiler available, you can run any of the usual kernel make commands (like make zImage or make oldconfig), as long as you've got a couple of make variables defined. In my case, I used:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-ARCH tells the kernel what architecture to build for (useful in all make commands because not all arches have the same config options in make menuconfig, for example) and CROSS_COMPILE tells the build system what to prefix the calls to gcc, ld and such with (if you installed the same cross-compiler packages as I did, you'll find it installs files like /usr/bin/arm-linux-gnueabi-gcc, so you can ls /usr/bin/*gcc to find out what you'll need for the CROSS_COMPILE setting). Hack d-i to make things work In addition to tweaking the kernel, it's quite possible that the internals of d-i might need some tuning. It's possible that d-i might need to be "taught" to recognise the hardware in your device, or you'll need to extend some aspect of the installation process to complete the installation. In order to hack d-i, you need to know a bit about how it works and how it is structured, so let's run through that first. The entireity of d-i is based around udebs, which are packages of the same format as "real" debs, but which have been built differently (against a small libc, for instance) and have had everything that isn't absolutely necessary (docs, non-essential scripts, extra functionality, etc) stripped out of them to create the smallest possible packages. There are a variety of different udebs -- most are derived from otherwise normal, law-abiding citizens of the archive, like busybox (basic unix utilities like cp and ls), the shell that's used in the installer, parted, various libraries, and so on. Others are "special", and have no big brother in the archive. These are mostly "task" udebs, that define what actually happens in the installer. When they're "installed", they have special fields in the package metadata that define where in the install sequence they go, and they end up on the menu you see if your installation goes a bit pear-shaped. The tricky thing about udebs is that, as small as they are, there's too many of them to be able to have them all available when the system first boots, so even the "setup" of the installation gets done in several stages. First, the kernel and initrd boot. The initrd contains just enough stuff to get access to the rest of the udebs, and nothing else. Even this early stage is built from udebs -- there's lists of what goes into the initrd for various architectures and flavours of installer under installer/build/pkg-list in the d-i SVN. If you need an extra udeb in your initrd, that's the place to specify it. Once the initrd has gotten access to a source of packages (off a CD, over the network, telepathy, whatever) it can drag the rest of the packages it needs from there. Space is still an issue at this point, though -- there's no diskspace yet to put anything onto, so everything needs to fit into a ramdisk. Don't go loading anything you don't need. The packages loaded at this stage are what defines most of the steps that will be done for the rest of the install, so once all those extra udebs are loaded, the remainder of the install kicks off and does it's thing. Different architectures and install methods have different requirements, too, which complicates matters. For example, when you're installing on a regular PC with screen/keyboard, you can guide the install using that. However, if you've got no screen, how can you control the install? There's serial consoles, but requiring everyone to void the warranty (more) on their little embedded doodad by installing a serial console cable to install Debian isn't so hot. So, lacking a terminal, how do you control the install? Well, on install flavours for devices that might be in this situation, you can SSH into the installer and complete it that way. That feature is, like everything else, provided in a udeb -- called network-console, as it happens. But what IP address do you connect to, and what network settings does the device use? Again, without a console you can't configure your network, and not everyone has a DHCP server (and even fewer people have a DHCP server that will hand out an address that they'll know in advance, or be able to find out). So, there's a udeb (called oldsys-preseed) that does it's best to configure your network based on the settings already in the nvram for your device. In short, there's a lot of tricky, well-thought-out shit going on inside d-i, and you might have to deal with a little bit of it. The nice thing is that by now I expect most of the really hard problems have been solved, so with a bit of luck you'll only ever have to do minor tweaking. In general, all of the packages that are "d-i specific" live in packages in the d-i SVN. If you need to modify a udeb, you need to rebuild it and put it in installer/build/localudebs/ (creating it first if need be) and every time you change it, you need to delete installer/build/apt.udeb/cache/. To give a concrete example (from the ever-present DNS-323), I had to modify oldsys-preseed so that it would get the details from the nvram that the stock firmware uses to configure itself. This, in turn, required that the minix-modules udeb be included in the initrd, because the DNS-323's nvram is actually a small minix partition stored in flash. Painfully, this required some more hacking, because the armel d-i kernel wasn't configured to generate minix-modules. That might need some explanation... Since building the kernel is a fairly massive undertaking, CPU-wise, instead of building all the udebs from scratch there's a package called kernel-wedge to split a real linux-image package into lots of little udebs. There's a separate source package for each architecture, linux-kernel-di-$ARCH-2.6, that contains the configuration data for kernel-wedge to specify what udebs need to be built, and what goes into each of them. A small tweak to the armel package and voila! I had a minix-modules udeb to include in the initrd. With the config stuff I'd done in the d-i build itself and my changes to oldsys-preseed, we were done with d-i. Tell d-i how to build your bootable artifacts If your device needs a "different" install image from other similar devices, you need to write some makefile rules to build those files. Look under the installer/build/config/$ARCH/ directory to see the various rules files available. I had to package a new tool to create uploadable firmware images for the DNS-323, along with adding a rule to use that tool to build images. None of it was particularly difficult. Polish the diamond Getting d-i working is only part of the battle; it's quite likely that there will be other hardware in the machine that needs to be supported. This could involve kernel-level stuff to interface to the hardware, or userland tools to manage the hardware. There's several bits in the DNS-323 that still need work; I can't control the LEDs on the front panel, nor the fan, and I can't use the on-board temperature sensors yet. But, I do have Debian running on the thing, which is what I was shooting for. Examples If you're interested in exactly what I did, there are a number of bugs in the BTS that contain the patches I made:
Ok, it's not that bad. But according to LWN (Subscriber-only content at this time, Debian developers can get a free account, though), there is a possibility that the OpenStreetMap data set will be relicensed (from CC-attribution-sharealike) and that the new license will be contract based, which would mean at least a click-through license. There is, thankfully, also a group of people who think that BSD or even Public Domain-style licensing would be better. Personally, I think the latter is very much preferrable; OSM has (I think, and hope that's not too optimistic) become big enough that it should be able to out-gun every vendor trying to take away OSM's work: the vendor with his few people will just not be able to keep up with the sheer number of OSM contributors.

If you impede me doing something I want to do, you are an asshole.So now we can still upload (except when a bribe-loving ftpmaster is being petty or when the release team is expediting a transition) and we can still vote, and we can log into a machine or two. We're running low on powers to take away. Maybe we could create an even lower class of citizen, some kind of undermaintainer without any voting rights. Whee. DM was born. Instead of fixing the problems of class inequality, we created another class. Fantastic. Why stop there? Why not create more? Clearly nobody wants to work toward an egalitarian culture, so we might as well make it like a game where you can hop from level to level. Then you can go to society parties and brag that you are a DVMRP-Q White Belt Green Stripe with a concentration in Taiwanese Bug Reporting, and that after a 6-month wait you can make a lateral move to second-chair cantor of Der Process under the wavy waves. As always, making the constructive suggestion to take things in the exact opposite direction will be called out as unconstructive.
CableCARD devices have generally supported only one-way access to cable systems, but their long, winding journey toward full two-way communications is finally coming to an end. Panasonic has announced that it is at last shipping new HDTVs enabled with tru2way technology to the two US markets where they can actually be used.So what’s the main thing you’re supposed to get with tru2way?
This means that you can walk out of a retail store with a tru2way-enabled HDTV, plug it in at home, and have immediate access to basic features like an on-screen guide and on-demand content.In other words, we are just now starting to see HDTVs that can just plug into the cable jack and work, without an add-on cable box and all the limitations that implies, right? Well, not really.
All tru2way-compatible devices will have a CableCARD slot built into them to facilitate the decryption of protected content, though details are still sketchy as to how this system will work with devices like PVRs. Physical CableCARDs will apparently not be needed to access basic two-way services and non-encrypted channels.Meaning that, in order to get anything you can’t get already with broadcast TV (”non-encrypted”), you still need a cable company tech to come out and install the CableCARD. And they don’t know how all of this will integrate with the new video recorders like TiVo. Why is this so hard? It’s producer paranoia. If they don’t play these games, you might watch some show for free, or share it so others can watch it for free, instead of… well, watching it for free live. And you might cut the commercials out, instead of… cutting the commercials out by getting up for more chips during the commercial breaks. (But that’s stealing, so you shouldn’t do that either.) Our family keeps edging closer to deciding to get a HDTV. But then I see stuff like this, and notice that the old tube TV still works fine…
so i've been looking into the state of things with running
debian on my ps3, and while talking to some folks on #cell, it was
brought to my attention that there was a problem or two with the libspe2 packages,
used for programming SPU using applications.
for those not in the loop, the Cell Broadband Engine chip which
powers the ps3 is a multi-core processor, with two general purpose
PPU's and 6 specialized
SPU's available. Without spufs support, the SPU's aren't
available, and the real number-crunching capabilities of the ps3
aren't either.
more information on the nitty-gritty of spufs is available
here
anyway, the problems are
fixed now
still, as of now there's still some one-time setup after
installation. namely:
echo spu /spu spufs defaults 0 0 >> /etc/fstab
(and then mount it or just reboot)
there really should be some way to have this setup
automatically, either from the installer or through some kind of
spufs support package. i'll take it up on the mailing lists and see
what the consensus would be for this.
Some drivers in Linux include "firmware" - code that runs on the device the
driver deals with, not the main processors in the system. Most of this is in a
binary or equivalent form, which is probably not the form that it was
originally written in. This makes it non-free by Debian's standards, an issue
which has led to much argument around previous releases and has blown up once
again.
The good news is that kernel developers are making a continuing effort to
separate this from the driver code. I've collected together the patches that
do this and written 2 of my own, which appear to cover all the remaining
sourceless firmware. But I was only able to test one of these drivers (radeon)
- the rest is up to you.
Affected drivers
| Driver | Hardware which requires firmware | Bug report | Change made |
|---|---|---|---|
| cassini | Sun "Cassini" Ethernet controllers with "Neptune" PHY | 498631 | removed |
| dabusb | BayCom DAB-USB radio receivers | 502663 | moved to firmware-dabusb |
| e100 | Intel PRO/100 Ethernet controllers with PCI revision 8, 9, 15 or 16 or built into ICH6 or ICH7 (LAN-on-motherboard) | 494308 | moved to firmware-e100 |
| kaweth | Kawasaki LSI USB Ethernet controllers | 502665 | removed |
| mga | Matrox G200, G400, G450(?) and G550 graphics controllers, 3D acceleration only | 502666 | moved to firmware-matrox |
| qla1280 | QLogic QLA1XXX SCSI controllers | 502667 | moved to firmware-qlogic |
| r128 | ATI Rage 128 graphics controllers, 3D acceleration only | 494007 | moved to firmware-ati |
| starfire | Adaptec DuraLAN aka Starfire Ethernet controllers | 501152 | moved to firmware-adaptec |
| tehuti | Tehuti Ethernet controllers | 501153 | moved to firmware-tehuti |
| typhoon | 3Com Typhoon (3CR990) Ethernet controllers | 502669 | moved to firmware-3com |
| whiteheat | ConnectTech WhiteHEAT USB serial adapters | 502668 | removed |
I’ve prepared a set of experimental packages of 1.5.5. They seem to be working fine, and are ready for some testing from brave users.
I’m not going to upload them soon to Debian experimental, since I want to be able to use that if for some reason I need testing of an urgent 1.4 update before the Lenny release.
Meanwhile, take a look at http://www.nul-unu.com/quien/rodrigo/debian/liferea/
There are source and amd64 binary packages. I’ll try to get access to some i386 machine to compile them there. One of these days
I've been meaning to fix debhelper's option parsing code for a
while (7 years?!), and finally got around to it with version 7.1.0, in
experimental.
Now debhelper commands can define their own command-line options. This is
especially useful for third-party commands that couldn't add new options
before, without pestering or bribing me. (Bribes still happily accepted
however.)
It's in experimental because I removed global support for a large number
of lesser-used options. Some of these might be used by third-party
debhelper commands -- if so, they will be broken by this change, and need
to define those options themselves.
Also, it used to be possible to pass nonsensical options to a command, like
"dh_strip --include-conffiles --no-restart-on-upgrade". To avoid breaking
unknown numbers of packages that might do things like this, I've made
debhelper start warning about such things. This warning will be converted
to an error as soon as I dare.
http://xkcd.com/344/ I wouldn’t have gotten the joke if it wasn’t for you. Thanks.The email not only made me smile (for it is always nice to know your students are leaning something) but it gave me the idea that in the future I might include a comic based exams composed of 5-10 comic strips (many from xkcd) and ask for an exegesis of them. Why not? Seems like fun to me. And it would be great to include the following as one of my course objectives: “By the end of this class you will be able to read xkcd and actually understand (most) of it.” If they could do that, well, they must have learned at least something
Recently I was talking with one of the best researcher know, TimLater in the semester, and for my hacker course, we will be reading Understanding Comics, which will give us a bit of a meta perspective on why comics are so good at conveying a certain type of message. I can’t wait to read it as I have heard it is fantastic.
O’Halloran. He has been able to inspire generations of middle and high
school students to care for the natural world. Tim told me that Gary
Larson has had a major impact on his teaching. Tim uses Far Side
cartoons to introduce topics, to illustrate points, and to “reinforce
the notion that the more we investigate the universe, the richer is our
experience.” When designing exam papers Tim finds the cartoons “ease the
tension and spark the memory.” It all began when, in the fall of 1985,
he was given the task of teaching science to 162 Tulsa ninth-graders who
were convinced that it was absolutely irrelevant to their futures. Tim
put one hundred Far Side cartoons on a large bulleting board, and told
the students to study them. The consensus was that they didn’t
understand the humor - The Far Side was “too weird”. However, Tim wrote
me, “Each time we completed a unit and the students approached the
bulletin board with newly acquired wisdom, I smiled quietly and thanked
the cosmos for Gary’s perspectives as the kids roared with the confident
laughter of the enlightened.” Having taught myself for a while, I can fully and happily relate.
http://xkcd.com/344/ I wouldn’t have gotten the joke if it wasn’t for you. Thanks.The email not only made me smile (for it is always nice to know your students are leaning something) but it gave me the idea that in the future I might include a comic based exams composed of 5-10 comic strips (many from xkcd) and ask for an exegesis of them. Why not? Seems like fun to me. And it would be great to include the following as one of my course objectives: “By the end of this class you will be able to read xkcd and actually understand (most) of it.” If they could do that, well, they must have learned at least something
Recently I was talking with one of the best researcher know, TimLater in the semester, and for my hacker course, we will be reading Understanding Comics, which will give us a bit of a meta perspective on why comics are so good at conveying a certain type of message. I can’t wait to read it as I have heard it is fantastic.
O’Halloran. He has been able to inspire generations of middle and high
school students to care for the natural world. Tim told me that Gary
Larson has had a major impact on his teaching. Tim uses Far Side
cartoons to introduce topics, to illustrate points, and to “reinforce
the notion that the more we investigate the universe, the richer is our
experience.” When designing exam papers Tim finds the cartoons “ease the
tension and spark the memory.” It all began when, in the fall of 1985,
he was given the task of teaching science to 162 Tulsa ninth-graders who
were convinced that it was absolutely irrelevant to their futures. Tim
put one hundred Far Side cartoons on a large bulleting board, and told
the students to study them. The consensus was that they didn’t
understand the humor - The Far Side was “too weird”. However, Tim wrote
me, “Each time we completed a unit and the students approached the
bulletin board with newly acquired wisdom, I smiled quietly and thanked
the cosmos for Gary’s perspectives as the kids roared with the confident
laughter of the enlightened.” Having taught myself for a while, I can fully and happily relate.



Back in 1965, I was the one to solder this box shut. While I was doing this, all of a sudden I smelled burning from inside. I figured I must have caught something inside on fire. I asked Jake Koehn (another person on the building committee) what to do. Jake said, "Nobody will ever see it again, just put it in." So let's open it!
Sometimes, I m becoming really pestered by the number of issues, especially hardware issues, that remain prominent in the Linux system after so many years. And I m convinced that one of the root causes is the kernel development model. While far to be the only one, you understand a lot when you have a look at it.
The stable API nonsense
To explain the development model, the kernel documentation contains a document written by Greg Kroah-Hartman called stable_api_nonsense.txt. I think this document gets one thing very right: advertising it is complete nonsense.
Many things in this document can get you a good laugh if you are used to software development, unfortunately they are not funny given how much they affect us as users and developers. Let s start with the executive summary:
You think you want a stable kernel interface, but you really do not, and you don't even know it. What you want is a stable running driver, and you get that only if your driver is in the main kernel tree. You also get lots of other good benefits if your driver is in the main kernel tree, all of which has made Linux into such a strong, stable, and mature operating system which is the reason you are using it in the first place.What it should say instead is:
You know you want a stable kernel interface, but you don't have it, and we will never provide it. You want stable interfaces to focus on fixing bugs in your driver instead of updating it for interface changes, and to make integration of your driver in the main kernel tree easy. You would get a lot of good benefits if your driver was in the main kernel tree, but it won't make it unless you adapt to our bizarre processes, all of which have made the Linux kernel into a constantly moving target which is the reason many hardware vendors don't want to support it in the first place.Our compiler does not have the same ABI as yours This is what happens when the only thing that interests people in charge is to code. Writing this means that these developers have no interest in making the system usable. This becomes more unbearable when such technically sharp people make up false technical arguments:
Depending on the version of the C compiler you use, different kernel data structures will contain different alignment of structures, and possibly include different functions in different ways (putting functions inline or not.)Really, I wonder how the Microsoft developers, the GNOME guys, the glibc guys, and basically all library developers who know what they are talking about, manage to have stable ABIs despite the compiler changing all the time. One of the incredibly complicated techniques they use is to only rely on guaranteed functionality of the C specification, instead of doing many clever and funky hacks. For things more related to development itself, there are also incredibly complicated techniques like opaque structures, which save a lot of ABI breakage. Actually the only thing you need, if you design your ABI properly, is to be rigorous.
Depending on what kernel build options you select, a wide range of different things can be assumed by the kernelThis statement of a problem also contains the solution: stop making available build options no one cares about (remember, people install binary packages from their distributions) to guarantee stability instead. Instead of implementing the solution, kernel developers deliberately choose to deal with this insanity in the worst possible way: by encouraging it. Only lame developers need stable APIs But the nonsense doesn't stop to the ABI, which after all is merely a problem for distributors. To be more annoying to developers themselves, let s make up reasons to break the API all the time:
Linux kernel development is continuous and at a rapid pace, never stopping to slow down. As such, the kernel developers find bugs in current interfaces, or figure out a better way to do things.Explained this way, it looks like a good thing. If you've done serious development or integration, you know that actually it is a problem. If you never slow down to look at what you've done, you're only going to add new bugs while you're trying to fix the others.
When they do so, function names may change, structures may grow or shrink, and function parameters may be reworked. If this happens, all of the instances of where this interface is used within the kernel are fixed up at the same time, ensuring that everything continues to work properly.Everything is said. In the Linux kernel, changes are not done in a continuous way. Every non-minor change is going to have an impact on hundreds of different modules. The amount of work needed to accomplish these changes is absolutely insane. When a project like GNOME decides to phase-out an API, it takes several years before being actually replaced. In the kernel, it can simply happen between two minor releases, together with a rewrite of the whole ATA stack. The lolution Of course, Greg KH has a simple solution for you, in the What to do section.
So, if you have a Linux kernel driver that is not in the main kernel tree, what are you, a developer, supposed to do? Releasing a binary driver for every different kernel version for every distribution is a nightmare, and trying to keep up with an ever changing kernel interface is also a rough job.No shit !
Simple, get your kernel driver into the main kernel tree.Simple, isn't it? Unfortunately this is not going to happen while you are too busy adapting it for the constantly moving interfaces. This is quite feasible if you are writing a driver for an Ethernet network adapter, but for a video card this is another story, and for a virtualization layer? Well, the Xen developers have been struggling for years to integrate their technology in the kernel, and it is still far from done. No wonder why you get good drivers only for ethernet cards and not for 3D cards or even wifi chips. This doesn t go without other, worse consequences for users and distributors. Not everyone can afford to run Ubuntu, Debian unstable or Fedora, especially if they have simple requirements like not changing the whole system every 6 months. Corporate users using Debian stable, RHEL, SLES or Ubuntu LTS need a stable kernel that doesn t move, and that doesn t break everything when upgraded. The introduction of projects like DKMS to distribute drivers in a sourceful way while keeping them easily installable is a step in the good direction, despite being a workaround for a broken situation underneath. However these efforts are ruined by the constantly changing APIs that will go on requiring changes to the sources as well as the binaries. Why it can still work In fact, with such processes, you can wonder how it is possible that the system is actually usable. The answer is simple: while being smaller than many other projects, the Linux kernel has much, much more developers. A rough estimation shows that Linux has 2000 developers, many of which are paid full-time to work on it, to work on a 15 Mloc codebase. You can compare it with X.org, which has a few dozens of developers for 3 Mloc. Or with GNOME, 400 developers for 20 Mloc. With OOo, 150 developers for 10 Mloc. Yes, you need 10 times as many people to maintain the kernel code than for another comparable project. That's of course what happens when you keep them busy with a permanent refactoring of the code. This development method, while certainly having the advantage of bringing lots of innovation and fast integration of new features, is also driving away a very large portion of the open source community to work on rewriting Firewire stacks every 6 months. And as long as they are busy with this, they are not writing correct X drivers nor fixing bugs in the applications.

Next.