Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

Commit 02da3c2

Browse files
committed
Updated README.md for Buildah and Podman, added way more info
* Removed older more esoteric information in README (simplified it). * Update links with examples in entry.sh that aren't dead for x86_64 release * Updated installation instructions with what to do after the image is built to get it on an OpenWRT device * Added a docs/ with configuration for `openeap_proxy`
1 parent d002f00 commit 02da3c2

3 files changed

Lines changed: 114 additions & 74 deletions

File tree

README.md

Lines changed: 47 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,59 @@
11
# OpenWrt Feed
2+
3+
Build `goeap_proxy` or other projects for a specific install on OpenWRT.
4+
5+
26
## Packages
37

48
* [`goeap_proxy`](https://github.com/pyther/goeap_proxy) (Go: Proxy EAP packets between network interfaces)
59
* [`eap_proxy`](https://github.com/jaysoffian/eap_proxy) (Python: Proxy EAP packets between network interfaces)
610
* [`ookla-speedtest`](https://www.speedtest.net/apps/cli) (Ookla's Speedtest CLI)
711

812
## Building Packages
13+
14+
### With Podman and Buildah
15+
16+
Most people will want this method, for simplicity. Just install `buildah` and
17+
`podman` on your distribution. Everything else will run rootless. The included
18+
DockerFile should make the build process simple and remove any enivorment
19+
specific build issues.
20+
21+
1. Clone: `git clone https://github.com/pyther/openwrt-feed.git`
22+
2. Change Dir: `cd openwrt-feed`
23+
3. Update `SDK_URL`, and `SDK_SUM` in `entry.sh`, you can get these paths by going to the
24+
* [OpenWRT Release page](https://downloads.openwrt.org/releases), select the
25+
one you want, likely the newest at the bottom. **It must match the version
26+
on your router.**
27+
* Select your build.
28+
* Select your chipset.
29+
* Scroll down to "Supplementary Files": the link under "Filename" is your `SDK_URL`; the "sha256sum" is your `SDK_SUM`.
30+
4. Update UID/GID in the Dockerfile to match that of your current user (`id`)
31+
5. Build image, note the image created won't actually have the SDK in it. Just the environment to put the SDK.
32+
```shell
33+
buildah bud -t openwrt-sdk:latest .
34+
```
35+
6. Download the SDK and build package: replace `goeap_proxy` with the name of the package you want to build
36+
```shell
37+
podman run --rm -it -v "${PWD}:/src" openwrt-sdk:latest goeap_proxy
38+
```
39+
7. Built packages can be found in `./build/*/bin/packages/*/pyther`, or with `find`,
40+
```shell
41+
# See what packages were built
42+
ls ./build/*/bin/packages/*/pyther
43+
44+
# Find them by their full path
45+
find . -name '*.ipk' -path '*/pyther/*'
46+
```
47+
8. After you have the packages built you can either,
48+
* Upload and install directly to LuCI (web interface)
49+
* Log into LuCI
50+
* Click on "System" tab, select "Software" from the drop down
51+
* Click "Upload Package"
52+
* Copy the package to the router and install on the CLI with `opkg install ./package.ipk`
53+
954
### Openwrt Build Procedure
10-
This is a standard OpenWrt Feed, therefore packages should be built in the same way as another OpenWrt package.
55+
56+
While more complex, this is a standard OpenWrt Feed, therefore packages can be built in the same way as another OpenWrt package.
1157

1258
1. Add to feeds.conf: `src-git pyther https://github.com/pyther/openwrt-feed.git`
1359
2. Update the feed: `./scripts/feeds update pyther`
@@ -18,66 +64,3 @@ Resources
1864
- https://openwrt.org/docs/guide-developer/using_the_sdk
1965
- https://openwrt.org/docs/guide-developer/single.package
2066
- https://openwrt.org/docs/guide-developer/quickstart-build-images
21-
22-
### With Docker
23-
The included DockerFile should make the build process simple and remove any enivorment specific build issues.
24-
25-
1. Clone: `git clone https://github.com/pyther/openwrt-feed.git`
26-
2. Change Dir: `cd openwrt-feed`
27-
3. Update `SDK_URL`, and `SDK_SUM` in `entry.sh`
28-
4. Update UID/GID in the Dockerfile to match that of your current user (`id`)
29-
4. Build Docker Image: `sudo docker build . -t openwrt-sdk:latest`
30-
5. Create Build Directory: `mkdir ./build`
31-
6. Build Package: `sudo docker run --rm -it --volume $(pwd):/src openwrt-sdk:latest goeap_proxy`
32-
- replace `goeap_proxy` with the name of the package you want to build
33-
7. Built packages can be found in `./build/openwrt-sdk-x86-64_gcc-8.4.0_musl.Linux-x86_64/bin/packages/x86_64/pyther`
34-
35-
Troubleshooting
36-
37-
To get an interactive shell in container to troubleshoot build problems run
38-
```
39-
$ sudo docker run -it --volume $(pwd):/src --entrypoint /bin/sh openwrt-sdk:latest
40-
$ sh -x /tmp/entry.sh # no args setups the build envirnoment
41-
$ sh -x /tmp/entry.sh goeap_proxy # builds goeap_proxy package
42-
```
43-
44-
45-
### With Helper Script
46-
The included entry.sh will automate the process of downloading, extracting, and
47-
building the package. You can either run the script or use it as guide for
48-
manual command execution.
49-
50-
1. Clone: `git clone https://github.com/pyther/openwrt-feed.git`
51-
2. Change Dir: `cd openwrt-feed`
52-
3. Update 'BUILD_DIR`, `SDK_URL`, and `SDK_SUM` in `entry.sh`
53-
4. sh entry.sh PKG_NAME
54-
55-
## Building OpenWrt Image
56-
57-
1. Download the OpenWrt Image Builder: [Instructions: Using the Image Builder](https://openwrt.org/docs/guide-user/additional-software/imagebuilder)
58-
```
59-
$ wget https://downloads.openwrt.org/releases/18.06.4/targets/x86/64/openwrt-imagebuilder-18.06.4-x86-64.Linux-x86_64.tar.xz
60-
```
61-
62-
2. Extract Image Builder and enter directory
63-
```
64-
$ tar xf openwrt-imagebuilder-18.06.4-x86-64.Linux-x86_64.tar.xz
65-
$ cd openwrt-imagebuilder-18.06.4-x86-64.Linux-x86_64
66-
```
67-
68-
3. Copy built package into `./packages`
69-
```
70-
$ cp ~/build/openwrt-sdk-18.06.4-x86-64_gcc-7.3.0_musl.Linux-x86_64/bin/packages/x86_64/pyther/goeap_proxy_0.200502.3-1_x86_64.ipk ./packages
71-
```
72-
73-
4. Build Image
74-
```
75-
$ make image PACKAGES="goeap_proxy"
76-
```
77-
78-
Note: other platforms (non-x86) you mant to to specify `PROFILE=XXX`
79-
80-
List of profiles can be obtained with
81-
```
82-
$ make info
83-
```

docs/goeap_configuration.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
`goeap_proxy` Configuration
2+
====
3+
4+
For an example of configuration of `goeap_proxy`, this works on WRT1900. This
5+
will allow you to connect to an ONT directly by forwarding EAP to an unrooted
6+
(or rooted) network provided gateway.
7+
8+
`/etc/config/network`
9+
----
10+
11+
Here is an example of the relevant parts of `/etc/config/network`
12+
13+
```text
14+
config interface 'lan'
15+
option device 'br-lan'
16+
option proto 'static'
17+
option ipaddr '192.168.1.1'
18+
option netmask '255.255.255.0'
19+
option ip6assign '60'
20+
21+
config device
22+
option name 'wan'
23+
option macaddr 'YOUR_ONT_MAC'
24+
25+
config interface 'wan'
26+
option device 'wan'
27+
option force_link '1'
28+
option proto 'dhcp'
29+
option peerdns '0'
30+
list dns '1.1.1.1'
31+
list dns '1.0.0.1'
32+
33+
config interface 'ont'
34+
option proto 'none'
35+
option device 'wan'
36+
37+
config interface 'rgw'
38+
option proto 'none'
39+
option device 'lan1'
40+
41+
config interface 'wan6'
42+
option device 'wan'
43+
option proto 'dhcpv6'
44+
```
45+
46+
`/etc/config/goeap_proxy`
47+
48+
----
49+
And this matches with this part of `/etc/config/goeap_proxy`
50+
51+
```text
52+
config goeap_proxy 'global'
53+
option wan 'ont'
54+
option router 'rgw'
55+
option ignore_logoff 0
56+
```
57+
58+
After updating both of these files run
59+
60+
```shell
61+
/etc/init.d/network restart
62+
/etc/init.d/goeap_proxy restart
63+
```

entry.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22
BUILD_DIR='build'
33
mkdir "$BUILD_DIR"
44

5-
# UPDATE ME! x86_64 snapshot
6-
# Platform List: https://openwrt.org/docs/platforms/start
7-
# Release Page: https://downloads.openwrt.org/releases/19.07.3/targets/
8-
SDK_URL="https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-8.4.0_musl.Linux-x86_64.tar.xz"
9-
SDK_SUM="6a70cd1e6249125b0c669679fba9302e40cffae004f63b3a5117b2fff6d42049"
10-
11-
#SDK_URL="https://downloads.openwrt.org/releases/19.07.3/targets/x86/64/openwrt-sdk-19.07.3-x86-64_gcc-7.5.0_musl.Linux-x86_64.tar.xz"
12-
#SDK_SUM="aeafd4f8405ac2a226c3aa1b5b98e1994a541cdca2f2fe2d0b8a1696a73cf8d9"
13-
#SDK_URL="https://downloads.openwrt.org/releases/19.07.3/targets/brcm2708/bcm2710/openwrt-sdk-19.07.3-brcm2708-bcm2710_gcc-7.5.0_musl.Linux-x86_64.tar.xz"
14-
#SDK_SUM="31edcbb9a1a9500040d1baef84cea639561d97ed2a9808bef2b109014755c813"
5+
# UPDATE ME! x86_64 release
6+
# Release Page: https://downloads.openwrt.org/releases/
7+
SDK_URL=https://archive.openwrt.org/releases/22.03.2/targets/x86/64/openwrt-sdk-22.03.2-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz
8+
SDK_SUM=d5718b743004f6b16996c439f35833c89e1a38b056c599b2917f22b24dc467f8
159

1610
SDK_FILE=$(basename $SDK_URL)
1711

0 commit comments

Comments
 (0)