aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/generic.mk
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-02-02 18:09:50 +0200
committerDaniel Golle <daniel@makrotopia.org>2020-02-21 22:35:12 +0100
commitd1130ad265b994d1b23972bab8c99787759686d0 (patch)
treec3de6200baa637d3734fbfb90672eeba9777a1a1 /target/linux/ath79/image/generic.mk
parente5e461b62135146210e85b8b973927c650ddb808 (diff)
downloadupstream-d1130ad265b994d1b23972bab8c99787759686d0.tar.gz
upstream-d1130ad265b994d1b23972bab8c99787759686d0.tar.bz2
upstream-d1130ad265b994d1b23972bab8c99787759686d0.zip
ath79: add support for Teltonika RUT955
Specification: - 550/400/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 4x 10/100 Mbps Ethernet, with passive PoE support on LAN1 - 2T2R 2,4 GHz (AR9344) - built-in 4G/3G module (example: Quectel EC-25EU) - internal microSD slot (spi-mmc, buggy and disabled for now) - RS232 on D-Sub9 port (Cypress ACM via USB, /dev/ttyACM0) - RS422/RS485 (AR934x high speed UART, /dev/ttyATH1) - analog 0-24V input (MCP3221) - various digital inputs and outputs incl. a relay - 11x LED (4 are driven by AR9344, 7 by 74HC595) - 2x miniSIM slot (can be swapped via GPIO) - 2x RP-SMA/F (Wi-Fi), 3x SMA/F (2x WWAN, GPS) - 1x button (reset) - DC jack for main power input (9-30 V) - debugging UART available on PCB edge connector Serial console (/dev/ttyS0) pinout: - RX: pin1 (square) on top side of the main PCB (AR9344 is on top) - TX: pin1 (square) on bottom side Flash instruction: Vendor firmware is based on OpenWrt CC release. Use the "factory" image directly in GUI (make sure to uncheck "keep settings") or in U-Boot web based recovery. To avoid any problems, make sure to first update vendor firmware to latest version - "factory" image was successfully tested on device running "RUT9XX_R_00.06.051" firmware and U-Boot "3.0.2". Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/ath79/image/generic.mk')
-rw-r--r--target/linux/ath79/image/generic.mk38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 1fa9b30c51..3c0aa2ee4d 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -36,6 +36,11 @@ define Build/addpattern
-mv "$@.new" "$@"
endef
+define Build/append-md5sum-bin
+ $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | sed 's/../\\\\x&/g' |\
+ xargs echo -ne >> $@
+endef
+
define Build/cybertan-trx
@echo -n '' > $@-empty.bin
-$(STAGING_DIR_HOST)/bin/trx -o $@.new \
@@ -73,6 +78,17 @@ define Build/pisen_wmb001n-factory
rm -rf "$@.tmp"
endef
+define Build/teltonika-fw-fake-checksum
+ # Teltonika U-Boot web based firmware upgrade/recovery routine compares
+ # 16 bytes from md5sum1[16] field in TP-Link v1 header (offset: 76 bytes
+ # 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"; \
+ dd if=$@ bs=1 count=16 skip=76 |\
+ dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc
+endef
+
define Device/seama
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
KERNEL_INITRAMFS := $$(KERNEL) | seama
@@ -1070,6 +1086,28 @@ define Device/sitecom_wlr-7100
endef
TARGET_DEVICES += sitecom_wlr-7100
+define Device/teltonika_rut955
+ SOC := ar9344
+ DEVICE_VENDOR := Teltonika
+ DEVICE_MODEL := RUT955
+ DEVICE_PACKAGES := kmod-usb2 kmod-usb-acm kmod-usb-net-qmi-wwan \
+ kmod-usb-serial-option kmod-hwmon-mcp3021 uqmi -uboot-envtools
+ IMAGE_SIZE := 15552k
+ TPLINK_HWID := 0x35000001
+ TPLINK_HWREV := 0x1
+ TPLINK_HEADER_VERSION := 1
+ KERNEL := kernel-bin | append-dtb | lzma | tplink-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 | teltonika-fw-fake-checksum | append-string master |\
+ append-md5sum-bin | check-size $$$$(IMAGE_SIZE)
+ IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
+ append-rootfs | pad-rootfs | append-metadata |\
+ check-size $$$$(IMAGE_SIZE)
+endef
+TARGET_DEVICES += teltonika_rut955
+
define Device/trendnet_tew-823dru
SOC := qca9558
DEVICE_VENDOR := Trendnet