1
0
Fork 0
maxwell/docs/BUILD.md

176 lines
3.1 KiB
Markdown
Raw Normal View History

2021-07-27 15:46:40 -06:00
# HOWTO Build Maxwell
This documents how to build the Maxwell meshing software
with OpenWRT.
Base system is Debian Bullseye (11/testing) on ppc64le architecture.
Should also work fine on x86_64.
# Build thang
Do.
OpenWRT build system:
* https://openwrt.org/docs/guide-developer/build-system/start
## Install Dependencies
Dependencies for other distros are listed here:
* https://openwrt.org/docs/guide-developer/build-system/install-buildsystem#examp
Get current:
```
apt update
```
Upstream command suggests for Debian:
```
apt install build-essential ccache ecj fastjar file g++ gawk \
gettext git java-propose-classpath libelf-dev libncurses5-dev \
libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \
python3-distutils python3-setuptools python3-dev rsync subversion swig time \
xsltproc zlib1g-dev
```
2021-07-27 16:16:26 -06:00
Full docs list more dependencies for full list, that work with Debian Bullseye.
Takes over 6 gigs on root filesystem
2021-07-27 15:46:40 -06:00
```
apt install \
asciidoc \
bash \
binutils \
bzip2 \
flex \
git-core \
g++ \
gcc \
util-linux \
gawk \
help2man \
intltool \
libelf-dev \
zlib1g-dev \
make \
libncurses5-dev \
libssl-dev \
patch \
perl-modules \
python2-dev \
python3-dev \
unzip \
wget \
gettext \
xsltproc \
zlib1g-dev \
libboost-dev \
libxml-parser-perl \
libusb-dev \
bin86 \
bcc \
sharutils
```
2021-07-27 16:16:26 -06:00
2021-07-27 16:26:37 -06:00
Maybe want to use `ccache` to save on rebuilds:
```
apt install ccache
```
Add to your `~/.bashrc`:
```
PATH=/usr/lib/ccache:$PATH
```
Then log out and back in and run `echo $PATH` to make sure it is there.
Run `ccache -s` during build to see cache hit rate.
2021-07-27 16:16:26 -06:00
## Get Source
Clone OpenWRT sources, around ~300 megs:
```
git clone https://git.openwrt.org/openwrt/openwrt.git
```
Add Maxwell source code, around ~5 megs, to `openwrt` directory:
```
cd openwrt
git clone https://github.com/drandyhaas/haasmesh.git
```
## Configure Build
2021-07-27 16:41:07 -06:00
If you've done other builds, it is good to clean up first, maybe:
```
make clean
```
2021-07-27 16:16:26 -06:00
There are a variety of units the setup script is compatible with:
* luma
* Maxwell Indoor 3-Band: ea8300
* Maxwell Outdoor 2-Band: ew72
* c7v2
* c7v5
* jetstream
* redmi
2021-07-27 16:38:04 -06:00
You will need to check out the correct git branch or commit depending
on your radio.
To get the stock version `OpenWrt 19.07.4, r11208-ce6496d796` of the Maxwell Indoor 3-Band EA8300:
```
git checkout ce6496d796
```
To get the stock version `OpenWrt SNAPSHOT, r14229-b52b4afa15` of the Maxwell Outdoor 2-Band EW-72:
```
git checkout b52b4afa15
```
TODO: Add more versions, newer releases.
2021-07-27 16:41:07 -06:00
2021-07-27 16:16:26 -06:00
To build, run the build script with one of these options.
```
haasmesh/script/setupnodebuild.sh [luma|ea8300|ew72|c7v2|c7v5|jetstream|redmi]
```
For example, to configure the build system for the Maxwell Outdoor 2-Band, run:
```
haasmesh/script/setupnodebuild.sh ew72
```
The configure script should run in ~1 second.
Once it is configured, run the menuconfig:
```
make menuconfig
```
Hit `<TAB>` to get to `EXIT`, then `<ENTER>` to select `Yes` to save the configuration.
## Build Source
2021-07-27 16:56:25 -06:00
Now, actually build it. Takes over an hour or two, depending on hardware.
2021-07-27 16:16:26 -06:00
```
2021-07-27 16:56:25 -06:00
make
2021-07-27 16:16:26 -06:00
```
2021-07-27 16:56:25 -06:00