Practical Technology

for practical people.

Android/Linux kernel fight continues

| 0 comments

YYou could argue that Google’s Android, so popular on smartphones now, is the most popular Linux of all right now. There’s only one little problem with that: Android has continued to be apart from the Linux mainstream.

People became aware of the Android and Linux split when Ryan Paul reported that “Google engineer Patrick Brady stated unambiguously that Android is not Linux.”

Brady over-stated the case. Android is Linux. To be exact, version, 2.2, Froyo, runs on top of the 2.6.32 Linux kernel. To quote from the Android developer page, Dalvik, Android’s Java-based interface and user-space, uses the “Linux kernel for underlying functionality such as threading and low-level memory management.” Let me make it simple for you, without Linux, there is no Android.

But, Google took Android in its own direction, a direction that wasn’t compatible with the mainstream Linux kernel. As Greg Kroah-Hartman, head of the Linux Driver Project and a Novell engineer, wrote in Android and the Linux kernel community, “The Android kernel code is more than just the few weird drivers that were in the drivers/staging/androidsubdirectory in the kernel. In order to get a working Android system, you need the new lock type they have created, as well as hooks in the core system for their security model. In order to write a driver for hardware to work on Android, you need to properly integrate into this new lock, as well as sometimes the bizarre security model. Oh, and then there’s the totally-different framebuffer driver infrastructure as well.” As you might imagine, that hasn’t gone over well in Android circles.

This disagreement arose from at least two sources. One was that Google’s Android developers had taken their own way to address power issues with WakeLocks. The other cause, as Google open source engineering manager Chris DiBona essentially said, was that Android’s programmers were so busy working on Android device specifics that they had done a poor job of co-coordinating with the Linux kernel developers.

The upshot was that developer circles have had a lot of heated words over what’s the right way of handling Android specific code in Linux. Linus Torvalds dropped the Android drivers from the main Linux kernel.

Google tried to do the right thing by hiring two new Android developers to work more closely with the Linux kernel development team to get Android back in sync Linux. At the time, it looked like Google and Android would quickly get back to the same page.

It hasn’t worked out that way. At LinuxCon, I asked the Linux kernel developers about this, and I got an earful.

Google kernel developer Ted Ts’o said that he didn’t think it was that big a deal that Android included some non-standard software. “I can’t think of any shipping Linux distro, including Red Hat, that doesn’t have some out-of-tree packages.” And, Ts’o continued, “No one ever said, oh my God, Red Hat or Novell forked the kernel.”

From where Ts’o sits, the real problem is that “Android has been so successful, and that has inspired many hardware vendors to write device drivers for Android. WakeLocks calls in device drivers become problematic when people want to submit code upstream.” The bottom line is that this forces chip vendors, like Qualcomm and Texas Instruments to maintain two versions of Linux, with and without WakeLocks. Needless, these companies aren’t happy with the extra work.

Chris Mason, Oracle‘s director of Linux kernel engineering, added that this kind of conflict is not new. While James Bottomley, a distinguished engineer at Novell and Linux kernel maintainer, added that getting Android to work smoothly with the rest of Linux will “Take a lot of effort, but it will be worth the time for the larger community.”

Unfortunately, according to Ts’o, time is not something the Android team has a lot of. They’re too busy running to keep up with hardware requirements. Ts’o said that, although, “There’s less than 64K of patch, there’s been over 1,800 mail messages of discussion.” Ts’o made it sound like the Android team is getting fed up with the process. “Android is a small team. They feel that they’re spending a vast amount of time getting the code upstream (to the main Linux kernel).”

On the Linux Kernel Mailing List (LKML), Ts’o suggested later that “You know, you don’t have to wait for the Android engineers to do this work. You (or others who want to be able to use stock upstream kernel with Android devices) could just as easily try to do the ‘bit more work’ yourselves — that is, do the open source thing and scratch one’s own itch.” Later, Ts’o also pointed out on the LKML that mainstream Linux distributions include their own non-standard code.  He summed it up with, “Can we please cut out this whole forking nonsense?”

In the meantime, of course, Google has other Android worries with its Oracle patent fight. In the end, I’m sure that Android and the mainstream Linux kernel will get back in sync with each other. I don’t see it happening anytime soon, though, and I suspect there will be a lot more heated words exchanged before it finally happens.


A version of this story first appeared in ComputerWorld.

Leave a Reply