跳至内容
Hshh's Cosmos
用户工具
登录
站点工具
搜索
工具
显示页面
修订记录
反向链接
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您在这里:
Hshh's Cosmos
»
entware
»
Entware mips2 (细节不再更新)
您的足迹:
entware:mips2
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
===== Entware mips2 (细节不再更新) ===== 笔记: 创建 [[https://github.com/Entware/Entware|Entware]] 环境 ==== 系统环境准备 ==== ubuntu 需要安装以下软件包 <code> gcc g++ make autoconf automake flex gperf bison texinfo libtool libtool-bin libncurses5-dev zlib1g-dev unzip libssl-dev gettext python2.7 subversion </code> centos 需要安装以下软件包 <code> git patch bzip2 gcc gcc-c++ libtool ncurses-devel zlib-static openssl-devel make autoconf automake flex gperf bison texinfo libtool unzip gettext subversion </code> ==== 搭建 entware ==== <code> $ git clone https://github.com/Entware/Entware.git $ cd Entware $ make package/symlinks $ cp ./configs/mipselsf.config .config $ make tools/install $ make toolchain/install $ make target/compile </code> ==== 编译自带软件包 ==== 编译名叫name的软件 <code> $ make package/name/compile </code> ==== 手动编译软件 ==== === 设置环境变量 === <code> export STAGING_DIR=/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13 export PATH=$PATH:/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/bin </code> === 手动编译设置 === 手动编译软件时configure需要加入以下参数 <code> --target=mipsel-openwrt-linux \ --host=mipsel-openwrt-linux \ --build=x86_64-linux-gnu \ CC=mipsel-openwrt-linux-uclibc-gcc \ CFLAGS='-O2 -pipe -mno-branch-likely -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -fPIC' \ CPPFLAGS='-I/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/opt/include -I/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/include -I/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/usr/include -I/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/include' \ LDFLAGS='-L/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/opt/lib -L/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link=/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-uClibc.so.0 -L/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/usr/lib -L/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/lib' </code> === 例子 === 编译tinc 1.11pre11 先编译依赖库, entware自带 <code> make package/ncurses/compile make package/lzo/compile make package/libreadline/compile make package/zlib/compile </code> 接着编译tinc <code> ./configure \ --target=mipsel-openwrt-linux \ --host=mipsel-openwrt-linux \ --build=x86_64-linux-gnu \ --prefix=/opt \ --without-openssl \ CC=mipsel-openwrt-linux-uclibc-gcc \ CFLAGS='-O2 -pipe -mno-branch-likely -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -fPIC' \ CPPFLAGS='-I/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/opt/include -I/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/include -I/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/usr/include -I/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/include' \ LDFLAGS='-L/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/opt/lib -L/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link=/opt/mips/Entware/staging_dir/target-mipsel_mips32r2_uClibc-1.0.13/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-uClibc.so.0 -L/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/usr/lib -L/opt/mips/Entware/staging_dir/toolchain-mipsel_mips32r2_gcc-5.3.0_uClibc-1.0.13/lib' make </code>
entware/mips2.txt
· 最后更改: 2019/05/23 18:17 由
Hshh
页面工具
显示页面
修订记录
反向链接
回到顶部