原文地址:http://blog.csdn.net/bjutstar/article/details/7059541
Ubuntu12.04下编译飞凌嵌入式OK6410开发板提供的内核android2.3_kernel_v1.01-2012-09-23.tar
已经执行export PATH=/usr/local/arm/arm-none-linux-gnueabi/bin:$PATH,但还是出现如下问题
make: arm-none-linux-gnueabi-gcc:命令未找到
CHK include/linux/version.h
CHK include/generated/utsrelease.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
scripts/basic/docproc.c: In function ‘docsect’:
scripts/basic/docproc.c:336: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result
HOSTCC scripts/basic/hash
make[1]: “include/generated/mach-types.h”是最新的。
CC kernel/bounds.s
/bin/sh: arm-none-linux-gnueabi-gcc: not found
make[1]: *** [kernel/bounds.s] 错误 127
make: *** [prepare0] 错误 2
解决方案:
修改kernel文件夹下的Makefile文件
关于交叉编译的设置,在第192行附近
#ARCH ?= $(SUBARCH)
ARCH ?= arm
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
修改为(修改了CROSS_COMPILE项,为交叉编译器的路径)
#ARCH ?= $(SUBARCH)
ARCH ?= arm
# CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
CROSS_COMPILE ?= /usr/local/arm/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-