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
12581 . Add to feeds.conf: ` src-git pyther https://github.com/pyther/openwrt-feed.git `
13592 . 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- ```
0 commit comments