zapret/docs/compile/build_howto_openwrt.md
2024-09-17 17:12:49 +03:00

1.3 KiB

How to compile native programs for use in OpenWrt

  1. Fetch correct version of OpenWrt
cd ~
  • the latest:
git clone git://git.openwrt.org/openwrt.git
  • exact version for older devices, e.g., 15.05:
git clone git://git.openwrt.org/15.05/openwrt.git
cd openwrt
  1. Feed Initialization and Installation
./scripts/feeds update -a
./scripts/feeds install -a
  1. Add zapret packages to build root
  • Copy package descriptions: copy compile/openwrt/* to ~/openwrt
  • Copy source code of tpws: copy tpws folder to ~/openwrt/package/zapret/tpws
  • Copy source code of nfq: copy nfq folder to ~/openwrt/package/zapret/nfq
  • Copy source code of ip2net: copy ip2net folder to ~/openwrt/package/zapret/ip2net
  1. Make a menuconfig
make menuconfig
  • Select your target architecture
  • Select packages Network/Zapret/* as "M"
  1. Compile a toolchain
make toolchain/compile
  1. Compile packages
make package/tpws/compile
make package/nfqws/compile
make package/ip2net/compile
make package/mdig/compile
  1. Get resulting packages

Take your tpws*.ipk, nfqws*.ipk, ip2net*.ipk, mdig*.ipk from there, e.g.:

find bin -name tpws*.ipk