首先解压 tar zxvf OpenWrt-toolch ...... 然后 找到目录下 bin文件夹 PWD
接下来配置系统环境变量,把交叉编译工具链的路径添加到环境变量PATH中去 ,这样就可以在任何目录下使用这些工具。记下上一步中的安装路径,使用命令: vim /etc/profile 编辑profile文件,添加环境变量 vim /etc/bash.bashrc
在profile中最后一行添加:export PATH=$PATH:
export STAGING_DIR=$STAGING_DIR:/home/distance/openwrt_CC_mt76xx_zhuotk_source/staging_dir/
export PATH=$PATH:/home/distance/openwrt_CC_mt76xx_zhuotk_source/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin
加上 bin文件夹目录所在的路径就可以了,
编写完退出并保存
在shell 使用命令 : sourece /etc/profile 使环境变量生效
在终端上输入命令 mipsel -openwrt-linux 再按tab键, 可以显示有其他的 就说明环境变量设置成功了