libevent 2.1 package for openwrt
- 下载对应芯片平台的SDK,我的是联想newifi minimt7620a
- 下载PandoraBox Toolchain
- 配置交叉编译环境变量(假设我将以上SDK及Toolchain都解压到~/pbox目录)
PATH=$PATH:~/pbox/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin
export PATH
STAGING_DIR=~/pbox
export STAGING_DIR
- 将本Repository中的Makefile放到SDK根目录package目录下,如
package/libevent21
- 在SDK根目录运行
make package/libevent21/install V=s
- 不出意外的话
ipk
会在bin/ramips/packages/base
目录下 - 将所需的
ipk
上传到路由器安装即可
To quickly build package for target platform:
- Get corresponding pre-built OpenWrt SDK from downloads.openwrt.org (e.g. this one for ar71xx platform)
- Set up environment for cross compilation - need to add toolchain binaries to
PATH
environment variable and defineSTAGING_DIR
. - In SDK root directory make a directory for package inside
package
(e.g.package/libevent21
). - Checkout
Makefile
to package directory - Run
make package/libevent21/install V=s
from SDK root - When built succesfully packages are placed in
bin/${PLATFORM}/packages
directory:- bin/ar71xx/packages/base/libevent2-pthreads_2.1.5-1_ar71xx.ipk
- bin/ar71xx/packages/base/libevent2-openssl_2.1.5-1_ar71xx.ipk
- bin/ar71xx/packages/base/libevent2-core_2.1.5-1_ar71xx.ipk
- bin/ar71xx/packages/base/libevent2-extra_2.1.5-1_ar71xx.ipk
- bin/ar71xx/packages/base/libevent2_2.1.5-1_ar71xx.ipk
- Generate package index:
staging_dir/host/bin/ipkg-make-index bin/ar71xx/packages/base > bin/ar71xx/packages/base/Packages
gzip -c bin/ar71xx/packages/base/Packages > bin/ar71xx/packages/base/Packages.gz
opkg
feeds need to be confgiured either to use local http server or install packages from filesystem (viafile:///
url schema)