openwrt-mirror/target/linux
DENG Qingfang a30abb1b6b ipq40xx: add support for MobiPromo CM520-79F
MobiPromo CM520-79F is an AC1300 dual band router based on IPQ4019

Specification:

SoC/Wireless: QCA IPQ4019
RAM: 512MiB
Flash: 128MiB SLC NAND
Ethernet PHY: QCA8075
Ethernet ports: 1x WAN, 2x LAN
LEDs: 7 LEDs
      2 (USB, CAN) are GPIO
      other 5 (2.4G, 5G, LAN1, LAN2, WAN) are connected to a shift register
Button: Reset

Flash instruction:
Disassemble the router, connect UART pins like this:
 GND TX    RX
  [x x . . x .]
  [. . . . . .]

(QCA8075 and IPQ4019 below)
Baud-rate: 115200

Set up TFTP server: IP 192.168.1.188/24
Power on the router and interrupt the booting with UART console
env backup (in case you want to go back to stock and need it there):
	printenv
	(Copy the output to somewhere save)
Set bootenv:
	setenv set_ubi 'set mtdids nand0=nand0; set mtdparts mtdparts=nand0:0x7480000@0xb80000(fs); ubi part fs'
	setenv bootkernel 'ubi read 0x84000000 kernel; bootm 0x84000000#config@1'
	setenv cm520_boot 'run set_ubi; run bootkernel'
	setenv bootcmd 'run cm520_boot'
	setenv bootargs
	saveenv
Boot initramfs from TFTP:
	tftpboot openwrt-ipq40xx-generic-mobipromo_cm520-79f-initramfs-fit-zImage.itb
	bootm
After initramfs image is booted, backup rootfs partition in case of reverting to stock image
	cat /dev/mtd12 > /tmp/mtd12.bin
Then fetch it via SCP

Upload nand-factory.ubi to /tmp via SCP, then run
	mtd erase rootfs
	mtd write /tmp/*nand-factory.ubi rootfs
	reboot

To revert to stock image, restore default bootenv in uboot UART console
	setenv bootcmd 'bootipq'
	printenv
use the saved dump you did back when you installed OpenWrt to verify that
there are no other differences from back in the day.
	saveenv
upload the backed up mtd12.bin and run
	tftpboot mtd12.bin
	nand erase 0xb80000 0x7480000
	nand write 0x84000000 0xb80000 0x7480000
The BOOTCONFIG may have been configured to boot from alternate partition (rootfs_1) instead
In case of this, set it back to rootfs:
	cd /tmp
	cat /dev/mtd7 > mtd7.bin
	echo -ne '\x0b' | dd of=mtd7.bin conv=notrunc bs=1 count=1 seek=4
	for i in 28 48 68 108; do
		dd if=/dev/zero of=mtd7.bin conv=notrunc bs=1 count=1 seek=$i
	done
	mtd write mtd7.bin BOOTCONFIG
	mtd write mtd7.bin BOOTCONFIG1

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[renamed volume to ubi to support autoboot,
as per David Lam's test in PR#2432]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-04-10 15:22:26 +02:00
..
apm821xx apm821xx: use the real default HZ value from upstream 2020-04-10 15:20:30 +02:00
ar71xx ar71xx: Fix gigabit switch support for Mikrotik RB951G-2HnD 2020-03-28 13:03:02 +01:00
arc770 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
archs38 archs38: switch to kernel 5.4 by default 2020-03-29 16:23:57 +02:00
armvirt kernel: move TEO governor to generic config 2020-03-17 00:51:48 +01:00
at91 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
ath25 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
ath79 ath79: add support for Comfast CF-WR752AC v1 2020-04-09 01:06:37 +02:00
bcm27xx kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
bcm47xx treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
bcm53xx bcm53xx: add support for Luxul FullMAC WiFi devices 2020-04-07 15:27:52 +02:00
bcm63xx treewide: gather DEVICE_VARS into one place 2020-03-21 19:55:12 +01:00
cns3xxx treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
gemini gemini: Refine package list 2020-04-09 00:12:46 +02:00
generic kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
imx6 imx6: bootscript: use partition UUID for rootfs if possible 2020-04-03 12:17:45 +02:00
ipq40xx ipq40xx: add support for MobiPromo CM520-79F 2020-04-10 15:22:26 +02:00
ipq806x ipq806x: switch to 5.4 kernel 2020-04-09 00:12:46 +02:00
ipq807x treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
kirkwood kirkwood: fix DTS partitions for Pogoplug E02 2020-03-27 17:12:46 +01:00
lantiq kernel: bump 5.4 to 5.4.28 2020-03-28 13:03:02 +01:00
layerscape treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
malta malta: Remove kernel 4.14 support 2020-03-12 09:28:23 +01:00
mediatek kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
mpc85xx treewide: Don't diverge from upstream default HZ settings on 4.19 2020-03-29 17:27:54 +01:00
mvebu mvebu: cortexa9: correct cpu subtype 2020-03-28 22:58:36 +01:00
mxs kernel: bump 5.4 to 5.4.28 2020-03-28 13:03:02 +01:00
octeon treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
octeontx octeontx: switch to kernel 5.4 2020-04-03 12:17:45 +02:00
omap treewide: gather DEVICE_VARS into one place 2020-03-21 19:55:12 +01:00
oxnas kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
pistachio treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
ramips ramips: mt7620: fix missplaced line in 01_leds 2020-04-10 10:00:25 +02:00
rb532 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
samsung treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
sunxi kernel: bump 5.4 to 5.4.28 2020-03-28 13:03:02 +01:00
tegra tegra: correct cpu subtype 2020-03-28 22:58:36 +01:00
uml treewide: Remove self from MAINTAINER entries 2019-12-23 13:18:04 -08:00
x86 x86: add genisoimage and xorrisofs as alternatives to mkisofs 2020-04-09 12:51:10 +02:00
zynq zynq: switch to kernel 5.4 2020-03-17 00:51:48 +01:00
Makefile