-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add ci for creating GitHub Release
Signed-off-by: David Bauer <mail@david-bauer.net>
- Loading branch information
1 parent
adffb20
commit 069e75b
Showing
3 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Asus Filogic Factory Image | ||
|
||
## Supported devices | ||
|
||
- TUF-AX4200 | ||
|
||
|
||
## Instructions | ||
|
||
1. Download the Factory-Initramfs image. | ||
Place it into a web-server directory root as openwrt.bin. | ||
|
||
``` | ||
$ mkdir -p /tmp/openwrt-webroot | ||
$ cp <openwrt-factory-initramfs> /tmp/openwrt-webroot/openwrt.bin | ||
$ python3 -m http.server -d /tmp/openwrt-webroot 8080 | ||
``` | ||
|
||
2. Open the router configuration page. Complete the first-time setup wizard. | ||
Enable SSH Access (with Password-Login) on the Router. | ||
Find this Setting at Administration --> System | ||
|
||
SSH-Port 22 | ||
|
||
3. Connect to the device using ssh | ||
``` | ||
$ ssh admin@192.168.50.1 | ||
``` | ||
|
||
4. Modify the `/etc/hosts` file using `vi` on the device. | ||
Add an entry to the bottom of the file that resolves to the computer serving the factory-initramfs image. | ||
Name the DNS name `openwrtimage.lan` | ||
|
||
5. Transfer the OpenWrt factory-initramfs to the device by downloading it from the http server using wget | ||
``` | ||
wget -O /tmp/openwrt.bin http://openwrtimage.lan:8080/openwrt.bin | ||
``` | ||
|
||
7. Erase the linux-partition | ||
|
||
``` | ||
$ mtd-erase -d linux | ||
``` | ||
|
||
|
||
8. Write OpenWrt to the `linux` partition | ||
|
||
``` | ||
$ mtd-write -i /tmp/openwrt.bin -d linux | ||
``` | ||
|
||
9. Power-Cycle your router. | ||
|
||
10. Transfer the OpenWrt sysupgrade image to the router using `scp`. | ||
|
||
``` | ||
$ scp -O /path/to/<openwrt-sysupgrade.bin> root@192.168.1.1:/tmp | ||
``` | ||
|
||
11. Install OpenWrt persistently using `sysupgrade`. | ||
|
||
``` | ||
$ sysupgrade -n /tmp/<openwrt-sysupgrade.bin> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CONFIG_TARGET_mediatek=y | ||
CONFIG_TARGET_mediatek_filogic=y | ||
CONFIG_TARGET_MULTI_PROFILE=y | ||
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_asus_tuf-ax4200=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build and release images | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build images | ||
runs-on: ubuntu-latest | ||
|
||
container: ghcr.io/openwrt/tools:openwrt-23.05 | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
steps: | ||
- name: Checkout master directory | ||
uses: actions/checkout@v3 | ||
with: | ||
path: openwrt | ||
|
||
- name: Restore config | ||
working-directory: openwrt | ||
run: cp .github/image.config .config | ||
|
||
- name: Fix permission | ||
run: chown -R buildbot:buildbot openwrt | ||
|
||
- name: Run make defconfig | ||
shell: su buildbot -c "sh -e {0}" | ||
working-directory: openwrt | ||
run: make defconfig | ||
|
||
- name: Build everything | ||
shell: su buildbot -c "sh -e {0}" | ||
working-directory: openwrt | ||
run: make -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-output | ||
path: openwrt/bin/targets/mediatek/filogic | ||
|
||
|
||
release: | ||
name: Create Release | ||
needs: build | ||
if: github.ref_type == 'tag' | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
packages: read | ||
|
||
steps: | ||
- name: Checkout master directory | ||
uses: actions/checkout@v3 | ||
with: | ||
path: openwrt | ||
|
||
- name: Download build output | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-output | ||
path: build-output | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: ${{ github.workspace }}/openwrt/.github/image-readme.md | ||
files: | | ||
build-output/openwrt-*-initramfs-kernel.bin |