KS2012: Status of Android upstreaming
Anyone who has paid even slight attention to the progress of the mainlining of the Android modifications to the Linux kernel will be aware that the process has had its ups and downs. An initial attempt to mainline the changes via the staging tree ended in failure when the code was removed in kernel 2.6.33 in late 2010. Nevertheless, at the 2011 Kernel Summit, kernel developers indicated a willingness to mainline code from Android, and starting with Linux 3.3, various Android pieces were brought back into the staging tree. (On the Android side this was guided by the Android Mainlining Project.) The purpose of John Stultz's presentation on day 1 of the 2012 Kernel Summit was to review the current status of upstreaming of the Android code and outline the work yet to be done.
John began by reviewing the progress in recent kernel releases. Linux 3.3 reintroduced a number of pieces to staging, including ashmem, binder, logger, and the low-memory killer. With the Linux 3.3 release, it became possible to boot Android on a vanilla kernel. Linux 3.4 added some further pieces to the staging tree and also saw a lot of cleanup of the previously merged code. Subsequent kernels have seen further Android code move to the staging tree, including the wakeup_source feature and the Android Gadget driver. In addition, some code in the staging tree has been converted to use upstream kernel features; for example, Android's alarm-dev feature was converted to use the alarm timers feature added to Linux in kernel 3.0.
As of now (i.e., after the closure of the 3.6 merge window), there still remain some major features to merge, including the ION memory allocator. In addition, various Android pieces still remain in the staging tree (for example, the low-memory killer, ashmem, binder, and logger), and these need to be reworked (or replaced), so that the equivalent functionality is provided in the mainline kernel. However, one has the impression that these technical issues will all be solved, since there's been a general improvement in relations on both sides of the Android/upstream fence; John noted that these days there is much less friction between the two sides, more Android developers are participating in the Linux community, and the Linux community seems more accepting of Android as a project. Nevertheless, John noted a few things that could still be improved on the Android side. In particular, for many releases, the Android developers provided updated code branches for each kernel release, but in more recent times they have skipped doing this for some kernel releases.
Following John's presentation, there was relatively little discussion, which is perhaps an indication of the fact that kernel developers are reasonably satisfied with the current status and momentum of Android upstreaming. Matthew Garrett asked if John has any feeling about whether other projects are making use of the upstreamed Android code. In response, John noted that Android code is being used as the default Board Support Package for some projects, such as Firefox OS. He also mentioned that the volatile ranges code that he is currently developing has a number of potential uses outside of Android.
Matthew was also curious to know if is there anything that the Linux kernel developers could do to help make the design process for features that are going into Android more open. Right now, most Android features are developed in-house, but perhaps a more open-developed solution might have satisfied other users' requirements. There was some back and forth as to how practical any other kind of model would be, especially given the focus of vendors on product deadlines; the implicit conclusion was that anything other than the status quo was unlikely.
Overall, the current status of Android upstreaming is very
positive, and certainly rather different from the situation a couple of
years ago.
Index entries for this article | |
---|---|
Kernel | Android |
Posted Oct 1, 2012 5:58 UTC (Mon)
by alison (subscriber, #63752)
[Link] (1 responses)
Does "boot Android" simply mean, "run a Dalvik-like JVM"? I'm sure I'm not alone in wondering, "How many of the Android features in staging will be usable with glibc? Or must bionic features be merged into glibc as well?" Undoubtedly many of the merged Android features are valuable in their own right, especially for embedded use cases, and there's merit in merging the changes just to reduce the size of the mainline-Android kernel fork. Nonetheless, I wonder if the effort necessary to permit Android apps to run natively on Linux is an important goal given how well lxc works as a host.
Posted Oct 1, 2012 6:02 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link]
You can actually (almost) run native Android apps on glibc using hybris: https://plus.google.com/108138837678270193032/posts/P2f8b...
KS2012: Status of Android upstreaming
KS2012: Status of Android upstreaming
It means "you can run bionic, Dalvik and most of the complementary infrastructure".