当前位置: 技术问答>linux和unix
拿到arm的toolchain后编译u-boot出了点问题,请问cc1是啥?错误信息说是少这个东西
来源: 互联网 发布时间:2016-05-13
本文导语: 我是用虚拟机装的FC6,GCC什么的肯定没有装. 基本上我都是按照网上搜到的资料做的: 从别人那直接拿到了编译好的toolchain包,我解压缩到/opt下的一个目录,之后把toolchain目录下的bin目录内所属权限改为我的普通用户,全都...
我是用虚拟机装的FC6,GCC什么的肯定没有装.
基本上我都是按照网上搜到的资料做的:
从别人那直接拿到了编译好的toolchain包,我解压缩到/opt下的一个目录,之后把toolchain目录下的bin目录内所属权限改为我的普通用户,全都改成了可执行
在/etc/bashrc加入
if [ -d /opt/emlix/pnx8181 ]; then
PATH=/opt/enlix/pnx8181/bin:"${PATH}"
fi
这样就把path变量弄出来,以普通用户登陆在shell下可以执行arm-linux-gcc了。
之后我把u-boot代码放在home/myusername/workspace/source/u-boot
之后执行了make xxxx_config
然后make u-boot.bin失败,错误信息是:
arm-linux-gcc: error trying to exec 'cc1': execvp: No such file or directory
请问这是咋回事??是toolchain包少东西还是我少做了啥??如何解决捏??
编译输出信息如下:
for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: Entering directory `/workspace/source/u-boot/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/tools'
make[1]: Entering directory `/workspace/source/u-boot/examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/examples'
make[1]: Entering directory `/workspace/source/u-boot/post'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/post'
make[1]: Entering directory `/workspace/source/u-boot/post/cpu'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/post/cpu'
make -C tools all
make[1]: Entering directory `/workspace/source/u-boot/tools'
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o img2srec img2srec.o
strip img2srec
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o mkimage.o mkimage.c
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o crc32.o crc32.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o mkimage mkimage.o crc32.o
strip mkimage
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o envcrc.o envcrc.c
gcc -g -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -c -o environment.o environment.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o envcrc envcrc.o crc32.o environment.o
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o gen_eth_addr.o gen_eth_addr.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o gen_eth_addr gen_eth_addr.o
strip gen_eth_addr
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o bmp_logo.o bmp_logo.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o bmp_logo bmp_logo.o
strip bmp_logo
./bmp_logo logos/denx.bmp >/workspace/source/u-boot/include/bmp_logo.h
make[1]: Leaving directory `/workspace/source/u-boot/tools'
make -C examples all
make[1]: Entering directory `/workspace/source/u-boot/examples'
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -mno-thumb-interwork -D__KERNEL__ -DTEXT_BASE=0x20780000 -I/workspace/source/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/emlix/pnx8181/lib/gcc/arm-linux-gnueabi/4.1.2/include -pipe -DCONFIG_ARM -D__ARM__ -Os -mtune=arm9e -march=armv5te -fPIC -fPIE -fno-jump-tables -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
make[1]: Leaving directory `/workspace/source/u-boot/examples'
arm-linux-gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [hello_world.o] 错误 1
基本上我都是按照网上搜到的资料做的:
从别人那直接拿到了编译好的toolchain包,我解压缩到/opt下的一个目录,之后把toolchain目录下的bin目录内所属权限改为我的普通用户,全都改成了可执行
在/etc/bashrc加入
if [ -d /opt/emlix/pnx8181 ]; then
PATH=/opt/enlix/pnx8181/bin:"${PATH}"
fi
这样就把path变量弄出来,以普通用户登陆在shell下可以执行arm-linux-gcc了。
之后我把u-boot代码放在home/myusername/workspace/source/u-boot
之后执行了make xxxx_config
然后make u-boot.bin失败,错误信息是:
arm-linux-gcc: error trying to exec 'cc1': execvp: No such file or directory
请问这是咋回事??是toolchain包少东西还是我少做了啥??如何解决捏??
编译输出信息如下:
for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: Entering directory `/workspace/source/u-boot/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/tools'
make[1]: Entering directory `/workspace/source/u-boot/examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/examples'
make[1]: Entering directory `/workspace/source/u-boot/post'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/post'
make[1]: Entering directory `/workspace/source/u-boot/post/cpu'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/workspace/source/u-boot/post/cpu'
make -C tools all
make[1]: Entering directory `/workspace/source/u-boot/tools'
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o img2srec img2srec.o
strip img2srec
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o mkimage.o mkimage.c
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o crc32.o crc32.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o mkimage mkimage.o crc32.o
strip mkimage
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o envcrc.o envcrc.c
gcc -g -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -c -o environment.o environment.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o envcrc envcrc.o crc32.o environment.o
gcc -g -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o gen_eth_addr.o gen_eth_addr.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o gen_eth_addr gen_eth_addr.o
strip gen_eth_addr
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -c -o bmp_logo.o bmp_logo.c
gcc -Wall -pedantic -idirafter /workspace/source/u-boot/include -idirafter /workspace/source/u-boot/include2 -idirafter /workspace/source/u-boot/include -DTEXT_BASE=0x20780000 -DUSE_HOSTCC -O -o bmp_logo bmp_logo.o
strip bmp_logo
./bmp_logo logos/denx.bmp >/workspace/source/u-boot/include/bmp_logo.h
make[1]: Leaving directory `/workspace/source/u-boot/tools'
make -C examples all
make[1]: Entering directory `/workspace/source/u-boot/examples'
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -mno-thumb-interwork -D__KERNEL__ -DTEXT_BASE=0x20780000 -I/workspace/source/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/emlix/pnx8181/lib/gcc/arm-linux-gnueabi/4.1.2/include -pipe -DCONFIG_ARM -D__ARM__ -Os -mtune=arm9e -march=armv5te -fPIC -fPIE -fno-jump-tables -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
make[1]: Leaving directory `/workspace/source/u-boot/examples'
arm-linux-gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [hello_world.o] 错误 1
|
多半是你的交叉编译环境没安装对
cc1是编译工具,GCC只是编译的最初始接口,GCC实际上就是调用cc1进行编译,调用LD进行链接
cc1是编译工具,GCC只是编译的最初始接口,GCC实际上就是调用cc1进行编译,调用LD进行链接