mirror of
https://github.com/bol-van/zapret.git
synced 2025-02-18 11:02:21 +03:00
Compare commits
No commits in common. "07c8cd3d5d43831b99789170e0044e176e70e88d" and "765770d2c7cdfe3cd5e7168e8a9dd38256b2d3a8" have entirely different histories.
07c8cd3d5d
...
765770d2c7
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,9 +1,7 @@
|
|||||||
/config
|
/config
|
||||||
ip2net/ip2net
|
ip2net/ip2net
|
||||||
mdig/mdig
|
mdig/mdig
|
||||||
nfq/dvtws
|
|
||||||
nfq/nfqws
|
nfq/nfqws
|
||||||
nfq/winws.exe
|
|
||||||
tpws/tpws
|
tpws/tpws
|
||||||
binaries/my/
|
binaries/my/
|
||||||
init.d/**/custom
|
init.d/**/custom
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
How to compile native programs for use in openwrt
|
How to compile native programs for use in openwrt
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
1) Install required packages to the host system :
|
1) Download latest SDK for your platform from https://downloads.openwrt.org
|
||||||
|
|
||||||
debian,ubuntu : apt install build-essential patch libncurses-dev python3-distutils unzip gawk wget git
|
|
||||||
fedora: dnf install make patch gcc g++ ncurses-devel git perl
|
|
||||||
|
|
||||||
Other packages may be required on your distribution. Look for the errors.
|
|
||||||
|
|
||||||
2) Download latest SDK for your target platform from https://downloads.openwrt.org
|
|
||||||
|
|
||||||
examples :
|
examples :
|
||||||
|
|
||||||
@ -18,12 +11,12 @@ cd openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64
|
|||||||
curl -o - https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst | tar --zstd -xvf -
|
curl -o - https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst | tar --zstd -xvf -
|
||||||
cd openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64
|
cd openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64
|
||||||
|
|
||||||
3) Install required libs
|
2) Install required libs
|
||||||
|
|
||||||
./scripts/feeds update base packages
|
./scripts/feeds update base packages
|
||||||
./scripts/feeds install libnetfilter-queue zlib libcap
|
./scripts/feeds install libnetfilter-queue zlib libcap
|
||||||
|
|
||||||
4) Prepare openwrt package definitions
|
3) Prepare openwrt package definitions
|
||||||
|
|
||||||
cp -R /opt/zapret/docs/compile/openwrt/. .
|
cp -R /opt/zapret/docs/compile/openwrt/. .
|
||||||
cp -R /opt/zapret/tpws package/zapret/tpws
|
cp -R /opt/zapret/tpws package/zapret/tpws
|
||||||
@ -32,26 +25,12 @@ cp -R /opt/zapret/mdig package/zapret/mdig
|
|||||||
cp -R /opt/zapret/ip2net package/zapret/ip2net
|
cp -R /opt/zapret/ip2net package/zapret/ip2net
|
||||||
rm -f package/zapret/tpws/tpws/tpws package/zapret/nfqws/nfq/nfqws package/zapret/mdig/mdig/mdig package/zapret/ip2net/ip2net/ip2net
|
rm -f package/zapret/tpws/tpws/tpws package/zapret/nfqws/nfq/nfqws package/zapret/mdig/mdig/mdig package/zapret/ip2net/ip2net/ip2net
|
||||||
|
|
||||||
5) Prepare .config
|
4) Compile
|
||||||
|
|
||||||
make defconfig
|
make package/{tpws,nfqws,mdig,ip2net}/compile
|
||||||
|
|
||||||
If you only need bins without packages comment 'CONFIG_AUTOREMOVE=y' line in .config
|
5) Get result
|
||||||
|
|
||||||
6) Compile
|
ls -l bin/packages/*/base
|
||||||
|
# take your ipk or apk from there
|
||||||
dynamic build : make package/{tpws,nfqws,mdig,ip2net}/compile
|
# zlib-dev is not required
|
||||||
static build : make CFLAGS=-static package/{tpws,nfqws,mdig,ip2net}/compile
|
|
||||||
|
|
||||||
7) Get result
|
|
||||||
|
|
||||||
executables only : build_dir/target/<progname>
|
|
||||||
ipk or apk packages : bin/packages/*/base
|
|
||||||
|
|
||||||
8) Installating to openwrt to use with zapret
|
|
||||||
|
|
||||||
zapret with or without binaries should be already installed in /opt/zapret.
|
|
||||||
Install ipk's or apk's with all compiled progs using opkg or apk.
|
|
||||||
Bins are placed to /opt/zapret/binaries/my.
|
|
||||||
Or copy binaries there manually and set chmod 755 to them.
|
|
||||||
Run install_bin.sh or install_easy.sh. They will use bins in 'my' folder.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user