Skip to content

feat: add OpenWrt ipk packaging support for x86_64 and aarch64 - #288

Open
hashbk wants to merge 4 commits into
mainfrom
feat/openwrt-support
Open

feat: add OpenWrt ipk packaging support for x86_64 and aarch64#288
hashbk wants to merge 4 commits into
mainfrom
feat/openwrt-support

Conversation

@hashbk

@hashbk hashbk commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Add OpenWrt/ImmortalWrt deployment support by shipping prebuilt musl SEA binaries as .ipk packages for x86_64 and aarch64 soft routers, managed via procd.

Changes

  • scripts/build-openwrt-ipk.sh — assembles a .ipk (data + control archive via ar) from the SEA dist directory, with procd init script, default config, and wrapper.
  • openwrt/ — OpenWrt feed definition:
    • Makefile (binary package style: downloads prebuilt musl tarball from Releases; no Node.js compilation in buildroot)
    • files/rustdesk-console.init (procd init: respawn, env injection from config file)
    • files/rustdesk-console.env (default config, conffile)
    • README.md (install, config, feed integration docs)
  • .github/workflows/release.yml / nightly.yml — new musl-build matrix job: builds SEA in node:24-alpine (musl) for linux/amd64 and linux/arm64, packages .ipk, uploads tarball + ipk to the release.
  • README.md — OpenWrt deployment section.

Why musl needs a separate build

The existing linux-x64/linux-arm64 SEA artifacts are built on Ubuntu (glibc) and won't run on OpenWrt (musl). This PR builds SEA inside node:24-alpine to produce musl binaries; sqlite3 and sharp automatically pick up their linuxmusl prebuilds.

Notes

  • Backend API only; frontend is deployed separately (documented in openwrt/README.md).
  • sharp is retained (soft routers have sufficient resources).
  • ipk Depends: libc, libstdcpp, libgcc.
  • Supported targets: x86_64 and aarch64 musl only.

Close #287

Ship prebuilt musl SEA binaries (Node.js + sqlite3 + sharp) as .ipk
packages for OpenWrt/ImmortalWrt soft routers, managed via procd.

- Add scripts/build-openwrt-ipk.sh to assemble .ipk from SEA dist
- Add openwrt/ feed: Makefile (binary package), procd init script,
  default env config, and README
- Extend release.yml and nightly.yml with a musl-build job that builds
  SEA in node:24-alpine (musl) for linux/amd64 and linux/arm64, packages
  .ipk, and uploads tarball + ipk to the release
- Document OpenWrt deployment in README.md
hashbk and others added 3 commits August 22, 2026 22:27
Add build-openwrt-apk.sh to produce .apk packages (apk-tools 3.x /
OpenWrt 24.10+) using concatenated control + data tar.gz streams with
.PKGINFO metadata. Both .ipk and .apk are now built and uploaded in
release and nightly workflows.
The previous .apk builder produced concatenated tar.gz streams which is
the legacy v2 format. OpenWrt 24.10+ snapshots use apk-tools 3.x which
expects the new ADB binary format. Rewrite build-openwrt-apk.sh to use
'apk mkpkg' inside an alpine:edge container, and update the workflows
to invoke the script there. Also convert nightly version suffixes
(-nightly.) to apk-compatible _p suffixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

能否增加OpenWrt原生包的支持

2 participants