下载编译安装android内核源代码 - muyu01248/log GitHub Wiki
下载编译安装android内核源代码[http://blog.csdn.net/luoshengyang/article/details/6564592] mkdir kernel
git clone http://android.googlesource.com/kernel/goldfish.git git branch -a git checkout remotes/origin/achive/android-goldfish-2.6.29
[prebuild/linux-x86/toolchain/arm-eabi-4.4.3/bin]
[the remote end hung up unexpectedly]
export $PATH=$PATH:/home/ubunt/aosp-4.0.1_r1/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
common/Makefile arch=arm CROSS_COMPILE=/home/ubuntu/aosp-4.0.1_r1/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
make goldfish-armv7-defconfig make menuconfig make [Objcopy arch/arm/boot/zImage] [kernel: arch/arm/boot/zImage]
export PATH=$PATH:/home/ubuntu/aosp-4.0.1_r1/out/host/linux-x86/bin export ANDROID_PRODUCT_OUT=/home/ubuntu/aosp-4.0.1_r1/out/target/product/generic emulator -kernel /home/ubuntu/aosp-4.0.1_r1/kernel/goldfish/arch/arm/boot/zImage &
adb shell adb shell
cat /proc/version
[repo init -u git://mirrors.ustc.edu.cn/aosp/platform/mainfest] git clone git://mirrors.ustc.edu.cn/aosp/kernel/goldfish.git
如何下载并编译Android模拟器Linux内核goldfish [http://blog.csdn.net/u013541140/article/details/52221290] (错误)... goldfish/arch/arm: Is a directory. Stop. export ARCH=arm[ ]* 多一空格 export SUBARCH=arm export CROSS_COMPILE=/home/ubuntu/aosp-4.0.1_r1/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ source aosp-4.0.1_r1/build/envsetup.sh lunch 1 make goldfish_armv7_defconfig[goldfish/arch/arm/golffish_armv7_defconf -> golfish/.config文件] make
(错误)fs/yaffs2/yportenv.h:41:25: error: operator '<' has not left operand
Makefile:LINUX_VERSION_CODE未定义
define filechk_version.h
(echo '#define KERNEL_VERSION(a,b,c)...';
echo '#define LINUX_VERSION_CODE KERNEL_VERSION(2,6,29)';
)
endef
Error: include/linux/coda.h:223: error: expected specifier-qualifier-list before 'u_quad_t' make[2]: *** [fs/coda/psdev.o] 错误 1 make[1]: *** [fs/coda] 错误 2 make: *** [fs] 错误 2
fix: #ifdef aligned_u64 #undef aligned_u64 #endif #define aligned_u64 unsigned long long attribute((aligned(64))) 仍然: 只建立一下几个链接就ok了:ar g++ gcc ld nm objcopy objdump