[问题]编译kernel错误,搞不定了,请兄弟们帮忙!(已解决)

内核编译和嵌入式产品的设计与开发
回复
bluce
帖子: 21
注册时间: 2007-08-19 9:04
来自: 上海

[问题]编译kernel错误,搞不定了,请兄弟们帮忙!(已解决)

#1

帖子 bluce » 2007-10-07 16:48

小弟依照qt2410手册在ubuntu下编译linux-2.4.18,出现armv4l-unknown-linux-gcc:命令未找到,一直搞不定,请各位兄弟们帮忙看看,谢了先!

# make menuconfig

rm -f include/asm-arm/arch include/asm-arm/proc
(cd include/asm-arm; ln -sf arch- arch; ln -sf proc- proc)
rm -f include/asm
( cd include ; ln -sf asm-arm asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/home/jimmy/tmp/kernel/scripts/lxdialog'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o checklist.o checklist.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o menubox.o menubox.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o textbox.o textbox.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o yesno.o yesno.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o inputbox.o inputbox.c
inputbox.c: 在函数 ‘dialog_inputbox’ 中:
inputbox.c:107: 警告: 传递参数 1 (属于 ‘strcpy’) 给指针时目标与指针有/无符号不一致
inputbox.c:109: 警告: 传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
inputbox.c:117: 警告: 传递参数 2 (属于 ‘waddnstr’) 给指针时目标与指针有/无符号不一致
inputbox.c:147: 警告: 传递参数 1 (属于 ‘strlen’) 给指针时目标与指针有/无符号不一致
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o util.o util.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o lxdialog.o lxdialog.c
lxdialog.c: 在函数 ‘j_inputbox’ 中:
lxdialog.c:211: 警告: 传递参数 2 (属于 ‘fprintf’) 给指针时目标与指针有/无符号不一致
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o msgbox.o msgbox.c
gcc -o lxdialog checklist.o menubox.o textbox.o yesno.o inputbox.o util.o lxdialog.o msgbox.o -lncurses
make[1]: Leaving directory `/home/jimmy/tmp/kernel/scripts/lxdialog'
/bin/bash scripts/Menuconfig arch/arm/config.in
Using defaults found in arch/arm/defconfig
Preparing scripts: functions, parsing.........................................................................done.

Saving your kernel configuration...

*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.


# make dep

rm -f include/asm-arm/arch include/asm-arm/proc
(cd include/asm-arm; ln -sf arch-s3c2410 arch; ln -sf proc-armv proc)
make[1]: Entering directory `/home/jimmy/tmp/kernel/arch/arm/tools'
/home/jimmy/tmp/kernel/scripts/mkdep -D__KERNEL__ -I/home/jimmy/tmp/kernel/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-common -pipe -mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes -msoft-float -- getconstants.c |\
sed s,getconstants.o,constants.h, > .depend
make all
make[2]: Entering directory `/home/jimmy/tmp/kernel/arch/arm/tools'
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc -D__KERNEL__ -I/home/jimmy/tmp/kernel/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-common -pipe -mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes -msoft-float -S -o constants.h.tmp.1 getconstants.c
make[2]: /opt/host/armv4l/bin/armv4l-unknown-linux-gcc:命令未找到
make[2]: *** [constants.h] 错误 127
make[2]: Leaving directory `/home/jimmy/tmp/kernel/arch/arm/tools'
make[1]: *** [dep] 错误 2
make[1]: Leaving directory `/home/jimmy/tmp/kernel/arch/arm/tools'
make: *** [archdep] 错误 2
上次由 bluce 在 2007-10-11 22:11,总共编辑 1 次。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#2

帖子 BigSnake.NET » 2007-10-07 16:57

sudo apt-get install linux-kernel-devel
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
bluce
帖子: 21
注册时间: 2007-08-19 9:04
来自: 上海

#3

帖子 bluce » 2007-10-07 17:01

谢谢,楼上大哥,试一下 :P
bluce
帖子: 21
注册时间: 2007-08-19 9:04
来自: 上海

#4

帖子 bluce » 2007-10-07 17:13

二楼大哥,还是同样错误。

make[2]: /opt/host/armv4l/bin/armv4l-unknown-linux-gcc:命令未找到
make[2]: *** [constants.h] 错误 127
make[2]: Leaving directory `/home/jimmy/tmp/kernel/arch/arm/tools'
make[1]: *** [dep] 错误 2
make[1]: Leaving directory `/home/jimmy/tmp/kernel/arch/arm/tools'
make: *** [archdep] 错误 2

重启过
bluce
帖子: 21
注册时间: 2007-08-19 9:04
来自: 上海

#5

帖子 bluce » 2007-10-07 20:44

有没有兄弟碰到同样的情况?
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#6

帖子 BigSnake.NET » 2007-10-07 20:50

代码: 全选

make mrproper
make oldconfig
make menuconfig 
make dep 貌似不用的..我的命令行..参考一下

代码: 全选

(time make-kpkg --rootcmd fakeroot --initrd --append-to-version=-ac-20071001  kernel_image kernel_headers linux_image linux_headers modules_image) 2>&1 | tee ../makelog
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
bluce
帖子: 21
注册时间: 2007-08-19 9:04
来自: 上海

#7

帖子 bluce » 2007-10-09 22:09

BigSnake.NET大哥,现在可以了

:D
谢谢!
:D
double1123
帖子: 23
注册时间: 2007-11-30 18:06

#8

帖子 double1123 » 2007-12-18 11:17

make dep为什么不用阿
bluce
帖子: 21
注册时间: 2007-08-19 9:04
来自: 上海

#9

帖子 bluce » 2007-12-18 12:32

double1123 写了:make dep为什么不用阿
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc:命令未找到--->需要在/opt/host/armv4l/bin/安装有armv4l-unknown-linux-gcc这个程序才可以使用make dep
double1123
帖子: 23
注册时间: 2007-11-30 18:06

#10

帖子 double1123 » 2007-12-18 14:56

make bzImage
CHK include/linux/version.h
make[1]: “include/asm-arm/mach-types.h”是最新的。
CHK include/linux/utsrelease.h
CC arch/arm/kernel/asm-offsets.s
cc1: 错误: 无法识别的命令行选项“-mlittle-endian”
cc1: 错误: 无法识别的命令行选项“-mapcs”
cc1: 错误: 无法识别的命令行选项“-mno-sched-prolog”
cc1: 错误: 无法识别的命令行选项“-mabi=apcs-gnu”
make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1
make: *** [prepare0] 错误 2
这个如何解决阿??
wyylling
帖子: 51
注册时间: 2008-01-01 22:30

#11

帖子 wyylling » 2008-03-03 17:37

(time make-kpkg --rootcmd fakeroot --initrd --append-to-version=-ac-20071001 kernel_image kernel_headers linux_image linux_headers modules_image) 2>&1 | tee ../makelog
回复