92 lines
2.8 KiB
Markdown
Executable File
92 lines
2.8 KiB
Markdown
Executable File
# OpenWRT Cross-Compilation Project
|
|
|
|
Cross-compilation environment for GL.iNet routers: **Flint1 (GL-AX1800)** and **Flint2 (GL-MT6000)**.
|
|
|
|
## Project Structure
|
|
|
|
### Router-Specific Directories
|
|
|
|
```
|
|
OpenWRT/
|
|
├── flint1-armv7/ # GL-AX1800 (ARMv7, 32-bit)
|
|
│ ├── sdk/ # ARMv7 cross-compilation toolchains
|
|
│ ├── src/ # Source code for compilation
|
|
│ └── build/ # Build scripts
|
|
│
|
|
├── flint2-aarch64/ # GL-MT6000 (ARMv8/aarch64, 64-bit)
|
|
│ ├── sdk/ # MediaTek OpenWrt SDKs
|
|
│ ├── src/ # Source code (symlinked)
|
|
│ └── build/ # Build scripts
|
|
│
|
|
├── binaries/ # Compiled binaries
|
|
│ ├── flint1/ # ARMv7 binaries
|
|
│ └── flint2/ # aarch64 binaries
|
|
│
|
|
├── packages/ # .ipk packages
|
|
│ ├── flint1/
|
|
│ ├── flint2/
|
|
│ └── common/
|
|
│
|
|
├── src/ # Shared source code
|
|
│ ├── btop/
|
|
│ └── mosh/
|
|
│
|
|
└── agent-notes/ # Research and documentation
|
|
```
|
|
|
|
### Shared Directories
|
|
|
|
- **`binaries/`** - Compiled binaries sorted by architecture
|
|
- **`packages/`** - OpenWrt `.ipk` packages
|
|
- **`src/`** - Original source code (shared reference)
|
|
- **`opkg-repo/`** - Package repository for deployment
|
|
- **`agent-notes/`** - Research, build results, SDK documentation
|
|
|
|
## Architecture Overview
|
|
|
|
| Router | Model | SoC | Architecture | Bits | OpenWrt Target |
|
|
|--------|-------|-----|--------------|------|----------------|
|
|
| **Flint1** | GL-AX1800 | Qualcomm IPQ6000 | ARMv7 rev 4 | 32-bit | ipq40xx |
|
|
| **Flint2** | GL-MT6000 | MediaTek MT7986A | ARMv8 rev 4 (aarch64) | 64-bit | mediatek-filogic |
|
|
|
|
**Note:** Different architectures require **separate binaries**.
|
|
|
|
## Quick Start
|
|
|
|
### Flint1 (ARMv7)
|
|
|
|
```bash
|
|
cd flint1-armv7/build
|
|
./download-armv7-toolchain.sh # First time only
|
|
./build-btop-armv7.sh
|
|
```
|
|
|
|
### Flint2 (aarch64)
|
|
|
|
Binaries already built and available in `binaries/flint2/`.
|
|
|
|
To rebuild:
|
|
```bash
|
|
cd flint2-aarch64/sdk/openwrt-sdk-mediatek-filogic_gcc-14.3.0_musl.Linux-x86_64/
|
|
./scripts/feeds update -a
|
|
make package/<name>/compile
|
|
```
|
|
|
|
## Documentation
|
|
|
|
- **Flint1 SDK Research:** `agent-notes/flint1-sdk-research.md`
|
|
- **Flint1 Build Results:** `agent-notes/glax1800-build-results.md`
|
|
- **Implementation Plan:** `.gemini/antigravity/brain/.../implementation_plan.md`
|
|
|
|
## Build Scripts
|
|
|
|
- `build-ipk.sh` - Create .ipk packages
|
|
- `build-verified-ipk.sh` - Build with verification
|
|
- `generate-index.sh` - Generate opkg repository index
|
|
- `upload-repo.sh` - Upload to repository server
|
|
|
|
## Active Toolchains
|
|
|
|
**Flint1:** musl.cc armv7l-linux-musleabihf (GCC 11.2.1)
|
|
**Flint2:** OpenWrt mediatek-filogic SDK (GCC 14.3.0)
|