I truly don’t understand why a company would write open-source drivers yet fail so miserably at them, to the detriment (and cost) of them and the rest of the world.

Back story here. I’ve been having to deal with Broadcom equipment, and migrating them from the 2.4 series Linux kernel to 2.6. For the 2.4 series, a few driver source code files were at least provided, such as for the Sonics Silicon Backplane, the Ethernet chip, a few other things, but the wireless remained a closed source binary-only module. But that’s for another day.

For the drivers they wrote under the GPL, no attempt whatsoever was made by them to submit upstream. Instead, projects like DD-WRT and OpenWRT have relied on GPLed tarballs from such places like Cisco (who uses Broadcom as one of their vendors) and attempt to migrate the code to the 2.6 kernel.

So one might say, at least they provided it, and it is getting migrated. However, since they made no attempt to migrate it upstream via the LKML, you’re left with such a divergent branch from the vanilla kernel in order to just get the device to boot and execute user-land utilities. For instance, for the bcm47xx branch of OpenWRT, applying all the generic-2.6 patches and bcm47xx patches for the 2.6.28 kernel, you’re left with a 2.2MB patch. This should be a sign that you’re not getting it. Admittedly, the generic-2.6 patches was 60-70% of it, since they have to support far more architectures and file systems (Such as SquashFS, which is still in a political war on merging with the vanilla kernel, but hopefully should occur during 2.6.29), but even still, you have a large amount of patches for bcm47xx specific items.

In related news, I spent a day and a half tracking down an undocumented feature within the Linux kernel, BOOT_RAW. Apparently, CFE (Common Firmware Environment), also done by Broadcom, by default is set up to boot a raw binary executable. However, there is no way to specify the entry address either through the command line, or set it in something such as NVRAM. It attempts to start the executable at the load address. However, the Linux kernel is not built to be executed from that address, it’s generally quite a ways off. As it turned out, through some magic in the OpenWRT build environment, they place a jump to the kernel_entry from the load address, so CFE is able to boot a kernel properly. And that option also exists in the vanilla Kernel, with an #ifdef BOOT_RAW clause in the files used for linking the kernel. But it only was set if you selected certain boards, it wasn’t a general setting option.

I’ve got a patch that I need to submit to the LKML to enable said option, but that is yet again why I don’t get Broadcom.