交叉编译openwrt php,构建 openwrt 交叉编译工具链

1 首先。make menuconfig 的时候选上工具链:

也就是 Package the OpenWrt-based Toolchain

Target System (Ralink RT288x/RT3xxx) ---> x x

x x Subtarget (RT3x5x/RT5350 based boards) ---> x x

x x Target Profile (HAME MPR-A2) ---> x x

x x Target Images ---> x x

x x Global build settings ---> x x

x x [ ] Advanced configuration options (for developers) ---- x x

x x [ ] Build the OpenWrt Image Builder x x

x x [ ] Build the OpenWrt SDK x x

x x [*] Package the OpenWrt-based Toolchain x x

x x [ ] Image configuration ---> x x

编译完后会在 bin/ramips/ 生成 penWrt-Toolchain-ramips-rt305x_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-i686.tar.bz2

把这个文件解压到任何一个目录。推荐解压到 /opt/目录下

然后修改 解压后的文件夹里面的文件

OpenWrt-Toolchain-ramips-rt305x_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-i686/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-wrapper.sh

TOOLCHAIN_SYSROOT="$TOOLCHAIN_BIN_DIR/../.."

这一行后面添加:

export STAGING_DIR="$REALNAME_DIR/../../"

最后一步。把这个

/opt/OpenWrt-Toolchain-ramips-rt305x_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-i686/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin

这个目录添加到 path 这个环境变量中。具体百度

本文同步分享在 博客“连志安的博客”(CSDN)。

如有侵权,请联系 support@oschina.cn 删除。

本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值