1
0
Fork 0
forked from mirror/openwrt
openwrt/target/linux
Andreas Böhler f70ee53b08 ipq4019: add support for ZTE MF287+ aka DreiNeo
The ZTE MF287+ is a LTE router used (exclusively?) by the network operator
"3". The MF287 (i.e. non-plus aka 3Neo) is also supported (the only
difference is the LTE modem)

Specifications
==============

SoC: IPQ4018
RAM: 256MiB
Flash: 8MiB SPI-NOR + 128MiB SPI-NAND
LAN: 4x GBit LAN
LTE: ZTE Cat12 (MF287+) / ZTE Cat6 (MF287)
WiFi: 802.11a/b/g/n/ac SoC-integrated

MAC addresses
=============

LAN: from config + 2
WiFi 1: from config
WiFi 2: from config + 1

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

Option 1 - TFTP
---------------

TFTP installation using UART is preferred. Disassemble the device and
connect serial. Put the initramfs image as openwrt.bin to your TFTP server
and configure a static IP of 192.168.1.100. Load the initramfs image by
typing:

  setenv serverip 192.168.1.100
  setenv ipaddr 192.168.1.1
  tftpboot 0x82000000 openwrt.bin
  bootm 0x82000000

From this intiramfs boot you can take a backup of the currently installed
partitions as no vendor firmware is available for download:

  ubiattach -m14
  cat /dev/ubi0_0 > /tmp/ubi0_0
  cat /dev/ubi0_1 > /tmp/ubi0_1

Copy the files /tmp/ubi0_0 and /tmp/ubi0_1 somewhere save.

Once booted, transfer the sysupgrade image and run sysupgrade. You might
have to delete the stock volumes first:

  ubirmvol /dev/ubi0 -N ubi_rootfs
  ubirmvol /dev/ubi0 -N kernel

Option 2 - From stock firmware
------------------------------

The installation from stock requires an exploit first. The exploit consists
of a backup file that forces the firmware to download telnetd via TFTP from
192.168.0.22 and run it. Once exploited, you can connect via telnet and
login as admin:admin.

The exploit will be available at the device wiki page.

Once inside the stock firmware, you can transfer the -factory.bin file to
/tmp by using "scp" from the stock frmware or "tftp".

ZTE has blocked writing to the NAND. Fortunately, it's easy to allow write
access - you need to read from one file in /proc. Once done, you need to
erase the UBI partition and flash OpenWrt. Before performing the operation,
make sure that mtd13 is the partition labelled "rootfs" by calling
"cat /proc/mtd".

Complete commands:

  cd /tmp
  tftp -g -r factory.bin 192.168.0.22
  cat /proc/driver/sensor_id
  flash_erase /dev/mtd13 0 0
  dd if=/tmp/factory.bin of=/dev/mtdblock13 bs=131072

Afterwards, reboot your device and you should have a working OpenWrt
installation.

Restore Stock
=============

Option 1 - via UART
-------------------

Boot an OpenWrt initramfs image via TFTP as for the initial installation.
Transfer the two backed-up files to your box to /tmp.

Then, run the following commands - replace $kernel_length and $rootfs_size
by the size of ubi0_0 and ubi0_1 in bytes.

  ubiattach -m 14
  ubirmvol /dev/ubi0 -N kernel
  ubirmvol /dev/ubi0 -N rootfs
  ubirmvol /dev/ubi0 -N rootfs_data
  ubimkvol /dev/ubi0 -N kernel -s $kernel_length
  ubimkvol /dev/ubi0 -N ubi_rootfs -s $rootfs_size
  ubiupdatevol /dev/ubi0_0 /tmp/ubi0_0
  ubiupdatevol /dev/ubi0_1 /tmp/ubi0_1

Option 2 - from within OpenWrt
------------------------------

This option requires to flash an initramfs version first so that access
to the flash is possible. This can be achieved by sysupgrading to the
recovery.bin version and rebooting. Once rebooted, you are again in a
default OpenWrt installation, but no partition is mounted.

