This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Linux/AM4379:交叉编译工具链

Guru**** 2540720 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/618911/linux-am4379-cross-compile-tool-chains

器件型号:AM4379

工具/软件:Linux

我已经配置了交叉编译工具链:arm-linux-gnueabihf-gcc、命令行显示它可以工作:

TL@tl-virtual-machine:/media/tl437x/kernel arm-linux-gnueabihf-gcc -v
使用内置规格。
collect_gcc=arm-linux-gnueabihf-gcc
Collect_LTO_wraper=/home/tl/ti-processor-sdk-linux-am437x-evm-01.00.00.03/linux-devkit/sysroots/i686-arago-linux/usr/bin/../libexec/gcc/arm-linux-gnueabihf/4.7.3/lto-wrapper
目标:arm-linux-gnueabihf
配置为:/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/gcc-linaro-4.7-2013.03/configurebugs.launchpad.net/gcc-linaro /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --build=i686-build_PC-linux-GNU --host=i686-build_PC-linux-GNU --target=arm-linux-gnueabihf --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --enable-languag=c、c++、fortran --enable-multibloostep-g=-bu-rick-un-rick-mand-rand-un=g-rick-mand-un-rand-rand-msp-un-rand-rand-mand-mand-msp-un-rand-rand-rand-un-rand-rand-rand-rand-rand-msp-msp=g=g-rand-rand-rand-un-rand-rand-rand-rand-un-un-un-rand-rand-un-msp-rand-un-msp-rand-un-msp-un-msp=g=g=g-rand-rand-rand-rand-r /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc
线程模型:POSIX
GCC 版本4.7.3 20130226 (预发布版)(Crossstad-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03)  


但是、当我将其用作以下用途时:

TL@tl-virtual-machine:/media/tl437x/kernel sudo make ARCH=arm cross_compile=arm-linux-gnueabihf- distclean

命令行提示我找不到命令。

TL@tl-virtual-machine:/media/tl437x/kernel sudo make ARCH=arm cross_compile=arm-linux-gnueabihf- distclean
make: arm-linux-gnueabihf-gcc:未找到命令
TL@tl 虚拟机:/media/tl437x/kernel

哪个原因可能会导致此问题?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    您需要将路径变量附加到 toolcahin 位置、请查看 basrc 文件执行如下操作:

    导出路径=$path:

    谢谢、
    Prabhakar LAD
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Prabhakar、您好!

    感谢您的快速回复。
    我添加了命令 配置文件的链接/etc/profile.
    但命令行仍提示"未找到命令"。
    我已经卸载了交叉编译工具链、然后很久以前就重新安装了。它会影响吗?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您需要重新加载 bashrc 文件、以下命令将重新加载该文件(或者、如果您重新启动机器、即使应该会将其选中)

    Source ~/.bashrc

    如果在配置文件中添加了路径,则需要执行以下操作:

    source /etc/profile

    谢谢、

    Prabhakar LAD

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    非常感谢