rebuild u-boot时出错,总说gcc:命令未找到.详细情况如下:
[roger@roger uboot-03.20.00.12]$ make distclean CROSS_COMPILE=arm-none-linux-gnueabi-
[roger@roger uboot-03.20.00.12]$ make da830evm_config CROSS_COMPILE=arm-none-linux-gnueabi-
Configuring for da830evm board…
[roger@roger uboot-03.20.00.12]$ make all CROSS_COMPILE=arm-none-linux-gnueabi-
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done
make[1]: gcc:命令未找到
make[1]: Entering directory `/var/tmp/uboot-03.20.00.12/tools'
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
/bin/sh: line 2: gcc: command not found
make[1]: *** 没有规则可以创建“_depend”需要的目标“.depend”。 停止。
make[1]: Leaving directory `/var/tmp/uboot-03.20.00.12/tools'
make[1]: Entering directory `/var/tmp/uboot-03.20.00.12/examples/standalone'
make[1]: Leaving directory `/var/tmp/uboot-03.20.00.12/examples/standalone'
make[1]: Entering directory `/var/tmp/uboot-03.20.00.12/examples/standalone'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/var/tmp/uboot-03.20.00.12/examples/standalone'
make[1]: Entering directory `/var/tmp/uboot-03.20.00.12/examples/api'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/var/tmp/uboot-03.20.00.12/examples/api'
make -C tools all
make[1]: gcc:命令未找到
make[1]: Entering directory `/var/tmp/uboot-03.20.00.12/tools'
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /var/tmp/uboot-03.20.00.12/include -idirafter /var/tmp/uboot-03.20.00.12/include2 -idirafter
/var/tmp/uboot-03.20.00.12/include -I /var/tmp/uboot-03.20.00.12/libfdt -I /var/tmp/uboot-03.20.00.12/tools -DTEXT_BASE=0xC1080000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES –
pedantic -c -o crc32.o /var/tmp/uboot-03.20.00.12/lib_generic/crc32.c
make[1]: gcc:命令未找到
make[1]: *** [crc32.o] 错误 127
make[1]: Leaving directory `/var/tmp/uboot-03.20.00.12/tools'
make: *** [tools] 错误 2
[roger@roger uboot-03.20.00.12]$ echo $PATH
/home/roger/CodeSourcery/Sourcery_G++_Lite/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/roger/bin
多谢!
Eason Wang:
检查一下Rules.make中路径是否正确?
roger zhu:
回复 Eason Wang:
谢谢!指哪个路径?
rules.mk里的内容如下:
_depend: $(obj).depend
$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
@rm -f $@
@for f in $(SRCS); do \
g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
$(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \ done
@for f in $(HOSTSRCS); do \
g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \ $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \ done
$(HOSTOBJS): $(obj)%.o: %.c
$(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c$(NOPEDOBJS): $(obj)%.o: %.c
$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
另外,我编译helloworld是正常的。谢谢!
roger zhu:
回复 Eason Wang:
只要关闭终端,再次开启,编译器的路径就从$PATH消失了。多谢!