Follow the commands from Option 1 to flash back to stock.

LTE Modem
=========

The LTE modem is similar to other ZTE devices and controls some more LEDs
and battery management.

Configuring the connection using uqmi works properly, the modem
provides three serial ports and a QMI CDC ethernet interface.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2023-06-25 15:53:03 +02:00
..
airoha airoha: spi-en7523: Fix compile warning 2023-05-31 21:30:49 +02:00
apm821xx kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
archs38 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
armsr kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
at91 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
ath25 kernel: bump 5.15 to 5.15.118 2023-06-23 23:05:45 +02:00
ath79 ath79: add support for MikroTik RB951G-2HnD 2023-06-25 13:18:32 +02:00
bcm27xx kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
bcm47xx treewide: Disable building 8M RAM devices 2023-05-21 01:08:31 +02:00
bcm53xx bcm53xx: add Wavlink Quantum DAX/WL-WN538A8 as alt name 2023-06-25 11:05:34 +02:00
bcm63xx kernel: bump 5.15 to 5.15.118 2023-06-23 23:05:45 +02:00
bcm4908 kernel: bump 5.15 to 5.15.111 2023-05-13 22:38:35 +02:00
bmips kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
gemini kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
generic kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
imx kernel: backport NVMEM patches queued for the v6.5 2023-06-16 09:45:38 +02:00
ipq40xx ipq4019: add support for ZTE MF287+ aka DreiNeo 2023-06-25 15:53:03 +02:00
ipq806x kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
kirkwood kirkwood: add support for Iomega Storcenter ix4-200d 2023-05-20 15:35:37 +02:00
lantiq kernel: bump 5.15 to 5.15.118 2023-06-23 23:05:45 +02:00
layerscape kernel: bump 5.15 to 5.15.118 2023-06-23 23:05:45 +02:00
malta kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
mediatek mediatek: add support for Mercusys MR90X v1 2023-06-25 12:25:22 +02:00
mpc85xx mpc85xx: 5.15: refresh kernel patches 2023-06-10 06:56:19 +02:00
mvebu kernel: bump 5.15 to 5.15.118 2023-06-23 23:05:45 +02:00
mxs generic: enable CONFIG_ARM_CRYPTO for 32bit arm targets 2023-05-10 19:01:45 +02:00
octeon kernel: bump 5.15 to 5.15.118 2023-06-23 23:05:45 +02:00
octeontx kernel: enable (ARM|ARM64)_MODULE_PLTS in generic config 2023-05-23 05:49:46 -07:00
omap treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
oxnas oxnas: Enable CONFIG_CRYPTO_LZ4 2023-06-08 17:25:22 +02:00
pistachio treewide: cleanup kernel symbol references 2023-05-12 13:02:44 +02:00
qoriq kernel: fix handling of CONFIG_DYNAMIC_DEBUG 2023-05-03 10:26:17 -07:00
qualcommax kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
ramips ramips: add Edimax BR-6208AC V2 support 2023-06-25 13:58:26 +02:00
realtek kernel: bump 5.15 to 5.15.118 2023-06-23 23:05:45 +02:00
rockchip kernel: migrate FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER for 6.1 2023-06-25 11:26:50 +02:00
sifiveu kernel: bump 5.15 to 5.15.117 2023-06-16 19:44:28 +02:00
sunxi kernel: Set CONFIG_FRAME_WARN depending on target 2023-06-02 11:19:32 +02:00
tegra treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
uml uml: add Kernel 6.1 support via testing 2023-05-28 20:22:23 +02:00
x86 x86/64: Enable IOMMU_V2 support for later CPUs 2023-06-03 21:15:11 +02:00
zynq generic: enable CONFIG_ARM_CRYPTO for 32bit arm targets 2023-05-10 19:01:45 +02:00
Makefile build: fix issues with targets installed via feeds 2022-09-27 13:41:12 +02:00