|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +# 🐧 ArchLinuxARM Docker Builder |
| 4 | + |
| 5 | +[](https://docs.docker.com/build/buildx/) |
| 6 | +[](https://archlinuxarm.org/) |
| 7 | +[](./LICENSE) |
| 8 | +[](https://github.com/devDucks/ArchLinuxARM/actions) |
| 9 | +[](https://ghcr.io/devDucks/archlinuxarm) |
| 10 | + |
| 11 | +**Reproducible ArchLinuxARM builds for ARM boards and emulators — right from Docker.** |
| 12 | + |
| 13 | +</div> |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## 📦 Overview |
| 18 | + |
| 19 | +This project automates building and exporting **ArchLinuxARM** root filesystems and Raspberry Pi images using **multi-stage Docker builds**. |
| 20 | + |
| 21 | +You can build: |
| 22 | +- 🧱 Minimal ArchLinuxARM base rootfs |
| 23 | +- ⚙️ Full system with kernel, SSH, and systemd networking |
| 24 | +- 🌌 **AstroArch** — a KDE-based astrophotography environment (KStars, INDI, PHD2, etc.) |
| 25 | +- 💾 Ready-to-flash `.img` files for Raspberry Pi or for generic aarch64 devices |
| 26 | + |
| 27 | +All builds are reproducible and run **entirely on x86_64** using QEMU emulation. |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## 🚀 Quick Start |
| 32 | + |
| 33 | +### Clone the repository |
| 34 | +```bash |
| 35 | +git clone https://github.com/devDucks/ArchLinuxARM.git |
| 36 | +cd ArchLinuxARM |
| 37 | +``` |
| 38 | + |
| 39 | +### Enable QEMU for cross-architecture builds |
| 40 | +```bash |
| 41 | +docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
| 42 | +``` |
| 43 | + |
| 44 | +### Build the minimal ArchLinuxARM image |
| 45 | +```bash |
| 46 | +make build-minimal |
| 47 | +``` |
| 48 | + |
| 49 | +### Build the full ArchLinuxARM (with kernel, SSH, networking) |
| 50 | +```bash |
| 51 | +make build-aarch64 |
| 52 | +``` |
| 53 | + |
| 54 | +### Build AstroArch (KDE + astrophotography tools) |
| 55 | +```bash |
| 56 | +make build-astroarch |
| 57 | +``` |
| 58 | + |
| 59 | +Each build exports its rootfs tarball (`/archlinuxarm-aarch64-rootfs.tar` or `/astroarch-rootfs.tar`). |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## 🧰 Make Targets |
| 64 | + |
| 65 | +| Target | Description | |
| 66 | +|--------|--------------| |
| 67 | +| `build-minimal` | Minimal base ArchLinuxARM rootfs (`Dockerfile.base`). | |
| 68 | +| `build-aarch64` | Full ArchLinuxARM with kernel, SSH, locale, DHCP. | |
| 69 | +| `build-aarch64-rootfs` | Exports the aarch64 rootfs tarball. | |
| 70 | +| `build-astroarch` | AstroArch desktop with KDE + INDI stack. | |
| 71 | +| `build-astroarch-rootfs` | Exports the AstroArch rootfs tarball. | |
| 72 | +| `prepare-rpi-img` | Creates a bootable Raspberry Pi image (`archarm-rpi-aarch64.img`). | |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## 🧱 Image Structure |
| 77 | + |
| 78 | +### 🔹 `dockerfiles/Dockerfile.base` |
| 79 | +- Based on **Alpine** |
| 80 | +- Installs `pacman`, `arch-install-scripts` |
| 81 | +- Bootstraps `ArchLinuxARM aarch64` rootfs |
| 82 | +- Exports `/archlinuxarm-aarch64-rootfs.tar` |
| 83 | + |
| 84 | +### 🔹 `dockerfiles/Dockerfile.aarch64` |
| 85 | +- Based on `archlinuxarm-basic` |
| 86 | +- Sets mirrors and initializes pacman keys |
| 87 | +- Installs: `glibc`, `linux-aarch64`, `nano`, `openssh` |
| 88 | +- Configures `systemd-networkd` (DHCP) |
| 89 | +- Enables SSH (`root/alarm`) |
| 90 | +- Fixes locale (`locale.gen` rebuild) |
| 91 | + |
| 92 | +### 🔹 `dockerfiles/Dockerfile.astroarch` |
| 93 | +- Adds **AstroMatto** repository |
| 94 | +- Tweaks pacman (`ILoveCandy`, disable timeout) |
| 95 | +- Installs: |
| 96 | + - KDE Plasma desktop |
| 97 | + - KStars + Ekos |
| 98 | + - INDI drivers |
| 99 | + - PHD2 guiding |
| 100 | + - VNC tools (tigervnc) |
| 101 | + - XRDP to access the environment via RDP |
| 102 | +- Exports `/astroarch-rootfs.tar` |
| 103 | + |
| 104 | +### 🔹 `scripts/build_img.sh` |
| 105 | +- Creates a bootable `.img` (`archarm-rpi-aarch64.img`) |
| 106 | +- Partitions disk → `/boot` (FAT32), `/` (ext4) |
| 107 | +- Copies rootfs |
| 108 | +- Applies UUIDs, mount points, fsck, etc. |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## 💾 Build an AstroArch Raspberry Pi Image |
| 113 | + |
| 114 | +```bash |
| 115 | +make prepare-rpi-img |
| 116 | +``` |
| 117 | + |
| 118 | +The result is: |
| 119 | +``` |
| 120 | +archarm-rpi-aarch64.img |
| 121 | +``` |
| 122 | + |
| 123 | +You can now boot the `.img` just created using qemu, run `./scripts/start_qemu.sh` |
| 124 | +you can then login into the system make your changes and `shutdown now`. |
| 125 | +This will leave you with a ready to be flashed image wich includes your custom changes |
| 126 | + |
| 127 | +Flash it to an SD card: |
| 128 | +```bash |
| 129 | +sudo dd if=archarm-rpi-aarch64.img of=/dev/sdX bs=4M status=progress |
| 130 | +sync |
| 131 | +``` |
| 132 | + |
| 133 | +Then insert the SD card into your Pi and boot — SSH will be ready via DHCP. |
| 134 | + |
| 135 | +--- |
| 136 | + |
| 137 | +## 🔐 Default Credentials |
| 138 | + |
| 139 | +| Image | User | Password | Notes | |
| 140 | +|-------|------|----------|-------| |
| 141 | +| ArchLinuxARM | root | alarm | SSH enabled by default | |
| 142 | +|--------------|------|-------|------------------------| |
| 143 | +| AstroArch | astronaut | astro | SSH enabled by default | |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +--- |
| 150 | + |
| 151 | +## 🌍 Mirror List |
| 152 | + |
| 153 | +Mirrors used during build (`/etc/pacman.d/mirrorlist`): |
| 154 | + |
| 155 | +``` |
| 156 | +Server = http://dk.mirror.archlinuxarm.org/$arch/$repo |
| 157 | +Server = http://de3.mirror.archlinuxarm.org/$arch/$repo |
| 158 | +Server = http://eu.mirror.archlinuxarm.org/$arch/$repo |
| 159 | +Server = http://fl.us.mirror.archlinuxarm.org/$arch/$repo |
| 160 | +``` |
| 161 | + |
| 162 | +You can modify mirrors in Dockerfiles or via build args. |
| 163 | + |
| 164 | +--- |
| 165 | + |
| 166 | +## 🪐 AstroArch at a Glance |
| 167 | + |
| 168 | +AstroArch is a preconfigured ArchLinuxARM environment for **astrophotography setups**. |
| 169 | + |
| 170 | +Includes: |
| 171 | +- 🪩 KDE Plasma Desktop |
| 172 | +- 🌠 KStars + Ekos |
| 173 | +- 🔭 INDI drivers |
| 174 | +- 📷 PHD2 guiding |
| 175 | +- 🖥️ Remote access via VNC or RDP |
| 176 | + |
| 177 | +Built for **Raspberry Pi 5** observatories and **headless rigs**. |
| 178 | + |
| 179 | +--- |
| 180 | + |
| 181 | +## 📁 Project Layout |
| 182 | + |
| 183 | +``` |
| 184 | +├── dockerfiles/ |
| 185 | +│ ├── Dockerfile.base |
| 186 | +│ ├── Dockerfile.aarch64 |
| 187 | +│ └── Dockerfile.astroarch |
| 188 | +├── scripts/ |
| 189 | +│ └── build_img.sh |
| 190 | +├── Makefile |
| 191 | +└── README.md |
| 192 | +``` |
| 193 | + |
| 194 | +--- |
| 195 | + |
| 196 | +## 🧾 License & Credits |
| 197 | + |
| 198 | +- **License:** [MIT](./LICENSE) |
| 199 | +- **Maintainers:** [devDucks](https://github.com/devDucks) 🦆 |
| 200 | +- **Based on:** [ArchLinuxARM](https://archlinuxarm.org/) |
| 201 | +- **Inspired by:** [AstroArch Linux Distro](https://github.com/devDucks/AstroArch) |
| 202 | + |
| 203 | +--- |
| 204 | + |
| 205 | +<div align="center"> |
| 206 | + |
| 207 | +> _“Build once, flash anywhere — the Arch way.”_ |
| 208 | +
|
| 209 | +✨ Made with ❤️ by **devDucks** |
| 210 | + |
| 211 | +</div> |
0 commit comments