Skip to content

ferstar/openwrt-libevent21

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

openwrt-libevent21

libevent 2.1 package for openwrt

  1. 下载对应芯片平台的SDK,我的是联想newifi minimt7620a
  2. 下载PandoraBox Toolchain
  3. 配置交叉编译环境变量(假设我将以上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
  1. 将本Repository中的Makefile放到SDK根目录package目录下,如package/libevent21
  2. 在SDK根目录运行make package/libevent21/install V=s
  3. 不出意外的话ipk会在bin/ramips/packages/base目录下
  4. 将所需的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 define STAGING_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 (via file:/// url schema)