来自初学者的交叉编译 mipsel
crosscompile mipsel from a beginner
我已经为交叉编译安装了 "mipsel tuxbox" 编译套件
主机系统是 x86_64 slackware
目的地是 mipsel32bit "vuduo+"
比如我要编译一个程序,我用这个脚本
make clean
export TOOLCHAIN=/opt/mipsel-tuxbox-linux-gnu
export PATH="$TOOLCHAIN/bin:$PATH"
export CC=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/gcc
export RANLIB=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/ranlib
make
编译可执行是..x86_64!
如果我使用这一行,会出现很多关于未找到包含的错误
make CC=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/gcc STRIP=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/strip CPPFLAGS="-I/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/sysroot/usr/include/linux/ -I/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/sysroot/usr/include/sys/"
怎么了?
已找到解决方案,类似的脚本编译正常
make clean
export TOOLCHAIN=/opt/mipsel-tuxbox-linux-gnu
export PATH=$PATH:/opt/mipsel-tuxbox-linux-gnu/libexec/gcc/mipsel-tuxbox-linux-gnu/4.8.1/:/opt/mipsel-tuxbox-linux-gnu/bin
export LDCFLAGS=/opt/mipsel-tuxbox-linux-gnu/lib
export LD_LIBRARY_PATH=/opt/mipsel-tuxbox-linux-gnu/lib
make CC=mipsel-tuxbox-linux-gnu-gcc LD=mipsel-tuxbox-linux-gnu-ld
你也应该看看http://code.vuplus.com/index.php?action=repo
这些系统基于 https://github.com/openembedded which use the https://github.com/openembedded/bitbake 构建系统。
除了上面的原始 vu+ 还有很多其他的像
- https://github.com/OpenPLi
- https://github.com/oe-alliance
- https://www.vuplus-support.org/wbb4/vtisoftware/
让您构建简单的应用程序并将其集成到具有一致依赖关系的完整系统映像。
其他选项是
- 使用gcc/llvm/etc。并制作 (https://www.linux-mips.org/wiki/Toolchains).
- 使用 crossdev 创建 Go 编译器 (https://wiki.gentoo.org/wiki/Crossdev) 或使用 crossdev 构建和管理您的软件。
- 将 RUST (https://www.rust-lang.org/tools/install) 与 mipsel-unknown-linux-gnu 工具链一起使用。
- 使用 https://github.com/joaohf/meta-erlang 和上面提到的 OpenEmbedded 构建系统构建一个 Erlang-Runtime,然后直接在您的 Box 上使用它。
- 使用 GDC 或 LDC 交叉编译 D (https://wiki.dlang.org/Compilers)。
我已经为交叉编译安装了 "mipsel tuxbox" 编译套件 主机系统是 x86_64 slackware 目的地是 mipsel32bit "vuduo+"
比如我要编译一个程序,我用这个脚本
make clean
export TOOLCHAIN=/opt/mipsel-tuxbox-linux-gnu
export PATH="$TOOLCHAIN/bin:$PATH"
export CC=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/gcc
export RANLIB=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/ranlib
make
编译可执行是..x86_64!
如果我使用这一行,会出现很多关于未找到包含的错误
make CC=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/gcc STRIP=/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/bin/strip CPPFLAGS="-I/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/sysroot/usr/include/linux/ -I/opt/mipsel-tuxbox-linux-gnu/mipsel-tuxbox-linux-gnu/sysroot/usr/include/sys/"
怎么了?
已找到解决方案,类似的脚本编译正常
make clean
export TOOLCHAIN=/opt/mipsel-tuxbox-linux-gnu
export PATH=$PATH:/opt/mipsel-tuxbox-linux-gnu/libexec/gcc/mipsel-tuxbox-linux-gnu/4.8.1/:/opt/mipsel-tuxbox-linux-gnu/bin
export LDCFLAGS=/opt/mipsel-tuxbox-linux-gnu/lib
export LD_LIBRARY_PATH=/opt/mipsel-tuxbox-linux-gnu/lib
make CC=mipsel-tuxbox-linux-gnu-gcc LD=mipsel-tuxbox-linux-gnu-ld
你也应该看看http://code.vuplus.com/index.php?action=repo
这些系统基于 https://github.com/openembedded which use the https://github.com/openembedded/bitbake 构建系统。
除了上面的原始 vu+ 还有很多其他的像
- https://github.com/OpenPLi
- https://github.com/oe-alliance
- https://www.vuplus-support.org/wbb4/vtisoftware/
让您构建简单的应用程序并将其集成到具有一致依赖关系的完整系统映像。
其他选项是
- 使用gcc/llvm/etc。并制作 (https://www.linux-mips.org/wiki/Toolchains).
- 使用 crossdev 创建 Go 编译器 (https://wiki.gentoo.org/wiki/Crossdev) 或使用 crossdev 构建和管理您的软件。
- 将 RUST (https://www.rust-lang.org/tools/install) 与 mipsel-unknown-linux-gnu 工具链一起使用。
- 使用 https://github.com/joaohf/meta-erlang 和上面提到的 OpenEmbedded 构建系统构建一个 Erlang-Runtime,然后直接在您的 Box 上使用它。
- 使用 GDC 或 LDC 交叉编译 D (https://wiki.dlang.org/Compilers)。