zhongzai 发表于 2014-7-21 09:11:01

在编译Ubuntu内核时遇到问题,请求帮助。。。

在按照数据手册进行编译时,在make uImage 命令之后,报如下错误:

r_Ubuntu$ sudo make uImage
password for lizhongbao:
CHK   include/linux/version.h
CHK   include/generated/utsrelease.h
make: “include/generated/mach-types.h”是最新的。
CC      kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
kernel/bounds.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make: *** 错误 1
make: *** 错误 2

之后我按照网上的相关帖子,变形了shell 脚本,内容为:
export CROSS_COMPILE=/opt/embedsky/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-none-linux-gnueabi-
make uImageARCH=arm

时可以编译,但是在编译到一半时,出现如下报错:
CALL    scripts/checksyscalls.sh
CHK   include/generated/compile.h
SKIPPED include/generated/compile.h
CC      drivers/char/dcc_tty.o
drivers/char/dcc_tty.c:29:36: error: 'SPIN_LOCK_UNLOCKED' undeclared here (not in a function)
make: *** 错误 1
make: *** 错误 2
make: *** 错误 2

从咱们天嵌的论坛其他人的发帖看 第一个问题应该不是偶然情况,可能是批次问题,希望引起咱们技术同事的注意。
请问我遇到的问题该怎么解决。。。。。。谢谢

memboo 发表于 2014-8-26 16:24:06

用这个脚本可以通过:

export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
cp imx6_defconfig   .config
make uImage

wbz073 发表于 2014-7-21 09:58:09

你这里没有配置单,没进行正确配置

zhongzai 发表于 2014-7-21 10:15:13

我有cp im6_config .config ,在编译内核的时候需要我选择,但是具体怎么选,不知道,我全选Y或N之后,如此报错:
Unix98 PTY support (UNIX98_PTYS) y
Support multiple instances of devpts (DEVPTS_MULTIPLE_INSTANCES) n
Legacy (BSD) PTY support (LEGACY_PTYS) y
Maximum number of legacy PTY in use (LEGACY_PTY_COUNT) 256
Non-standard serial port support (SERIAL_NONSTANDARD) n
GSM MUX line discipline support (EXPERIMENTAL) (N_GSM) n
Trace data sink for MIPI P1149.7 cJTAG standard (TRACE_SINK) n
MX6 LEDS' driver (MX6_LEDS) y
Memory device driver (DEVMEM) (NEW) n
/dev/kmem virtual device support (DEVKMEM) y
TTY driver to output user messages via printk (TTY_PRINTK) n
Freescale On-Chip OTP Memory Support (FSL_OTP) y
ARM JTAG DCC console (HVC_DCC) n
Hardware Random Number Generator Core support (HW_RANDOM) y
Timer IOMEM HW Random Number Generator support (HW_RANDOM_TIMERIOMEM) n
Siemens R3964 line discipline (R3964) n
RAW driver (/dev/raw/rawN) (RAW_DRIVER) n
DCC tty driver (DCC_TTY) (NEW) n
Log panic/oops to a RAM buffer (RAMOOPS) n
MXS Virtual IIM device driver (MXS_VIIM) y
#
# configuration written to .config
#
CHK   include/linux/version.h
CHK   include/generated/utsrelease.h
make: “include/generated/mach-types.h”是最新的。
CC      kernel/bounds.s
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
kernel/bounds.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make: *** 错误 1
make: *** 错误 2


请问,我具体该怎么操作,?

wbz073 发表于 2014-8-1 10:41:27

zhongzai 发表于 2014-7-21 10:15
我有cp im6_config .config ,在编译内核的时候需要我选择,但是具体怎么选,不知道,我全选Y或N之后,如此 ...

你按照如下操作,http://blog.csdn.net/bzw073/article/details/19980621
页: [1]
查看完整版本: 在编译Ubuntu内核时遇到问题,请求帮助。。。