`
nedvedheqing
  • 浏览: 105297 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Android 核心已经从 Linux kernel 代码库中删除

阅读更多
新闻来源:http://www.kroah.com/log/linux/android-kernel-problems.html
As the Android kernel code is now gone from the Linux kernel, as of the 2.6.33 kernel release, I'm starting to get a lot of questions about what happened, and what to do next with regards to Android. So here's my opinion on the whole matter...

First off, let me say that I love the Android phone platform. Until last week, I used my developer G1, that I bought, every day. It worked wonderfully for me, and as a user, I was more than happy.

I'm also very happy about Android from a technical perspective. It's amazing that Google has taken the Linux kernel, and nothing else from a "traditional" Linux system, and created a portable and robust phone platform. It's so different that you can drop in a "real" Linux system image on top of the Android system, and they both work just fine with no changes needed.

Android also solves the problem that the phone manufacturers had been having for many years: a free version of Java and a unified application layer that programmers can write to that will work on all phone platforms that integrate it. Because of this, all of the existing "Linux Phone Consortium" groups are doomed and will probably close up silently very soon now, if they haven't already.

What's wrong?

So, what happened with the Android kernel code that caused it to be deleted? In short, no one cared about the code, so it was removed. As I've stated before, code in the staging tree needs to be worked on to be merged to the main kernel tree, or it will be deleted.

But there's a much bigger problem here.

The Android kernel code is more than just the few weird drivers that were in the drivers/staging/android subdirectory 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.

This means that any drivers written for Android hardware platforms, can not get merged into the main kernel tree because they have dependencies on code that only lives in Google's kernel tree, causing it to fail to build in the kernel.org tree.

Because of this, Google has now prevented a large chunk of hardware drivers and platform code from ever getting merged into the main kernel tree. Effectively creating a kernel branch that a number of different vendors are now relying on.

Now branches in the Linux kernel source tree are fine and they happen with every distro release. But this is much worse. Because Google doesn't have their code merged into the mainline, these companies creating drivers and platform code are locked out from ever contributing it back to the kernel community. The kernel community has for years been telling these companies to get their code merged, so that they can take advantage of the security fixes, and handle the rapid API churn automatically. And these companies have listened, as is shown by the larger number of companies contributing to the kernel every release.

But now they are stuck. Companies with Android-specific platform and drivers can not contribute upstream, which causes these companies a much larger maintenance and development cycle.

What would be needed to get the Android core code merged?

When the Android code was merged into the staging tree, a number of kernel developers reviewed the code and pointed out places that needed to be cleaned up, and changed, in order for it to be accepted. A number of these changes will affect the kernel/userspace boundry, so some changes to the Android userspace logic would also need to be changed if these kernel changes are made, preventing anyone except a Google employee from making the changes necessary.

So, what to do?

I really don't know. Google shows no sign of working to get their code upstream anymore. Some companies are trying to strip the Android-specific interfaces from their codebase and push that upstream, but that causes a much larger engineering effort, and is a pain that just should not be necessary.

Hope

I do hold out hope that Google does come around and works to fix their codebase to get it merged upstream to stop the huge blockage that they have now caused in a large number of embedded Linux hardware companies.

I've privately offered in the past to help this work get done, and am doing again here publicly. But I need the help of the Google developers to make it happen, without them, nothing can change.

The good news is that it looks like all of the kernel/userspace api changes will have no affect at all on any Android code higher up the stack (like applications), so all of this work can be done with no problem in the overall system.

I'll be giving a talk about this whole Android mess at the CE Linux Forum 2010 conference. Hopefully it improves before then, otherwise CELF will be continuing the long-held tradition of having keynotes in which the presenter yells at the attendees for all of the bad things they are doing.
分享到:
评论
6 楼 Elrond 2010-02-10  
momoch1314 写道
假设:
如果Google符合GPL。
把硬件厂商的本身不开源驱动也进行开源的话会有什么后果?
硬件驱动的源码也不属于Google,Google有权利开放吗?

他们得不到驱动源码吧.

那是商业机密

就算得到了也不能开放, 否则就是侵权.

Google的Android平台说白了还是一个致力于统一的平台, 我无法统一硬件, 但是可以统一内核.
5 楼 wafj1984 2010-02-10  
你贴了什么东东啊?  没任何解释?
4 楼 momoch1314 2010-02-05  
假设:
如果Google符合GPL。
把硬件厂商的本身不开源驱动也进行开源的话会有什么后果?
硬件驱动的源码也不属于Google,Google有权利开放吗?
3 楼 wing5jface 2010-02-05  
2 楼 BarryWei 2010-02-05  
人家已经说了:
引用

This means that any drivers written for Android hardware platforms, can not get merged into the main kernel tree because they have dependencies on code that only lives in Google's kernel tree, causing it to fail to build in the kernel.org tree.
1 楼 biAji 2010-02-04  
没什么了不起的。Fedora库那么多孤儿库谁去关心过

相关推荐

    Linux_Kernel_for_Android_4.0_初稿

    2. **使用Bionic Libc替代glibc**:Android使用了专为其设计的Bionic Libc库,而不是标准Linux中的glibc。 3. **包含Android专用驱动程序**:这些驱动程序针对Android平台进行了优化和增强。 ##### 3.2 Android内核...

    PopMetal和PX2上运行upstream linux kernel代码

    例如,使用命令 `git clone git://***/pub/scm/linux/kernel/git/stable/linux-stable.git` 克隆Linux稳定分支代码库。 - 然后切换到希望编译的稳定分支,例如 `git checkout -b linux-4.2.y origin/linux-4.2.y`。...

    Android和Linux内核版本对应关系

    - **备注**: 移除了Android代码的Linux Kernel 2.6.33版代码库。 ##### 8. Honeycomb (蜂巢) - **Android系统版本**: 3.0 - **发布时间**: 2011年2月2日 - **Linux Kernel内核版本**: 2.6.36 - **备注**: 专门针对...

    Android kernel到App流程代码

    在Android系统中,从底层的Linux内核到用户界面的应用程序,整个流程涉及多个层次的交互和转换。这里,我们将详细探讨"Android kernel到App流程代码"中的关键知识点。 首先,我们从最底层开始,即Android Linux内核...

    android同linux底层通信机制实现

    【Android与Linux底层通信机制实现】是Android系统开发中的核心环节,它涉及到Java层与JNI层的交互以及如何调用Linux底层驱动。Android应用程序主要由Java编写,运行在Dalvik虚拟机上,但为了实现与硬件设备的直接...

    esp8089_C语言_linuxkernel_esp8089_android_

    “linuxkernel”是指Linux内核,它是Linux操作系统的核心部分,负责管理系统的硬件资源,调度进程,以及提供系统调用接口。在这个项目中,开发者需要深入理解Linux内核机制,以便为ESP8089编写合适的驱动程序,使其...

    在Ubuntu上下载、编译和安装Android最新内核源代码(LinuxKernel).pdf

    进入Android源代码的根目录下的`kernel`子目录,然后使用`git clone`命令从官方仓库克隆`common`分支,这将包含Android所需的Linux内核通用部分。等待下载完成后,你可以通过`git branch`命令查看当前的分支,并切换...

    Android下载代码及编译代码

    本文主要针对smdkv210平台,介绍如何下载Android源代码和Linux Kernel源代码,以及如何编译这两个核心组件。 首先,我们来详细了解下载过程: 1. **下载repo工具**: 在Ubuntu系统中,你需要获取repo工具来管理...

    Android版本与Linux内核的关系

    - 如果只需要获取某个特定项目的代码,如`kernel/common`,则可以直接使用`git clone git://android.git.kernel.org/kernel/common.git`命令进行克隆。 7. **列出本地所有分支** - 运行命令`git branch`即可列出...

    linux-2.6.25-android-1.0_r1.tar.gz

    压缩包中的"kernel.git"包含了完整的内核源代码,开发者可以深入研究Android如何修改和定制Linux内核以满足其特定需求。这些源代码涉及驱动程序、调度算法、内存管理、文件系统等方面,对于理解Android系统的底层...

    Linux下Android源代码的开发环境搭建

    总的来说,搭建Linux下的Android源代码开发环境需要安装Git和Repo,初始化Android源代码库,以及根据需求选择性地克隆和切换Git仓库的分支。这个过程对于任何想要深入研究Android系统或者进行系统级定制的开发者来说...

    Android Kernel源码下载方法

    例如,Android的用户空间代码主要使用Repo工具进行管理,而Kernel代码则直接使用Git。因此,在下载Kernel源码时,我们需要通过Git来进行操作。 #### 三、获取Kernel源码的具体步骤 1. **准备工作** - 首先确保...

    android kernel 开发培训

    内核开发对于一个操作系统来说是核心,尤其在Android这个基于Linux的操作系统中,内核开发尤为重要。 描述中提到的“Android linux 设备驱动开发关键函数介绍”是Android内核开发中的一个重要部分。驱动开发是硬件...

    Android核心技术与实例详解.pdf

    1. **Linux Kernel**:提供核心系统服务,如内存管理、进程管理等。 2. **Libraries**:一系列 C/C++ 库,用于支持 Android 平台的核心应用程序和服务。 3. **Android Runtime**:包括了运行环境和核心库,以及用于...

    android kernel在windows下载全过程

    使用`git clone`命令从Google的Git仓库克隆Android Kernel的公共代码库: ```bash D:\code>git clone http://android.googlesource.com/kernel/common.git ``` 这个命令会下载大约709MB的代码到一个新的名为`...

    Android的Linux内核与驱动程序.pdf

    这两个文件分别对应于Android代码库中预编译的ARM内核。 #### 第二部分:Android专用驱动 **1. Ashmem (匿名共享内存)** Ashmem 是一个轻量级的共享内存机制,用于实现进程间通信。它允许不同的应用程序通过共享...

    linux编译android内核源码问题

    ### Linux下编译Android内核源码遇到的问题及解决方案 #### 概述 在尝试编译Android内核源码的过程中,经常会遇到各种错误提示。本文将针对这些常见的编译错误进行详细解析,并提供相应的解决办法。这对于那些正在...

    自己做个迷你型linux内核

    1. **源代码获取**:首先,你需要从Linux内核官方仓库(如kernel.org)下载最新的源代码。选择适合你的版本,通常是稳定版。 2. **配置内核**:使用`make menuconfig`命令进行内核配置。在这个阶段,你可以选择保留...

    Android源代码目录分析

    Android源代码中的`kernel`目录就包含了与Linux内核相关的代码和配置。 **2. 运行库层** 运行库层提供了多种库,如Android运行时库(ART)、Bionic C库、媒体库、SQLite数据库等。这些库使得应用程序可以高效地运行...

    Android的Linux内核与驱动程序

    - 通过Git可以从官方仓库克隆得到通用的Linux内核代码: ``` git clone git://android.git.kernel.org/kernel/common.git ``` - `kernel/common.git` 是通用Kernel项目的名称。对于Android 1.5之前的版本,内核...

Global site tag (gtag.js) - Google Analytics