Vous êtes sur la page 1sur 3

CustomizeKernel - Android-x86 - Porting Android to x86 http://www.android-x86.

org/documents/customizekernel

Android-x86 - Porting Android


to x86
Search Documentation >
News
Download
CustomizeKernel
Donate
Get Source
by Chih-Wei Huang (cwhuang) 2009/07/13
Installation
Screenshots
Documentation
App HowTo
CustomizeKernel
VirtualBoxHowTo
QemuHowTo
Sdcard HowTo
UvesafbHowTo
HowToConfigureB…
HowToMakeCame…
HowToUsePrebuil…
NFS How To
Touch only device
howto
NDK HowTo
Debug Howto
Add new target
How to wake up the
machine Overview
How to make
virtualbox ICH AC97 The Android build system doesn't compile kernel on-fly. It just contains a prebuilt kernel
audio to work with binary which will be added to the target image. This approach may be good enough for
android eclair-x86 the arm emulator target, but not suitable for x86 platforms. The x86 platforms have
How to boot the various hardware. The kernel binary and its modules may need to be adjusted at compile
Android-x86 Live- time or runtime.
CD when you have
problems with your This article describes an extra feature of the build system of android-x86 project. That is,
graphiccard the ability to build kernel and modules by a predefined or customized config during the
Supported List building process.
Releases
ReleaseNote 7.1-r1
ReleaseNote CM-
Compile kernel for Android-x86
x86-14.1-rc1
ReleaseNote 7.1-rc2 Prepare the source tree
ReleaseNote 7.1-rc1
ReleaseNote 6.0-r3 We have modify the Android build system to compile a kernel image on-fly. You need to
use our repository to get this feature. Read the article GetSourceCode for details.
ReleaseNote CM-
x86-13.0-r1
ReleaseNote 6.0-r2 Build the default kernel
ReleaseNote CM-
x86-13.0-rc1 We put a default config for android-x86 in kernel/arch/x86/configs/. To build a
ReleaseNote 6.0-r1 kernel image from this config, run

1 of 3 10/02/2018, 8:55
CustomizeKernel - Android-x86 - Porting Android to x86 http://www.android-x86.org/documents/customizekernel

ReleaseNote 6.0-rc2
ReleaseNote 6.0-rc1 $ make iso_img TARGET_PRODUCT=android_x86
ReleaseNote 5.1-rc1
By specifying the TARGET_PRODUCT to android_x86, the build system automatically
ReleaseNote 4.4-r5
selects the config android-x86_defconfig to compile the kernel binary and its
ReleaseNote 4.4-r4
modules. The binary will finally be generated in out/target/product/x86/kernel,
ReleaseNote 4.4-r3
and the modules is put under out/target/product/x86/system/lib/modules/.
ReleaseNote 4.4-r2
The final target out/target/product/x86/android_x86.iso will contain the kernel
ReleaseNote 4.4-r1 binary and its modules.
ReleaseNote 4.4-
RC2 You may build the kernel and its modules alone, by changing the goal iso_img to
ReleaseNote 4.4- kernel.
RC1
ReleaseNote 4.0-r1 $ make kernel TARGET_PRODUCT=android_x86
ReleaseNote 4.0-
RC2
ReleaseNote 4.0-
Build the target kernel
RC1
Since donut-x86 we have supported multiple targets, e.g., eeepc, tegav2, ... Each target
ReleaseNote 3.2
RC2
may has its customized kernel config located in its device definition directory. When you
choose a target (by specifying TARGET_PRODUCT or lunch command, see
ReleaseNote 2.2-r2
GetSourceCode for details.), the customized kernel config of this target will be used to
ReleaseNote 2.2
build the kernel image.
ReleaseNote 1.6-r2
ReleaseNote 1.6
Build a customized kernel
Build 20130725
Build 20130228 Suppose you already have a workable kernel config for you hardware, it's easy to tell the
Build 20120101 build system to use your config to build the iso. Just put your config file to kernel/arch
Build 20110828 /x86/configs/, and run (suppose the name of your config is my_defconfig)
Build 20110101
Build 20100812 $ make iso_img TARGET_PRODUCT=android_x86
TARGET_KERNEL_CONFIG=my_defconfig
Build 20100115
Build 20091113
Note you cannot use a kernel config from a normal linux distribution (e.g, ubuntu) for
Build 20091024
android-x86. You need to enable android kernel features to make it work. See
Build 20090916
android/configs/android-base.cfg for a list of required configuration options for a kernel to
Build 20090820 support an Android system. (but removes arm specific options for android-x86, e.g.,
ReleaseNote v0.9 PMEM)
Contact Us
Resources Customize the kernel configuration
Sitemap
It is never advisable to edit the kernel config file directly, as it may generate faulty
Recent site activity
configuration (dependencies not met etc.). The correct way to customize the kernel config
Links is (on the top of android-x86 tree)
SourceForge project
$ . build/envsetup.sh
Browse the source $ lunch xxx-userdebug
Discussion group $ make -C kernel O=$OUT/obj/kernel ARCH=x86 menuconfig
Google code project
Issues tracker where xxx is a target you chosen. Then copy $OUT/obj/kernel/.config to
Blog cwhuang custom_kernel_config_location.
Blog sceners
DO NOT issue make menuconfig in the kernel/ directory directly. If you do so, the
Blog beyounn
build rules may be broken. In this case, try this way to recover it (on the top of android-
Blog android-x86 x86 tree):
Twitter android_x86

2 of 3 10/02/2018, 8:55
CustomizeKernel - Android-x86 - Porting Android to x86 http://www.android-x86.org/documents/customizekernel

RSS for main page


$ make -C kernel distclean
Developers $ rm -rf $OUT/obj/kernel
Google apps
Google sites
Use a prebuilt kernel
Google mails
Google docs If you have a workable prebuilt kernel binary for your hardware, you can generate the iso
Google calendar with it:
Google analytics
$ make iso_img TARGET_PRODUCT=android_x86
TARGET_PREBUILT_KERNEL=<path to the prebuilt kernel>

Compile kernel for ARM (deprecated)


The kernel build system can also be used to compile kernel for ARM. For example, to
compile kernel 2.6.29 for the goldfish CPU of the arm emulator, run

$ cd kernel
$ git checkout x86/android-goldfish-2.6.29
$ cd ..
$ make kernel TARGET_KERNEL_CONFIG=goldfish_defconfig TARGET_NO_KERN

The kernel binary will be generated in out/target/product/generic/kernel.

Set TARGET_NO_KERNEL to be empty is important, otherwise the kernel building steps


will be skipped.

Sign in | Recent Site Activity | Report Abuse | Print Page | Powered By Google Sites

3 of 3 10/02/2018, 8:55