openwrt/target/linux
Andreas Böhler 28bde50c1d 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

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
Link: https://github.com/openwrt/openwrt/pull/17247
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit dde510cf97)
2024-12-15 01:46:49 +01:00
..
airoha kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
apm821xx kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
archs38 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00: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-28 18:47:54 +00:00
ath79 ath79: add support for KuWFi N650 CPE 2024-12-15 01:46:49 +01:00
bcm27xx kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
bcm47xx kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
bcm53xx kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
bcm4908 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
bmips kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
d1 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
gemini kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
generic kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
imx kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
ipq40xx kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
ipq806x kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
ixp4xx kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
kirkwood kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
lantiq kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
layerscape kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
loongarch64 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
malta kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
mediatek kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
mpc85xx kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
mvebu mvebu: devm for mutex_init 2024-11-28 18:48:57 +00:00
mxs mxs: run kernel_oldconfig 2024-11-28 18:48:55 +00:00
octeon kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
omap kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
pistachio kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
qoriq kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
qualcommax qualcommax: ipq807x: add Netgear DEVICE_VARS 2024-12-08 09:59:16 +01:00
ramips kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
realtek realtek: align kernel config with upstream 2024-11-28 18:47:31 +00:00
rockchip kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
sifiveu kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
siflower kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
starfive kernel: bump 6.6 to 6.6.64 2024-12-15 01:43:39 +01:00
stm32 stm32: Remove unnecessary kernel options 2024-11-28 18:49:23 +00:00
sunxi kernel: bump 6.6 to 6.6.61 2024-11-24 22:46:21 +01:00
tegra kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
uml uml: fix glibc-static check with GCC14 2024-06-22 22:06:06 +02:00
x86 x86: Deactivate kernel options with extra overhead 2024-11-28 18:49:17 +00:00
zynq kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
Makefile linux: add dtb makefile target to targets list 2024-02-08 23:04:55 +01:00