Skip to content

Commit ae0b8da

Browse files
committed
docs: add English README for project self and moduels
1 parent 756c910 commit ae0b8da

File tree

25 files changed

+1400
-0
lines changed

25 files changed

+1400
-0
lines changed

README.en.md

Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
<div align="center">
2+
3+
# OpenWrt Builder
4+
5+
Build your customized OpenWrt firmware with ease
6+
7+
GUI + CLI for a simpler, faster firmware build experience
8+
9+
[![Release](https://img.shields.io/github/v/release/EkkoG/OpenWrt?include_prereleases&style=flat-square&label=alpha)](https://github.com/EkkoG/OpenWrt/releases/tag/alpha)
10+
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
11+
[![Stars](https://img.shields.io/github/stars/EkkoG/OpenWrt?style=flat-square)](https://github.com/EkkoG/OpenWrt/stargazers)
12+
13+
</div>
14+
15+
---
16+
17+
## Features at a glance
18+
19+
- **Ready to use**: Based on official ImageBuilder, build in minutes
20+
- **Modular**: Built‑in common modules, supports custom module directory
21+
- **One‑click build**: GUI or script commands with real‑time logs and progress
22+
- **Containerized**: Docker‑isolated build environment; no toolchain setup required
23+
- **Reusable configs**: Multiple build presets; environment variables centrally managed
24+
25+
## UI Preview
26+
27+
<div align="center">
28+
<table>
29+
<tr>
30+
<td><img src="./assets/screentshot1.png" width="420" alt="Home" /></td>
31+
<td><img src="./assets/screentshot2.png" width="420" alt="Build" /></td>
32+
</tr>
33+
</table>
34+
</div>
35+
36+
---
37+
38+
## Download & Install (GUI)
39+
40+
- Download prebuilt installers from the releases page: [Releases](https://github.com/EkkoG/OpenWrt/releases)
41+
42+
| Platform | Package | Notes |
43+
|------|-----------|------|
44+
| macOS | `.dmg` | Apple Silicon choose `aarch64`, Intel choose `x86_64` |
45+
| Windows | `.msi` / `.exe` | Windows 10/11 |
46+
| Linux | `.deb` / `.AppImage` | Ubuntu 20.04+ and other major distros |
47+
48+
Alternatively build from source: see “Development & Build” below.
49+
50+
Note: Please install and start Docker before using the GUI to build firmware.
51+
52+
---
53+
54+
## Quick Start
55+
56+
### Method 1: Graphical UI (Recommended)
57+
58+
**Installation steps:**
59+
60+
0) Install and start Docker (required)
61+
- **Linux**: `sudo apt install docker.io` or `sudo pacman -S docker`
62+
- **macOS/Windows**: Install Docker Desktop
63+
64+
1) Download and install OpenWrt Builder
65+
- **Linux (.deb)**: `sudo dpkg -i openwrt-builder_*.deb`
66+
- **Linux (.AppImage)**: `chmod +x OpenWrt-Builder-*.AppImage`
67+
- **macOS**: Open the .dmg and drag to Applications
68+
- **Windows**: Run the .msi installer
69+
70+
2) Choose image (OpenWrt/ImmortalWrt) and target platform/version
71+
3) On the “Modules” page, select the modules you need
72+
4) Optional: Set output directory, mirror acceleration, etc.
73+
5) One‑click build in “Build Center” and wait for completion
74+
75+
Tip: The first build downloads more resources; subsequent builds are much faster.
76+
77+
### Method 2: Command Line (Advanced)
78+
79+
**Linux/macOS:**
80+
From repository root, use `run.sh`:
81+
82+
```bash
83+
# Help
84+
./run.sh --help
85+
86+
# Minimal example (ImmortalWrt Rockchip)
87+
./run.sh \
88+
--image=immortalwrt/imagebuilder:rockchip-armv8-openwrt-23.05.1 \
89+
--profile=friendlyarm_nanopi-r2s \
90+
--with-pull --rm-first --use-mirror
91+
```
92+
93+
**Windows:**
94+
From repository root, in PowerShell run `run.ps1`:
95+
96+
```powershell
97+
# Help
98+
.\run.ps1 -Help
99+
100+
# Minimal example (ImmortalWrt Rockchip)
101+
.\run.ps1 `
102+
-Image "immortalwrt/imagebuilder:rockchip-armv8-openwrt-23.05.1" `
103+
-Profile "friendlyarm_nanopi-r2s" `
104+
-WithPull -RmFirst -UseMirror
105+
```
106+
107+
**Common options:**
108+
109+
Linux/macOS (Bash):
110+
```bash
111+
--image=... ImageBuilder image (required)
112+
--profile=... Device profile (optional)
113+
--output=... Output directory (default: ./bin)
114+
--custom-modules=... Custom modules directory (default: ./custom_modules)
115+
--with-pull Pull image before build
116+
--rm-first Clean container before build
117+
--use-mirror Use mirror acceleration (enabled by default)
118+
--mirror=... Mirror domain, e.g. mirrors.pku.edu.cn
119+
```
120+
121+
Windows (PowerShell):
122+
```powershell
123+
-Image "..." ImageBuilder image (required)
124+
-Profile "..." Device profile (optional)
125+
-Output "..." Output directory (default: ./bin)
126+
-CustomModules "..." Custom modules directory (default: ./custom_modules)
127+
-WithPull Pull image before build
128+
-RmFirst Clean container before build
129+
-UseMirror Use mirror acceleration (enabled by default)
130+
-Mirror "..." Mirror domain, e.g. mirrors.pku.edu.cn
131+
```
132+
133+
Environment variables (`.env`) example:
134+
135+
```bash
136+
# Adjust relative to default module set
137+
MODULES="openclash lan pppoe -tools"
138+
139+
# Or fully override the default module set (higher priority)
140+
ENABLE_MODULES="argon base lan"
141+
142+
# System env vars are enabled by default; modules can reference variables defined in root .env
143+
144+
# Common ImageBuilder parameters
145+
CONFIG_TARGET_KERNEL_PARTSIZE=32
146+
CONFIG_TARGET_ROOTFS_PARTSIZE=256
147+
```
148+
149+
Default output directory is `./bin`; override with `--output`.
150+
151+
---
152+
153+
## Module System (Brief)
154+
155+
- **Default module set**: `add-all-device-to-lan argon base opkg-mirror prefer-ipv6-settings statistics system tools`
156+
- Two selection methods:
157+
- **ENABLE_MODULES**: Fully replace the enabled module list
158+
- **MODULES**: Add/remove on top of the default set (`-` prefix to exclude)
159+
- Module locations: supports both `modules/` (built‑in) and `custom_modules/` (user)
160+
- Directory structure:
161+
162+
```
163+
my-module/
164+
├─ packages # Dependency packages (space‑separated list or executable script)
165+
├─ files/ # Files to include in the firmware
166+
├─ post-files.sh # Optional: post‑processing after files copy
167+
├─ .env # Optional: module‑level variables
168+
└─ README.md # Optional: module description
169+
```
170+
171+
Advanced features:
172+
- Env var sharing: modules can reference variables from root `.env` (enabled by default)
173+
- Variable substitution: files under `files/etc/uci-defaults` support `$VARNAME` replacement
174+
- Conflict protection: build fails if multiple modules generate the same target path (to prevent overwrite)
175+
176+
---
177+
178+
## FAQ
179+
180+
**General:**
181+
- Slow build/limited bandwidth? Enable `--use-mirror` or specify `--mirror=mirrors.pku.edu.cn`
182+
- Docker not installed? Install Docker Desktop (macOS/Windows) or Docker Engine (Linux)
183+
- Where are outputs? Default `./bin` (change with `--output`)
184+
- GUI build fails/unresponsive? Ensure Docker is installed and running; running from source also requires Node.js 18+ and pnpm 8+. See “Development & Build”.
185+
186+
**Windows specific:**
187+
- PowerShell scripts won’t run? Execute `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`
188+
- Docker not found? Ensure Docker Desktop is installed and running; try restarting the terminal
189+
- Permission issues? Run PowerShell or Docker Desktop as Administrator
190+
- Non‑ASCII path issues? Prefer checking out the repo into an ASCII‑only path
191+
192+
**Linux specific:**
193+
- AppImage won’t start? `sudo apt install fuse` to install FUSE support
194+
- No Docker permission? Add your user to the docker group: `sudo usermod -aG docker $USER`, then re‑login
195+
- .deb installation failed? `sudo apt-get install -f` to fix dependencies
196+
- GUI won’t launch? Ensure required desktop and system libraries are installed
197+
198+
---
199+
200+
## Development & Build
201+
202+
Directory layout:
203+
204+
```
205+
.
206+
├─ build.sh # Actual build script inside container (cross‑platform)
207+
├─ run.sh # Linux/macOS build script (Docker Compose)
208+
├─ run.ps1 # Windows PowerShell build script
209+
├─ modules/ # Built‑in module library
210+
├─ custom_modules/ # Put your custom modules here
211+
├─ setup/ # Pre‑build setup scripts
212+
├─ tauri-app/ # GUI app (Tauri 2 + Vue 3)
213+
└─ LICENSE # MIT license
214+
```
215+
216+
**Run GUI from source and package:**
217+
218+
```bash
219+
cd tauri-app
220+
pnpm install
221+
222+
# Development (Tauri dev, fixed port 1420)
223+
pnpm tauri dev
224+
225+
# Production packaging (desktop installers)
226+
pnpm tauri build
227+
```
228+
229+
**Platform specific requirements:**
230+
231+
*Windows:*
232+
- Install Rust toolchain (with MSVC)
233+
- Install Visual Studio Build Tools or Visual Studio
234+
- Ensure PowerShell 5.1+ or PowerShell Core 7+
235+
236+
*Linux:*
237+
- Build tools: `sudo apt install build-essential`
238+
- GTK libs: `sudo apt install libgtk-3-dev libwebkit2gtk-4.1-dev`
239+
- Others: `sudo apt install libappindicator3-dev librsvg2-dev patchelf`
240+
241+
*macOS:*
242+
- Install Xcode Command Line Tools: `xcode-select --install`
243+
244+
Note: Packaging bundles root `build.sh`, `run.sh`, `run.ps1`, `setup/`, `modules/` as resources. Platform‑specific installers (.dmg/.msi/.deb/.AppImage) will be generated.
245+
246+
---
247+
248+
## Contributing
249+
250+
- **Bug reports**: [Open an Issue](https://github.com/EkkoG/OpenWrt/issues)
251+
- **Feature requests**: [Request feature](https://github.com/EkkoG/OpenWrt/issues/new)
252+
- **Code contributions**: [Submit a Pull Request](https://github.com/EkkoG/OpenWrt/pulls)
253+
- **Docs improvements**: Help improve README and Wiki
254+
- **Module sharing**: Share your custom modules
255+
256+
## Acknowledgements
257+
258+
<div align="center">
259+
260+
### Core
261+
[**OpenWrt**](https://openwrt.org/)[**ImmortalWrt**](http://immortalwrt.org/)[**Docker**](https://www.docker.com/)
262+
263+
### Networking
264+
[**OpenClash**](https://github.com/vernesong/OpenClash)[**dae**](https://github.com/daeuniverse/dae)[**Passwall**](https://github.com/xiaorouji/openwrt-passwall)
265+
266+
### Frameworks
267+
[**Tauri**](https://tauri.app/)[**Vue.js**](https://vuejs.org/)[**Vuetify**](https://vuetifyjs.com/)
268+
269+
</div>
270+
271+
## License
272+
273+
Released under the MIT License. See `LICENSE`.
274+
275+
---
276+
277+
<div align="center">
278+
279+
[![Star History Chart](https://api.star-history.com/svg?repos=EkkoG/OpenWrt&type=Date)](https://star-history.com/#EkkoG/OpenWrt&Date)
280+
281+
</div>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Add All Devices to LAN Bridge
2+
3+
## Overview
4+
5+
This module automatically adds all Ethernet devices (except the WAN device) to the LAN bridge.
6+
7+
## Features
8+
9+
- Auto‑detect all Ethernet interfaces
10+
- Exclude the WAN interface to avoid conflicts
11+
- Append remaining devices to LAN bridge ports
12+
- Restart networking to apply changes
13+
14+
## How it works
15+
16+
1. Determine the currently configured WAN device
17+
2. Enumerate system Ethernet devices (eth0, eth1, …)
18+
3. Exclude the WAN device from the list
19+
4. Clear existing bridge port configuration
20+
5. Add each remaining device to the LAN bridge
21+
6. Commit UCI and restart network services
22+
23+
## Files
24+
25+
- `files/etc/uci-defaults/99-add-all-device-to-lan` — Auto‑config script
26+
27+
## Scenarios
28+
29+
Useful when bridging multiple ports into LAN, for example:
30+
- Multi‑port router setups
31+
- Switch mode configuration
32+
- Expanding LAN port count

modules/argon/README.en.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Argon Theme
2+
3+
## Overview
4+
5+
This module installs the Argon theme to provide a modern look for the LuCI web interface on OpenWrt.
6+
7+
## Features
8+
9+
- Install `luci-theme-argon`
10+
- Better‑looking web interface
11+
- Improved UX and usability
12+
13+
## Component
14+
15+
- `luci-theme-argon` — Argon theme package
16+
17+
## Highlights
18+
19+
- Modern flat design
20+
- Responsive layout with mobile support
21+
- Pleasant color schemes
22+
- Polished UI elements
23+
- Good readability and usability
24+
25+
## Files
26+
27+
- `packages` — Theme package list
28+
29+
## Usage
30+
31+
After installation, select the Argon theme in LuCI: System → System → Language and Style.
32+
33+
## Compatibility
34+
35+
Works on OpenWrt builds with LuCI web UI.

modules/base/README.en.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Base Packages
2+
3+
## Overview
4+
5+
This module provides the base package set for OpenWrt, including the web UI, utilities, and essential system components.
6+
7+
## Features
8+
9+
- Install core system components and tools
10+
- Configure the LuCI web interface
11+
- Provide Simplified Chinese language support
12+
- Adjust package list based on OpenWrt version
13+
14+
## Packages
15+
16+
### Core
17+
- `zoneinfo-all` — Time zone data
18+
- `luci` — LuCI web interface
19+
- `luci-compat` — LuCI compatibility layer
20+
- `luci-lib-ipkg` — Package management library
21+
- `dnsmasq-full` — Full‑featured DNS/DHCP (replaces minimal dnsmasq)
22+
- `openssl-util` — OpenSSL utilities
23+
24+
### Chinese localization
25+
- `luci-i18n-base-zh-cn` — Base UI translation
26+
- `luci-i18n-firewall-zh-cn` — Firewall UI translation
27+
28+
### Version‑specific
29+
- OpenWrt 24.10 or snapshots: `luci-i18n-package-manager-zh-cn`
30+
- Other versions: `luci-i18n-opkg-zh-cn`
31+
32+
## Version detection
33+
34+
Environment variables:
35+
- `OPENWRT_VERSION` — OpenWrt version
36+
- `IS_SNAPSHOT_BUILD` — Whether this is a snapshot build
37+
38+
## Files
39+
40+
- `packages` — Script to generate package list dynamically
41+
42+
## Usage
43+
44+
Use as the foundational module for OpenWrt systems requiring a full web management interface.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Daed as Default
2+
3+
Autostarts on boot; only waits for the network on the first boot.

0 commit comments

Comments
 (0)