1.下载
android.git.kernel.org目前也访问不了,听说google把所有代码都移到了googlesource上,但是貌似没有glodfish kernel, 因此目前只能从github上下载:
https://github.com/android/kernel_common/tree/archive/android-gldfish-2.6.29
2.设置环境变量
export PATH=$PATH:<android>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export ARCH=arm
3.修改kernel根目录下的Makefile
1) ARCH ?= $(SUBARCH)
改为: ARCH ?= arm
2) CROSS_COMPILE ?=
改为:CROSS_COMPILE ?=arm-eabi-
3)LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
$(call ld-option, -Wl$(comma)--build-id,))
改为:LDFLAGS_BUILD_ID =
4.编译
make goldfish_defconfig
make