简体   繁体   English

如何在ubuntu上编译Android内核源代码?

[英]How to compile Android Kernel source code on ubuntu?

I have downloaded both Android 4.2 source code and Android kernel source code (common) separately by following the procedure mentioned in Android website. 我已经按照Android网站中提到的程序分别下载了Android 4.2源代码和Android内核源代码(常见)。 But I am not able to get the way how to start compiling both kernel code and source code on Ubuntu 12.04. 但我无法在Ubuntu 12.04上开始编译内核代码和源代码。 I have also downloaded the Android Emulator. 我还下载了Android模拟器。

Please mention the steps required to compile. 请提及编译所需的步骤。

AOSP site contains Downloading and Building guide: http://source.android.com/source/initializing.html AOSP网站包含Downloading and Building指南: http//source.android.com/source/initializing.html

You should set up your local work environment to build the Android source files. 您应该设置本地工作环境以构建Android源文件。 You will need to use Linux (Ubuntu in yor case) or Mac OS. 您需要使用Linux(尤其是Ubuntu)或Mac OS。 Building under Windows is not currently supported. 目前不支持在Windows下构建。

Note: The source download is approximately 8.5GB in size. 注意:源下载大小约为8.5GB。 You will need over 30GB free to complete a single build, and up to 100GB (or more) for a full set of builds. 您将需要超过30GB的空闲时间来完成单个构建,并且需要高达100GB(或更多)才能完成整套构建。

Detailed instructions for Ubuntu and MacOS you can see on AOSP site. 您可以在AOSP网站上看到有关Ubuntu和MacOS的详细说明。 In general you will need: 一般来说,您将需要:

Note: It is also possible to build Android in a virtual machine. 注意:也可以在虚拟机中构建Android。 If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree. 如果您在虚拟机中运行Linux,则需要至少16GB的RAM /交换和30GB或更多的磁盘空间才能构建Android树。

On XDA-developers you can see this Ubuntu-guide: http://forum.xda-developers.com/showthread.php?t=2114594 在XDA开发人员上,您可以看到这个Ubuntu指南: http//forum.xda-developers.com/showthread.php?t = 2114594

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM