The repo ships with devices/xiaomi_ax3600/ as the reference. Adding a second device is a directory copy plus a one-line edit.
-
Pick an id. Use the OpenWrt board id (
make menuconfig-> Target Profile shows it). Examples:xiaomi_ax9000,dynalink_dl-wrx36,redmi_ax6. Lowercase, underscores. -
Generate the
.configfor that device.git clone --branch <upstream-branch> https://github.com/<upstream-repo> openwrt cd openwrt make menuconfig # Set Target Profile to your device, save, exit. ./scripts/diffconfig.sh > ../my-device.config
diffconfig.shproduces a minimal.configcontaining only the deltas from the default — that's exactly what this template wants. -
Drop it in.
mkdir -p devices/<id>/files mv ../my-device.config devices/<id>/config
-
(Optional) Add a rootfs overlay. Anything under
devices/<id>/files/is copied to the image root. Common entries:etc/uci-defaults/99-my-defaults— runs once on first bootetc/ssh/sshd_config— getschmod 0600automaticallyetc/rc.local— boot-time hook
Files shared by all devices go in
common/files/instead. -
Switch the active device.
# builder.yml device: <id>
-
Push. The build runs immediately on push (and every 2 hours on cron).
You can sanity-check the config-loading without a full compile:
yq -V # should print yq v4.x
bash scripts/load-config.sh # prints resolved config, exits 0If load-config.sh fails because devices/<id>/config is missing, you got the id wrong.
- Don't check in the full upstream
.config(~3000 lines). Usediffconfig.shoutput. It survives upstream churn far better. - Do comment package additions in
devices/<id>/configso future-you knows why a package is pinned. - The artifact path in
build.ymlisopenwrt/bin/targets/qualcommax/ipq807x— adjust if your device targets a different SoC family.