immortalwrt/target/linux
Marco von Rosenberg f84a9f7dc0 ath79: add support for Huawei AP6010DN
Huawei AP6010DN is a dual-band, dual-radio 802.11a/b/g/n 2x2 MIMO
enterprise access point with one Gigabit Ethernet port and PoE
support.

Hardware highlights:
- CPU: AR9344 SoC at 480MHz
- RAM: 128MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: AR9344-internal radio
- Wi-Fi 5GHz: AR9580 PCIe WLAN SoC
- Ethernet: 10/100/1000 Mbps Ethernet through Atheros AR8035 PHY
- PoE: yes
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: CAT706SVI (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - radio0 (Wi-Fi 2.4GHz) = label MAC + 1
    - radio1 (Wi-Fi 5GHz) = label MAC + 2

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script "run ramboot".
   Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile openwrt-ath79-generic-huawei_ap6010dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap6010dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP6X10XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap6010dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues:
- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.
- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the AHB_CLK/2 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
Link: https://github.com/openwrt/openwrt/pull/15941
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-21 16:51:52 +02:00
..
airoha airoha: drop kernel 6.1 support 2024-06-05 09:34:06 +02:00
apm821xx apm821xx: drop 6.1 kernel support files 2024-06-17 12:58:41 +02:00
archs38 archs38: remove 5.15 support 2024-03-29 09:58:45 +01:00
armsr kernel: bump 6.1 to 6.1.97 2024-07-08 00:01:30 +02:00
at91 at91: 5.15: remove old config and patch files 2024-04-28 17:50:37 +02:00
ath79 ath79: add support for Huawei AP6010DN 2024-07-21 16:51:52 +02:00
bcm27xx kernel: bump 6.6 to 6.6.41 2024-07-19 16:53:24 +02:00
bcm47xx bcm47xx: drop 6.1 support 2024-07-04 19:32:50 +02:00
bcm53xx kernel: bump 6.1 to 6.1.95 2024-06-23 16:33:41 +02:00
bcm4908 bcm4908: set kernel 6.6 as a testing version 2024-04-27 12:14:00 +02:00
bmips kernel: bump 6.6 to 6.6.36 2024-07-04 22:07:10 +02:00
d1 d1: drop 6.1 support 2024-05-29 17:56:28 +02:00
gemini kernel: bump 6.6 to 6.6.33 and adjust subarches 2024-06-15 22:44:06 +02:00
generic kernel: bump 6.6 to 6.6.41 2024-07-19 16:53:24 +02:00
imx imx: 6.6: add upstream patches for imx8m{m,n,p} venice 2024-06-22 16:29:39 +02:00
ipq40xx kernel: bump 6.6 to 6.6.41 2024-07-19 16:53:24 +02:00
ipq806x ipq806x: 6.6: enable at803x driver 2024-06-27 17:11:40 +02:00
ixp4xx ixp4xx: Add back support for D-Link DSM G600 A 2024-05-25 09:17:19 +02:00
kirkwood treewide: gpio to gpios 2024-06-17 12:57:06 +02:00
lantiq lantiq: fix checkpatch warnings in etop driver 2024-07-21 14:07:26 +02:00
layerscape treewide: refresh patches 2024-06-24 09:46:19 +02:00
loongarch64 kernel: bump 6.6 to 6.6.33 and adjust subarches 2024-06-15 22:44:06 +02:00
malta malta: enable VM targets again 2024-06-30 22:00:03 +02:00
mediatek mediatek: add ABT ASR3000 support 2024-07-21 16:13:06 +02:00
mpc85xx mpc85xx: fix label-mac-address for Enterasys WS-AP3710i 2024-06-16 14:02:19 +02:00
mvebu mvebu: rb5009: wire SFP led by default 2024-07-12 09:51:46 +02:00
mxs mxs: drop 6.1 support 2024-04-25 14:33:22 +02:00
octeon octeon: convert to new LED color/function format where possible 2024-02-07 14:48:41 +01:00
omap omap: re-enable target 2024-07-17 23:27:50 +02:00
pistachio pistachio: Fix setting mtd name 2024-07-01 00:46:16 +02:00
qoriq qoriq: use 6.1 by default and drop 5.15 2024-06-21 20:27:53 +02:00
qualcommax qualcommax: ipq807x: add Asus RT-AX89X BX revision 2024-07-09 12:33:17 +02:00
ramips ramips: mt7620: remove kmod-switch-rtl8366-smi from package list 2024-07-21 14:57:03 +02:00
realtek realtek: Trap LLDP packets to the CPU 2024-05-10 16:03:51 +02:00
rockchip rockchip: stop "heartbeat" LED for Radxa CM3I(E25) 2024-07-12 09:49:20 +02:00
sifiveu sifiveu: drop 6.1 support 2024-04-30 11:02:48 +02:00
starfive kernel: bump 6.1 to 6.1.96 2024-07-04 22:02:47 +02:00
sunxi treewide: gpio to gpios 2024-06-17 12:57:06 +02:00
tegra tegra: promote kernel 6.6 as default 2024-07-13 14:29:16 +02:00
uml uml: fix glibc-static check with GCC14 2024-06-22 22:06:06 +02:00
x86 kernel: bump 6.6 to 6.6.33 and adjust subarches 2024-06-15 22:44:06 +02:00
zynq zynq: 5.15: remove files 2024-05-01 10:26:41 +02:00
Makefile linux: add dtb makefile target to targets list 2024-02-08 23:04:55 +01:00