openwrt/target/linux
Andreas Böhler 7354d17ff4
ipq4019: add support for ZTE MF282 Plus aka DreiTube
The ZTE MF282 Plus is a LTE router used (exclusively?) by the network
operator "3". It is very similar to the MF286/MF287 but in the form factor
of the MF282.

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

SoC: IPQ4019
RAM: 256MiB
Flash: 8MiB SPI-NOR + 128MiB SPI-NAND
LAN: 1x GBit LAN
LTE: ZTE Cat6
WiFi: 802.11a/b/g/n/ac SoC-integrated

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

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

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 0x84000000 openwrt.bin
  bootm 0x84000000

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

  ubiattach -m9
  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 mtd9 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/mtd9 0 0
  dd if=/tmp/factory.bin of=/dev/mtdblock9 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 9
  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 the MF286R, it provides an RNDIS interface
and an AT interface.

Other Notes
===========

There is one GPIO Switch "Power button blocker" which, if enabled, does not
trigger a reset of the SoC if the modem reboots. If disabled, the SoC is
rebooted along with the modem. The modem can be rebooted via the exported
GPIO "modem-reset" in /sys/class/gpio.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2023-09-20 14:29:20 +02:00
..
airoha kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
apm821xx apm821xx: fix autoloading of kmod-hw-crypto4xx 2023-07-08 15:38:42 +02:00
archs38 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
armsr armsr: armv8: fix invalid symbol value for FSL_ENETC_QOS 2023-08-15 15:55:00 +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.125 2023-08-09 22:06:24 +02:00
ath79 kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
bcm27xx kernel: bump 6.1 to 6.1.50 2023-09-01 21:01:08 +02:00
bcm47xx kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
bcm53xx kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
bcm63xx kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
bcm4908 kernel: bump 5.15 to 5.15.126 2023-08-13 13:03:43 +02:00
bmips kernel: bump 6.1 to 6.1.44 2023-08-09 20:39:20 -04:00
gemini gemini: Fix up kernel v6.1 config 2023-08-10 19:31:37 +02:00
generic kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +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 MF282 Plus aka DreiTube 2023-09-20 14:29:20 +02:00
ipq806x ipq806x: Correct OnHub sysupgrade config logic 2023-09-12 23:36:30 +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.125 2023-08-09 22:06:24 +02:00
layerscape generic: sync MediaTek Ethernet driver with upstream 2023-08-28 16:35:22 +01:00
malta kernel: remove CRYPTO_BLAKE2S from all >=5.15 2023-07-08 16:54:01 +02:00
mediatek kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
mpc85xx kernel: backport v6.6 nvmem changes 2023-08-31 00:49:29 +02:00
mvebu mvebu: eDPU: add support for version with external switch 2023-09-19 12:12:17 +02:00
mxs mxs: add testing kernel 6.1 2023-07-01 12:54:30 +02:00
octeon kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
octeontx kernel: bump 5.15 to 5.15.123 2023-07-30 18:02:47 +02:00
omap treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
oxnas kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
pistachio kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
qoriq kernel: fix handling of CONFIG_DYNAMIC_DEBUG 2023-05-03 10:26:17 -07:00
qualcommax kernel: backport v6.6 nvmem changes 2023-08-31 00:49:29 +02:00
ramips kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
realtek kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
rockchip rockchip: add support for Radxa ROCK Pi E 2023-09-05 00:20:51 +05:30
sifiveu kernel: bump 5.15 to 5.15.117 2023-06-16 19:44:28 +02:00
sunxi sunxi: add support for Bananapi P2 Zero 2023-09-18 18:15:21 +02:00
tegra treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
uml kernel: bump 5.15 to 5.15.132 2023-09-20 14:13:00 +02:00
x86 x86: add 6.1 testing kernel 2023-09-19 11:38:38 +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