Saturday, March 24, 2012

Linux and Android are now more closely linked together

Linux's newest kernel, version 3.3, includes some source code from Google's Android operating system that should help both Android mobile app developers and other Linux-based projects that will soon be used as well in the IT segment, and not just in mobile.

Linux and Android are now two very closely linked open-source projects, but they've also been as notable for how distant they are from each other-- until yesterday that is.

That's when Linus Torvalds, leader of the Linux kernel project, released a version of the OS kernel that bridges the two operating systems together. Version 3.3 of the Linux kernel is the actually beginning of the end of isolation between these two projects.

To be sure, under the hood of every Android phone is a Linux phone-- end of the story, and it's always been that way. But although some programmers and a few mobile app developers writing Android software generally use a Java-like interface, a Google-customized version of Linux handles underlying details such as keyboard input, multitasking among different chores, and keeping needed data readily at hand in memory.

However, Google's Android project has been in a way a form of a code repository-- ie a separate code base that's branched off from the main repository Torvalds oversees at the Kernel.org Web site.

The end result of merging Google's Android with Torvalds "Linux Mainline" version, if all goes well, should be easier programming and therefore faster progress for all parties involved. For its part, Google can benefit from new features added to mainline Linux sooner and with fewer hassles keeping its code in sync with the mainline kernel.

And others using Linux in mobile devices can also benefit from improvements that previously had to be retrieved from Google's separate Android archive system.

Google lifts code liberally from many open-source projects, often contributing its own additions back as well as launching its own open-source works. But sometimes Google prefers to work more in isolation from a project's primary developers, which can lead to tensions given the generally collaborative, code-sharing ethos, and Linux sure isn't any exception.

Another example of where Google's Android workgroup is linking up with its open-source variety is with the WebKit browser engine. Google had worked on its stock Android browser as a separate project of WebKit, but with the arrival of Chrome for Android, the mobile version of its browser is being integrated with the ordinary WebKit project-- something a lot of observers in the Linux community were expecting for over a year now.

Torvalds announced the release of Linux 3.3 late Sunday night on the Linux kernel mailing list. He made no specific note of the Android merge, but it's been under way for months already.

Tim Bird, a Sony programmer who works on the Linux Foundation's consumer-electronics project, announced the "Android mainlining project" in December 2011. "I would like to announce the beginning of a new project to make a concerted effort to mainline security patches and features from Android into the mainline Linux kernel," Bird said.

His words came shortly after Torvalds himself tried to ease tensions between the two camps last November. He said in an interview with Muktware's Swapnil Bhartiya: "Every time there is a fork, and I think actually forks are good things, it means that somebody sees a need and a technical reason to do something different from the standard kernel. But most forks are failures. They find that the things they needed were not actually worth doing and as a result most forks die. Some forks are successful-- Google with Android has really been very successful."

"Now, we are talking about how to say 'Hey you were right, we were wrong, you were successful doing something right.' We are talking about how to merge the good parts," added Torvalds.

Greg Hartman, a longtime Linux kernel developer and new Linux Foundation fellow, said to expect Android kernel components in Linux 3.3 on Google+ at the same time. And in a February interview with Muktware, he added "The 3.3 kernel release will let you boot an Android userspace with no modifications, but without very good power management. The 3.4 kernel release will hopefully have all the power management tools that Android needs in it, along with a few other minor missing infrastructure pieces that didn't make it into the 3.3 kernel release."

"Boot an Android userspace" means that a developer could run Android on a standard Kernel.org system rather than having to fetch one on Google's customized version. That could actually be practical for many programmers-- the large number using Linux in electronics devices with memory and processor power limits, for example. And Mozilla, with its B2G (Boot to Gecko) project for a Linux-based browser operating system, also stands to benefit from the integration. It's currently using the Android open-source project (AOSP) software," said Hartman.

At a February meeting of the Android mainlining project, Linux OS programmers dug into the details of the code merge. One area where there has been some friction is with a Google technology called WakeLock, which lets a programmer tell the kernel that a particular computing process should prevent the computer from going into a low-power sleep state.

Linux News Today documented the initial loathing of WakeLock, which Google developed in isolation. That displeasure doubtless meant more work for Google mending fences than if it had worked closely with mainline kernel developers right at the beginning. But now the Linux community thinks that Google has learned from this mistake.

However, Google still had its own priorities nevertheless, and collaboration takes some time. Nothing is ever achieved in just one day-- Android and Linux isn't any exception.

0 comments:

Post a Comment

Rinakolkata - Find me on Bloggers.com Related Posts Plugin for WordPress, Blogger...