update readme about pre-built images

gitlab-rpi
Jordan Sokolic 2020-08-28 15:28:38 +03:00
parent 3ea249b5ec
commit 9f57c80215
2 changed files with 29 additions and 19 deletions

View File

@ -2,7 +2,7 @@
Inspired by other projects that run `hostapd` in a Docker container. This goes one step further and boots a full network OS intended for embedded devices called [OpenWrt](https://openwrt.org/), so you can manage all aspects of your network from a user-friendly web UI.
For Raspberry Pi-specific build instructions, see [Building on Raspberry Pi](docs/rpi.md).
For Raspberry Pi-specific instructions, see [Building on Raspberry Pi](docs/rpi.md).
## Dependencies
@ -14,6 +14,7 @@ For Raspberry Pi-specific build instructions, see [Building on Raspberry Pi](doc
* dhcpcd
## Build
Pre-built images are available on Docker Hub at `oofnik/openwrt`. Alternatively, build the image yourself using the `make build` target:
```
$ make build
```

View File

@ -6,6 +6,32 @@ OpenWrt officially supports Raspberry Pi hardware if you want to run it as your
This has been tested on a Raspberry Pi Zero W running Raspbian Lite, but should work for other versions too. Just make sure you download the right image for your Pi version (refer to the notes in [build-rpi.sh](./build-rpi.sh)).
**UPDATE 2020-08-28**: Pre-built images are now available on Docker Hub! Refer to the table below to choose the right image. Set the `BUILD_TAG` parameter in openwrt.conf accordingly:
| RPi version | image:tag |
|------------------------|---------------------------|
| Pi A / B / B+ / Zero W | `oofnik/openwrt:rpi-zero` |
| Pi 2 B (all) | `oofnik/openwrt:rpi2` |
| Pi 3 B / B+ | `oofnik/openwrt:rpi3` |
| Pi 4 / 4B | `oofnik/openwrt:rpi4` |
---
## Build
You can build the OpenWRT docker image on the Pi itself, or on your x86 PC with `qemu-user` and `binfmt-support` installed.
First download and extract the OpenWRT factory image for your Pi. Refer to the [OpenWrt Table of Hardware](https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi) to choose the right image. Then run the `make` target as root (need access to mount loop filesystems).
The variable `RPI_SOURCE_IMG` can be specified in openwrt.conf or on the command line:
```
$ wget https://downloads.openwrt.org/releases/19.07.3/targets/brcm2708/bcm2708/openwrt-19.07.3-brcm2708-bcm2708-rpi-ext4-factory.img.gz -O image.img.gz
$ gzip -d image.img.gz
$ sudo make build-rpi
```
If you built the image on your PC, send it to your Raspberry Pi over SSH (`$BUILD_TAG` is a config variable):
```
$ docker save $BUILD_TAG | ssh <your_raspberry_pi_host> docker load
```
## IPv6
By default Raspbian does not load the kernel module for IPv6 `iptables` on boot.
@ -15,20 +41,3 @@ Run `sudo modprobe ip6_tables` to load it immediately.
To persist on reboot, run
$ echo 'ip6_tables' | sudo tee /etc/modules-load.d/ip6-tables.conf
---
## Build
You can build the OpenWRT docker image on the Pi itself, or on your x86 PC with `qemu-arm` installed.
First download and extract the OpenWRT factory image for your Pi. Refer to the [OpenWrt Table of Hardware](https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi) to choose the right image. Then run the `make` target.
The variable `RPI_SOURCE_IMG` can be specified in openwrt.conf or on the command line:
```
$ wget https://downloads.openwrt.org/releases/19.07.2/targets/brcm2708/bcm2708/openwrt-19.07.2-brcm2708-bcm2708-rpi-ext4-factory.img.gz
$ gzip -d openwrt-*.img.gz
$ make build-rpi RPI_SOURCE_IMG=openwrt-19.07.2-brcm2708-bcm2708-rpi-ext4-factory.img
```
If you built the image on your PC, send it to your Raspberry Pi (`$BUILD_TAG` is a config variable):
```
$ docker save $BUILD_TAG | ssh <your_raspberry_pi_host> docker load