分页: 1 / 1

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

发表于 : 2007-10-07 16:48
bluce
小弟依照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

发表于 : 2007-10-07 16:57
BigSnake.NET
sudo apt-get install linux-kernel-devel

发表于 : 2007-10-07 17:01
bluce
谢谢,楼上大哥,试一下 :P

发表于 : 2007-10-07 17:13
bluce
二楼大哥,还是同样错误。

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

重启过

发表于 : 2007-10-07 20:44
bluce
有没有兄弟碰到同样的情况?

发表于 : 2007-10-07 20:50
BigSnake.NET

代码: 全选

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

发表于 : 2007-10-09 22:09
bluce
BigSnake.NET大哥,现在可以了

:D
谢谢!
:D

发表于 : 2007-12-18 11:17
double1123
make dep为什么不用阿

发表于 : 2007-12-18 12:32
bluce
double1123 写了:make dep为什么不用阿
/opt/host/armv4l/bin/armv4l-unknown-linux-gcc:命令未找到--->需要在/opt/host/armv4l/bin/安装有armv4l-unknown-linux-gcc这个程序才可以使用make dep

发表于 : 2007-12-18 14:56
double1123
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
这个如何解决阿??

发表于 : 2008-03-03 17:37
wyylling
(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