mirror of
https://github.com/openwrt/openwrt.git
synced 2026-11-27 19:00:39 +04:00
Specification:
- SoC Qualcomm IPQ5018, dual-core Cortex-A53
- RAM 1 GiB
- Flash 8 MiB SPI-NOR (Macronix MX25U6435F)
4 GiB eMMC
- WLAN 2.4 GHz 2x2 802.11ax, IPQ5018 (SoC)
5 GHz 4x4 802.11ax, Qualcomm QCN9074 (PCIe)
- Ethernet 1x 10/100/1000 Mbps, IPQ5018 internal GE PHY
- Buttons 1x reset
- LEDs 1x white, 1x blue (GPIO)
- UART J8 next to the reset button, pin order (starting at the
button): GND, TX, RX, VCC; 1.8 V logic, VCC pin 3.3 V;
115200 8N1
- Power 802.3at PoE
eMMC layout (GPT):
p1 0:HLOS 64 MiB kernel0
p2 0:HLOS_1 64 MiB kernel1
p3 bs 1 KiB boot select
p4 cfg 1 MiB config
p5 log 2 GiB
"bs" selects the boot slot:
00 00 00 00 2b e8 4d a3 slot 0 (0:HLOS)
ff ff ff ff 2b e8 4d a3 slot 1 (0:HLOS_1)
Tested with stock firmware BZ.6.6.65 and BZ.6.8.2, both with U-Boot
v1.0.25.152.
The default boot command "bootubnt" verifies images against the RSA key
"uap_ipq50xx" in the U-Boot control FDT. OpenWrt is therefore started
with "bootm" after removing /signature from the control FDT.
Flash instructions:
1. SSH into the stock firmware (ubnt:ubnt by default) via its DHCP
assigned address, or the default 192.168.1.20
2. Copy the sysupgrade image over:
scp -O openwrt-qualcommax-ipq50xx-ubnt_unifi-6-pro-squashfs-sysupgrade.bin \
ubnt@<ap>:/tmp/openwrt.bin
3. Check the partition names:
grep PARTNAME /sys/block/mmcblk0/mmcblk0p2/uevent # 0:HLOS_1
grep PARTNAME /sys/block/mmcblk0/mmcblk0p3/uevent # bs
grep PARTNAME /sys/block/mmcblk0/mmcblk0p5/uevent # log
4. Unlock the partitions and unmount the log partition:
[ -e /proc/ubnthal/.uf ] && echo 5edfacbf > /proc/ubnthal/.uf
until umount /tmp/log 2>/dev/null; do
kill $(lsof | grep "\t/tmp/log/" | cut -f1)
done
5. Write kernel and rootfs:
tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-pro/kernel -O | \
dd of=/dev/mmcblk0p2
tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-pro/root -O | \
dd of=/dev/mmcblk0p5
6. Set up the U-Boot environment:
a='fdt addr ${fdtcontroladdr}; fdt rm /signature;'
b='mmc read 0x50000000 0x20022 0x20000; bootm 0x50000000#config@a650'
fw_setenv boot_openwrt "$a $b"
a='mmc read 0x44000000 0x40022 1; if itest.l *0x44000000 == 0xffffffff;'
b='then run boot_openwrt; else bootubnt; fi'
fw_setenv bootcmd_real "$a $b"
7. Boot from slot 1:
printf '\xff\xff\xff\xff\x2b\xe8\x4d\xa3' | dd of=/dev/mmcblk0p3
reboot
OpenWrt should now be reachable at its DHCP assigned address.
Reverting to stock firmware from OpenWrt:
printf '\x00\x00\x00\x00\x2b\xe8\x4d\xa3' > /dev/mmcblk0p3
fw_setenv bootcmd_real bootubnt
fw_setenv boot_openwrt
reboot
The stock firmware reformats the log partition as ext4 on its first
boot, which removes the OpenWrt rootfs.
Notes:
- Ubiquiti filed two FCC IDs, SWX-U6PRO (2020) and SWX-U6PROR (2021, which
adds Bluetooth LE). My unit (PCBA 113-00963-48) has GPIO-driven
white/blue LEDs and an unpopulated footprint for an LED MCU, so a
revision with an MCU-driven LED (like the U6-LR v1) may exist.
MAC addresses:
LAN : EEPROM 0x0 (label)
2.4GHz: label + 1
5GHz : label + 2
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Daniel Plank <tyrolyean@escpe.net>
Link: https://github.com/openwrt/openwrt/pull/26562
Signed-off-by: Robert Marko <robimarko@gmail.com>