summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2020-05-23 14:32:25 +0200
committerGitHub <noreply@github.com>2020-05-23 14:32:25 +0200
commit41b5ce787a80c91a4e17870be11f9cfb61791f5d (patch)
tree4fd0dcacc29868b594f57479585af51e8f35e873
parente9b8a189b2323c337e11da317646cc601f963cf8 (diff)
docs(readme): OpenWRT installation instructions
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9b1a80c..d230235 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,18 @@ sudo dnf copr enable atim/bandwhich -y && sudo dnf install bandwhich
brew install bandwhich
```
+#### OpenWRT
+
+To install `bandwhich` on OpenWRT, you'll need to compile a binary that would fit its processor architecture. This might mean you would have to cross compile if, for example, you're working on an `x86_64` and the OpenWRT is installed on an `arm7`.
+Here is an example of cross compiling in this situation:
+
+- Check the processor architecture of your router by using `uname -m`
+- Clone the bandwhich repository `git clone https://github.com/imsnif/bandwhich`
+- Install `cross` using `cargo install cross`
+- build the `bandwhich` package using `cross build --target armv7-unknown-linux-musleabihf`
+- Copy the binary files from `target/armv7-unknown-linux-musleabihf/debug/bandwhich` to the router using `scp` by running `scp bandwhich root@192.168.1.1:~/` (here, 192.168.1.1 would be the IP address of your router).
+- Finally enter the router using ssh and run the binary directly with `./bandwhich`
+
#### Other Linux flavours
`bandwhich` can be installed using the Rust package manager, cargo. If it's not in your distro repositories or the available version is too old, you can install it via [rustup](https://rustup.rs/). You can find additional installation instructions [here](https://doc.rust-lang.org/book/ch01-01-installation.html).