difos/target/linux
Davide Fioravanti 7c91144ae6 ramips: add CUDY WR1000 support
Cudy WR1200 is an AC1200 AP with 3-port FE and 2 non-detachable antennas

Specifications:

MT7628 (580 MHz)
64 MB of RAM (DDR2)
8 MB of FLASH
2T2R 2.4 GHz (MT7628)
2T2R 5 GHz (MT7612E)
3x 10/100 Mbps Ethernet (2 LAN + 1 WAN)
2x external, non-detachable antennas (5dbi)
UART header on PCB (57600 8n1)
7x LED, 2x button

Known issues:
The Power LED is always ON, probably because it is connected
directly to power.

Flash instructions
------------------
Load the ...-factory.bin image via the stock web interface.

Openwrt upgrade instructions
----------------------------
Use the ...-sysupgrade.bin image for future upgrades.

Revert to stock FW
------------------
Warning! This tutorial will work only with the following OEM FW:
  WR1000_EU_92.122.2.4987.201806261618.bin
  WR1000_US_92.122.2.4987.201806261609.bin
If in the future these firmwares will not be available anymore,
you have to find the new XOR key.

1) Download the original FW from the Cudy website.

   (For example WR1000_EU_92.122.2.4987.201806261618.bin)

2) Remove the header.

   dd if="WR1000_EU_92.122.2.4987.201806261618.bin" of="WR1000_EU_92.122.2.4987.201806261618.bin.mod" skip=8 bs=64

3) XOR the new file with the region key.

   FOR EU: 7B76741E67594351555042461D625F4545514B1B03050208000603020803000D
   FOR US: 7B76741E675943555D5442461D625F454555431F03050208000603060007010C

   You can use OpenWrt's tools/firmware-utils/src/xorimage.c tool for this:

   xorimage -i WR1000..bin.mod -o stock-firmware.bin -x -p 7B767..

   Or, you can use this tool (CHANGE THE XOR KEY ACCORDINGLY!):
   https://gchq.github.io/CyberChef/#recipe=XOR(%7B'option':'Hex','string':''%7D,'',false)

4) Check the resulting decrypted image.

   Check if bytes from 0x20 to 0x3f are:
   4C 69 6E 75 78 20 4B 65 72 6E 65 6C 20 49 6D 61 67 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00

   Alternatively, you can use u-boot's tool dumpimage tool to check
   if the decryption was successful. It should look like:

   # dumpimage -l stock-firmware.bin
   Image Name:   Linux Kernel Image
   Created:      Tue Jun 26 10:24:54 2018
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    4406635 Bytes = 4303.35 KiB = 4.20 MiB
   Load Address: 80000000
   Entry Point:  8000c150

5) Flash it via forced firmware upgrade and don't "Keep Settings"

   CLI: sysupgrade -F -n stock-firmware.bin

   LuCI: make sure to click on the "Keep settings" checkbox
         to disable it. You'll need to do this !TWICE! because
         on the first try, LuCI will refuse the image and reset
	 the "Keep settings" to enable. However a new
         "Force upgrade" checkbox will appear as well.
         Make sure to do this very carefully!

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[added wifi compatible, spiffed-up the returned to stock instructions]
2019-05-31 10:36:36 +02:00
..
apm821xx apm821xx: wndr4700: interrupt-driven gpio-keys 2019-05-31 10:30:03 +02:00
ar7 kernel: bump 4.9 to 4.9.153 2019-01-28 18:17:32 +01:00
ar71xx ar71xx: wr940 v4/v6: correct lan interface mac address 2019-05-21 14:53:45 +02:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
at91 at91:renaming subtraget legacy to sam9x 2019-05-30 12:12:57 +02:00
ath25 kernel: bump 4.14 to 4.14.79 2018-11-05 16:00:00 +01:00
ath79 ath79: ecb1750: additional dts fixes 2019-05-27 22:44:08 +02:00
bcm53xx build: add a config option for enabling a testing version of the target kernel 2019-05-11 11:37:10 +02:00
brcm47xx build: add a config option for enabling a testing version of the target kernel 2019-05-11 11:37:10 +02:00
brcm63xx brcm63xx: fixup broken patch after kernel bump 2019-05-14 13:15:11 +02:00
brcm2708 kernel: bump 4.14 to 4.14.118 2019-05-13 19:17:41 +02:00
cns3xxx kernel: bump 4.19 to 4.19.42 2019-05-13 19:17:41 +02:00
gemini gemini: Activate Realtek and vitesse DSA driver again 2019-05-30 12:12:37 +02:00
generic at91: Update kernel to version 4.14 2019-05-30 12:12:37 +02:00
imx6 imx6: apalis: fix config survival after sysupgrade -n 2019-05-20 21:19:48 +02:00
ipq40xx ipq40xx: Add support for Linksys EA8300 (Dallas) 2019-05-18 13:43:54 +02:00
ipq806x kernel: bump 4.14 to 4.14.120 2019-05-21 09:45:15 +02:00
ixp4xx kernel: bump 4.9 to 4.9.160 2019-02-25 17:33:16 +01:00
kirkwood mtd: base-files: Unify dual-firmware devices (Linksys) 2019-05-18 13:43:51 +02:00
lantiq lantiq: BTHOMEHUBV5A: don't power off with restart button 2019-05-30 11:55:50 +02:00
layerscape kernel: bump 4.14 to 4.14.120 2019-05-21 09:45:15 +02:00
malta malta: Deactivate MIPS O32 and N32 support 2019-05-14 21:50:42 +02:00
mediatek kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
mpc85xx build: add a config option for enabling a testing version of the target kernel 2019-05-11 11:37:10 +02:00
mvebu kernel: bump 4.14 to 4.14.120 2019-05-21 09:45:15 +02:00
mxs mxs: disable unused serial drivers 2019-03-11 19:35:43 +01:00
octeon octeon: Deactivate MIPS O32 and N32 support 2019-05-14 21:50:42 +02:00
octeontx kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
omap kernel: Deactivate CONFIG_BINFMT_MISC 2019-05-11 17:15:41 +02:00
orion treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
oxnas kernel: bump 4.14 to 4.14.120 2019-05-21 09:45:15 +02:00
pistachio kernel: bump 4.14 to 4.14.91 2019-01-07 17:09:06 +01:00
ramips ramips: add CUDY WR1000 support 2019-05-31 10:36:36 +02:00
rb532 kernel: bump 4.14 to 4.14.86 2018-12-10 11:48:44 +01:00
samsung kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM 2019-05-11 17:15:41 +02:00
sunxi kernel: bump 4.14 to 4.14.120 2019-05-21 09:45:15 +02:00
tegra tegra: add vendor string to device name 2019-05-15 13:34:23 +02:00
uml kernel: Deactivate CONFIG_BINFMT_MISC 2019-05-11 17:15:41 +02:00
x86 Revert "base-files: add console to inittab" 2019-05-25 08:13:20 +02:00
zynq zynq: make title consistent for all devices 2019-05-17 21:41:43 +02:00
Makefile