Hi,
I got compiling errors when I built U-boot.2009.08. The error message is below that it seems cross-compiler issue. Does any one know what it mean and how to fix? I am pretty new to LTIB.
~/u-boot-2009.08$ sudo make CROSS_COMPILE=arm-fsl-linux-gnueabi- mx6q_sabrelite_config
[sudo] password for byang:
/bin/bash: arm-fsl-linux-gnueabi-gcc: command not found
/bin/bash: arm-fsl-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Generating include/autoconf.mk
/bin/bash: line 3: arm-fsl-linux-gnueabi-gcc: command not found
/bin/bash: arm-fsl-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Generating include/autoconf.mk.dep
Hi Leo,
If I use file command to search it with the PATH. It showed up.
byang@byang-EP45T-UD3P:~$ file /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-gcc
/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.0, stripped
But if I use file command without PATH. It showed error said Not such file or directory.
byang@byang-EP45T-UD3P:~$ file arm-none-linux-gnueabi-gcc
arm-none-linux-gnueabi-gcc: ERROR: cannot open `arm-none-linux-gnueabi-gcc' (No such file or directory)
I had "export PATH=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/:$PATH" and I also edited the .bashrc file to add the PATH. But it still failed with No such file or directory error.
I wonder if you have any idea to fix this problem?
Bill
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel
free to reply with an update to this discussion.
Thanks,
Yixing
Hi Leo,
Thanks for you replying. I followed your hint and run ./ltib -m shell.
Under shell prompt LTIB> make clean
LTIB>make CROSS_COMPILE=arm-fsl-linux-gnueabi- mx6q_sabrelite_config
LTIB>make CROSS_COMPILE=arm-fsl-gnueabi-
It built u-boot.bin. But If I exit the shell LTIB and under bash $. The build will fail again with the same error.
~/u-boot-2009.08$ sudo make CROSS_COMPILE=arm-fsl-linux-gnueabi- mx6q_sabrelite_config
[sudo] password for byang:
/bin/bash: arm-fsl-linux-gnueabi-gcc: command not found
/bin/bash: arm-fsl-linux-gnueabi-gcc: command not found
Could you please explain why I have to do a build under LTIB shell? This is not conveniently way to build u-boot, kernel and modules.
On the ltib's shell, look at the PATH variable, then exit, and set the toolchain path to the PATH variable, like in the above example
$ ./ltib -m shell
Entering ltib shell mode, type 'exit' to quit
LTIB> echo $PATH
/home/b42214/fsl/BSP/src/linux/L3.0.35_4.0.0_130424/ltib/bin:/opt/freescale/ltib/usr/spoof:/home/b42214/fsl/BSP/src/linux/L3.0.35_4.0.0_130424/ltib/bin:/opt/freescale/ltib/usr/bin:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin
LTIB> exit
exit
$ cd rpm/BUILD/linux
linux$ PATH=$PATH:/opt/freescale/ltib/usr/bin:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin
linux$ make ARCH=arm CROSS_COMPILE=arm-fsl-linux-gnueabi- imx6_defconfig
#
# configuration written to .config
#
Leo
Hi Leo,
I can compile everything under LTIB as followed your instructions above. But if I exit LTIB folder and change directory to others, it still failed to compile with the same errors as below. I wonder if you can help me to figure out this problem. I have added export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin to .bashrc file, but it still failed.
byang@byang-EP45T-UD3P:~/u-boot-imx6$ sudo make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- nitrogen6q_config
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Generating include/autoconf.mk
/bin/bash: line 3: arm-none-linux-gnueabi-gcc: command not found
Generating include/autoconf.mk.dep
/bin/bash: line 3: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
/bin/bash: arm-none-linux-gnueabi-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
Configuring for nitrogen6q - Board: nitrogen6x, Options: IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024
I echo $PATH and got the followings.
byang@byang-EP45T-UD3P:~/u-boot-imx6$ echo $PATH
/home/byang/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin:/opt/freescale/ltib/usr/bin:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin
Hi Bill,
that is strange, you are doing the correct steps.
What OS and shell are you using? to know the shell, type echo $0. Also, open a bash session, just type 'bash' before calling make.
Things to check:
1. Make sure your toolchain files have execution permission
2. Try to call the compiler manually (e.g arm-....-gcc helloworld.c)
Also, can you try using another toolchain? Yocto has one (https://community.freescale.com/docs/DOC-95264)
Leo