diff --git a/README.md b/README.md index b8b3c21..0562c2f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [ZeroTier One](https://www.zerotier.com) is a programm to create a global provider-independent virtual private cloud. This project offers OpenWrt packages for ZeroTier. -## Installing prebuild package +## Installing package Download the [prebuild package](https://github.com/mwarning/zerotier-openwrt/releases) and copy it onto your OpenWrt installation, preferably into the /tmp folder. Then install the ipk package file: @@ -41,7 +41,9 @@ cd openwrt Now you can insert the zerotier package using a package feed or add the package manually. -### Using a package feed +### Add package by feed + +A feed is the standard way packages are made available to the OpenWrt build system. Put this line in your feeds list file (e.g. feeds.conf.default) ``` @@ -71,7 +73,6 @@ Now continue with the building packages section. Configure packages: ``` -make defconfig make menuconfig ``` @@ -89,3 +90,34 @@ The images and all *.ipk packages are now inside the bin/ folder, including the You can install the ZeroTier .ipk on the target device using "opkg install \". For details please check the OpenWrt documentation. + +#### Build bulk packages + +For a release, it is useful the build packages at a bulk for multiple targets: + +``` +#!/bin/sh + +targets=' + CONFIG_TARGET_arm64=y + CONFIG_TARGET_ath25=y +' + +for target in $targets; do + echo "$target" > .config + echo "CONFIG_PACKAGE_zerotier=y" >> .config + + # Debug output + echo "Build: $target" + + # Build toolchain and package + make defconfig + make tools/install + make toolchain/install + make package/zerotier/{clean,compile} V=s + + # Free space + rm -rf build_dir/target-* + rm -rf build_dir/toolchain-* +done +```