From 6e283cdc0da25928f8148805ebef7f8f2b769ee8 Mon Sep 17 00:00:00 2001 From: Pavel Kubelun Date: Sat, 12 Aug 2017 17:56:11 +0300 Subject: ramips: add Xiaomi Mi Router 3G support This commit adds support for Xiaomi Mi WiFi Router 3G. Short specification: - MT7621AT + MT7603EN + 7612EN - 256MB DDR3 RAM - 128MB NAND flash - 1+2 x 1000M Ethernet - 1x USB 3.0 port - reset button - yellow, blue, red leds Installation through telnet/ssh: - copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it from LEDE download site to /tmp - switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if wgetted from LEDE download site - run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1 - run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0 - run: mtd erase kernel0 - run: reboot Originally stock firmware has following partitions: - ... - kernel0 (primary kernel image) - kernel1 (secondary kernel image, used by u-boot in failsafe routine) - rootfs0 (primary rootfs) - rootfs1 (secondary rootfs in case primary fails) - overlay (used as ubi overlay) This commit squashes rootfs0, rootfs1 and overlay partitions into 1, so it can be used by LEDE fully for package installation, resulting in 117,5MiB. This device lacks hw watchdog, so adding softdog instead (stock does the same). Signed-off-by: Pavel Kubelun --- target/linux/ramips/image/mt7621.mk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'target/linux/ramips/image') diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index a67facb83b..779616292d 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -105,6 +105,26 @@ define Device/k2p endef TARGET_DEVICES += k2p +define Device/mir3g + DTS := MIR3G + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_SIZE := 4096k + KERNEL := $(KERNEL_DTB) | uImage lzma + IMAGE_SIZE := 32768k + UBINIZE_OPTS := -E 5 + IMAGES := sysupgrade.tar kernel1.bin rootfs0.bin + IMAGE/kernel1.bin := append-kernel + IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata + DEVICE_TITLE := Xiaomi Mi Router 3G + SUPPORTED_DEVICES += R3G + DEVICE_PACKAGES := \ + kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-mini \ + kmod-softdog +endef +TARGET_DEVICES += mir3g + define Device/mt7621 DTS := MT7621 BLOCKSIZE := 64k -- cgit v1.2.3