Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipq806x: Add support for Xiaomi Mi Router HD (R3D)
Xiaomi R3D is a 2.4/5 GHz band 11ac router, based on IPQ8064. Specification: * SoC: Qualcomm IPQ8064 * RAM: 512MB DDR3 * STOR: 256MB NAND (Macronix MX30UF2G18AC-TI) * ETH: 1x WAN 10/100/1000, 3x LAN 10/100/1000 * WiFi: Qualcomm QCA9984 (5GHz, 4T4R, n/ac) * WiFi: Qualcomm QCA9980 (2.4GHz, 4T4R, b/g/n) * USB: 1x 3.0 * SATA: 1x SATA 3.1 (only for internal HDD 3.5") * BTN: Power, Reset * LEDS: Status(Green/Blue/Red) * UART: present as 4-pads on the PCB (3.3V, 115200-8-N-1) MAC addresses as verified by stock firmware: | Interface | MAC | ART | Format | |-------------+-------------------+---------+--------| | WAN (label) | xx:xx:xx:xx:xx:B2 | 0x0 | binary | | LAN | xx:xx:xx:xx:xx:B3 | 0x6 | binary | | WiFi 2g | xx:xx:xx:xx:xx:B4 | 0x1006 | binary | | WiFi 5g | xx:xx:xx:xx:xx:B5 | 0x5006 | binary | Partition layout and boot: Stock Xiaomi firmware has the MTD split into (among others) - kernel0 (@0x0800000) - kernel1 (@0x0c00000) - rootfs0 (@0x1000000) - rootfs1 (@0x3800000) - overlay (@0x6000000) Xiaomi uboot expects to find kernels at 0x800000 & 0xc00000 referred to as system 1 & system 2 respectively. a kernel is considered suitable for handing control over if its linux magic number exists & uImage CRC are correct. If either of those conditions fail, a matching sys'n'_fail flag is set in uboot env & a restart performed in the hope that the alternate kernel is okay. If neither kernel checksums ok and both are marked failed, system 2 is booted anyway. Note uboot's tftp flash install writes the transferred image to both kernel partitions. Methods for getting SSH access: 1) https://github.com/acecilia/OpenWRTInvasion 2) https://github.com/openwrt-xiaomi/xmir-patcher Installation: The installation file for OpenWRT is a *squashfs-factory.bin file that contains the kernel and a ubi partition. This is flashed as follows: nvram flag_boot_success=1 nvram flag_boot_rootfs=1 nvram flag_last_success=1 nvram flag_try_sys1_failed=0 nvram flag_try_sys2_failed=0 nvram commit dd if=factory.bin bs=1M count=4 | mtd write - kernel0 dd if=factory.bin bs=1M count=4 | mtd write - kernel1 dd if=factory.bin bs=1M skip=4 | mtd write - rootfs0 reboot Reverting to stock: Download facinstall.ipk from link https://github.com/openwrt-xiaomi/facinstall/releases/latest and install its. Install miwifi_r3d_firmware_XXXXX.bin image via LuCI interface. Signed-off-by: Oleg S <[email protected]>
- Loading branch information