aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-06-21 23:27:56 +0200
committerDavid Bauer <mail@david-bauer.net>2021-06-30 21:39:59 +0200
commit6cf1dfd7e1d6b5c6a94b87eb065408bb489574c0 (patch)
tree97589f0e10aed5adb6eedda6b00e9405f91dfdbf /target/linux/ath79/image
parentde499573006ab4f32ded9fd66a62ec5e0c183e8a (diff)
downloadupstream-6cf1dfd7e1d6b5c6a94b87eb065408bb489574c0.tar.gz
upstream-6cf1dfd7e1d6b5c6a94b87eb065408bb489574c0.tar.bz2
upstream-6cf1dfd7e1d6b5c6a94b87eb065408bb489574c0.zip
ath79: add support for Teltonika RUT230 v1
This commit adds support for the Teltonika RUT230 v1, a Atheros AR9331 based router with a Quectel UC20 UMTS modem. Hardware -------- Atheros AR9331 16 MB SPI-NOR XTX XT25F128B 64M DDR2 memory Atheros AR9331 1T1R 802.11bgn Wireless Boootloader: pepe2k U-Boot mod Hardware-Revision ----------------- There are two board revisions of the RUT230, a v0 and v1. A HW version is silkscreened on the top of the PCBs front side as well as shown in the Teltonika UI. However, this looks to be a different identifier, as the GPl dump shows this silkscreened / UI shown version are internally treated identically. Th following mapping has been obtained from the latest GPl dump. HW Ver 01 - 04 --> v0 HW Ver > 05 --> v1 My board was a HW Ver 09 and is treated as a v1. Installation ------------ While attaching power, hold down the reset button and release it after the signal LEDs flashed 3 times. Attach your Computer with the devices LAN port and assign yourself the IPv4 address 192.168.1.10/24. Open a web browser, navigate to 192.168.1.1. Upload the OpenWrt factory image. The device will install OpenWrt and automatically reboots afterwards. You can use the smae procedure with the stock firmware to return back to the vendor firmware. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ath79/image')
-rw-r--r--target/linux/ath79/image/generic.mk35
1 files changed, 33 insertions, 2 deletions
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 9d0be2b86b..ab875bd220 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -142,11 +142,20 @@ define Build/teltonika-fw-fake-checksum
# from begin of the firmware file) with 16 bytes stored just before
# 0xdeadc0de marker. Values are only compared, MD5 sum is not verified.
let \
- offs="$$(stat -c%s $@) - 20"; \
+ offs="$$(stat -c%s $@) - $(1)"; \
dd if=$@ bs=1 count=16 skip=76 |\
dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc
endef
+define Build/teltonika-v1-header
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
+ -c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
+ -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
+ -m $(TPLINK_HEADER_VERSION) -N "$(VERSION_DIST)" -V "RUT2xx " \
+ -k $@ -o $@.new $(1)
+ @mv $@.new $@
+endef
+
define Build/wrgg-pad-rootfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
endef
@@ -2182,6 +2191,28 @@ define Device/telco_t1
endef
TARGET_DEVICES += telco_t1
+define Device/teltonika_rut230-v1
+ SOC := ar9331
+ DEVICE_VENDOR := Teltonika
+ DEVICE_MODEL := RUT230
+ DEVICE_VARIANT := v1
+ DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-usb-acm kmod-usb-net-qmi-wwan \
+ uqmi -uboot-envtools
+ IMAGE_SIZE := 15552k
+ TPLINK_HWID := 0x32200002
+ TPLINK_HWREV := 0x1
+ TPLINK_HEADER_VERSION := 1
+ KERNEL := kernel-bin | append-dtb | lzma | teltonika-v1-header
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
+ IMAGES += factory.bin
+ IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
+ pad-rootfs | pad-extra 64 | teltonika-fw-fake-checksum 54 | check-size
+ IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
+ append-rootfs | pad-rootfs | append-metadata |\
+ check-size
+endef
+TARGET_DEVICES += teltonika_rut230-v1
+
define Device/teltonika_rut955
SOC := ar9344
DEVICE_VENDOR := Teltonika
@@ -2196,7 +2227,7 @@ define Device/teltonika_rut955
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
- pad-rootfs | teltonika-fw-fake-checksum | append-string master |\
+ pad-rootfs | teltonika-fw-fake-checksum 20 | append-string master |\
append-md5sum-bin | check-size
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
append-rootfs | pad-rootfs | append-metadata |\