summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--openwrt/build.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/openwrt/build.sh b/openwrt/build.sh
new file mode 100644
index 0000000000..70ce2e6344
--- /dev/null
+++ b/openwrt/build.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+set -x
+
+rustup target add x86_64-unknown-linux-musl
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+export LIBMNL_LIB_DIR="$SCRIPT_DIR/../dist-assets/binaries/x86_64-unknown-linux-musl"
+export LIBNFTNL_LIB_DIR="$SCRIPT_DIR/../dist-assets/binaries/x86_64-unknown-linux-musl"
+
+RUSTFLAGS="-C target-feature=+crt-static" cargo b --target x86_64-unknown-linux-musl --features boringtun