openwrt/target/linux
Andreas Böhler dde510cf97 ath79: add support for KuWFi N650 CPE
The KuWFi N650 is a 5GHz outdoor wireless bridge based on QCA9563.

Specs
=====

CPU: QCA9563, 775MHz
RAM: 128MiB
Flash: 16MiB
Wireless: QCA9888 (5GHz only)
Ethernet: 2x GBit (via QCA8337), 48V passive PoE

Installation
============

From OEM firmware
-----------------

The OEM firmware has telnet enabled by default. If not, it can be enabled
from the firmware web interface. You need a TFTP server on your computer
and the OpenWrt factory image should be available as "n650factory.bin".
It is assumed that your computer has the IP 192.168.1.1 and the N650
192.168.1.20 (default IP address).

1. Connect via Telnet to the device and log in with the default credentials
   "admin:admin"
2. Exploit the limited interface by typing "ps & /bin/sh"
3. Press <ENTER> to start the shell
4. Enter the following commands:

$ cd /tmp
$ tftp -r n650factory.bin -g 192.168.1.1
$ cat << EOF > /tmp/openwrt.sh
#!/bin/sh

IMAGE_NAME="\$1"

if [ ! -e \${IMAGE_NAME} ]; then
  echo "Image file not found: \${IMAGE_NAME}"
  exit 1
fi

. /usr/sbin/common.sh

kill_remaining TERM
sleep 3
kill_remaining KILL

run_ramfs mtd write \${IMAGE_NAME} firmware
sleep 2
reboot -f
EOF

$ chmod +x /tmp/openwrt.sh
$ /tmp/openwrt.sh n650factory.bin

Once the device reboots, it should load OpenWrt.

From UART
---------

UART installation is possible since the serial header is already soldered
on. The pinout is GND - Tx - Rx - VCC from top to bottom (RJ45 ports are
at the bottom). Connect with 115200 8N1.

First, boot OpenWrt from TFTP. Enter the following commands in the U-Boot
shell, assuming your computer has the IP address 192.168.1.1 and a TFTP
server running where the initramfs image is provided as n650.bin:

  setenv ipaddr 192.168.1.20
  setenv serverip 192.168.1.1
  tftpboot 0x84000000 n650.bin
  bootm

Once booted, transfer -loader.bin and -sysupgrade.bin images to the device
at /tmp. Enter the following commands, replacing the filenames:

  mtd write /tmp/loader.bin loader
  sysupgrade /tmp/sysupgrade.bin

Reboot and OpenWrt should load from flash.

Back to Stock
-------------

Back to stock is only possible if you saved a partition backup before
installing OpenWrt. Assuming you have fullbackup.bin covering the whole
flash, you need to prepare the image as follows:

$ dd if=fullbackup.bin of=fwconcat0.bin bs=65536 skip=4 count=212
$ dd if=fullbackup.bin of=loader.bin bs=65536 skip=216 count=1
$ dd if=fullbackup.bin of=fwconcat1.bin bs=65536 skip=217 count=22
$ cat fwconcat0.bin fwconcat1.bin > firmware.bin

Transfer firmware.bin and loader.bin to the OpenWrt device. First, flash
loader.bin to mtd device loader, then force sysupgrade:

$ mtd write loader.bin loader
$ sysupgrade -F firmware.bin

The reason for the two-step process is the way the flash layout is designed
for OpenWrt in contrast to the OEM firmware partition.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/17089
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-30 18:52:41 +01:00
..
airoha airoha: an7581: sync patch with upstream version and tag them 2024-11-18 15:01:07 +01:00
apm821xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
archs38 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
armsr armsr: don't limit kmods to armsr armv8 subtarget 2024-10-29 00:07:55 +01:00
at91 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ath79 ath79: add support for KuWFi N650 CPE 2024-11-30 18:52:41 +01:00
bcm27xx kernel: bump 6.6 to 6.6.63 2024-11-23 14:06:17 +01:00
bcm47xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bcm53xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bcm4908 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bmips kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
d1 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
gemini kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
generic generic: backport support for KTD2026/7 rgb(w) led controller 2024-11-28 21:59:58 +01:00
imx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ipq40xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ipq806x ipq806x: tr4400v2: fix dtc warnings by deleting stock partitions 2024-11-19 13:44:27 +01:00
ixp4xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
kirkwood kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
lantiq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
layerscape kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
loongarch64 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
malta kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
mediatek mediatek: MERCUSYS MR90X v1: add OpenWrt U-Boot (UBI) layout 2024-11-30 18:36:05 +01:00
mpc85xx mpc85xx: p2020: add missing symbols 2024-11-19 19:52:45 +01:00
mvebu mvebu: devm for mutex_init 2024-11-23 17:19:56 +01:00
mxs mxs: run kernel_oldconfig 2024-11-23 16:47:53 +01:00
octeon kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
omap kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
pistachio kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
qoriq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
qualcommax qualcommax: ipq60xx: remove source-only flag 2024-11-25 10:26:33 +01:00
ramips ramips: move zyimage creation to include/image-commands.mk 2024-11-28 22:33:21 +01:00
realtek realtek: align kernel config with upstream 2024-11-16 18:02:18 +01:00
rockchip kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
sifiveu kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
siflower kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
starfive kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
stm32 stm32: Remove unnecessary kernel options 2024-11-24 22:51:14 +01:00
sunxi kernel: bump 6.6 to 6.6.61 2024-11-16 00:25:14 +01:00
tegra kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
uml
x86 x86: Deactivate kernel options with extra overhead 2024-11-24 20:03:59 +01:00
zynq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
Makefile linux: fix missing default packages in profiles.json 2024-11-17 19:29:06 +01:00