aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2017-10-15 13:24:02 +0200
committerPiotr Dymacz <pepe2k@gmail.com>2018-01-15 00:09:43 +0100
commit1f06144cdec1487122201faa9350825ed565d99c (patch)
tree6bfd763638f8fc308894dfa3420af8f55799d11d /target/linux/ar71xx/image
parentb38ff7847bdc915bd2a3ebfa8ff40b07867d6ae6 (diff)
downloadupstream-1f06144cdec1487122201faa9350825ed565d99c.tar.gz
upstream-1f06144cdec1487122201faa9350825ed565d99c.tar.bz2
upstream-1f06144cdec1487122201faa9350825ed565d99c.zip
ar71xx: add support for Teltonika RUT900
Teltonika RUT900 is an industrial 3G router based on Atheros AR9344. There are available 3 other models in RUT9xx series: RUT905, RUT950 and RUT955, which differ in availability of additional I/O ports, built-in GSM modem type, GPS antenna and other features. FCC ID of the RUT950 model (LTE module built-in): 2AET4-RUT950. This patch adds support for the RUT900 model only but can be easily extended to cover whole series. Also, as there are several different 3/4G modules (Huawei, Quectel, Telit) used in whole series, packages required for WWAN support are not included by default. It is up to the user to install required software for built-in modem. 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), with ext. PA (MGA-22103) and LNA - built-in 3G module (example: Telit HE910-D) - 2x miniSIM slot - 2x RP-SMA/F (Wi-Fi), 2x SMA/F (3G) - PCA9539 16-bit GPIO I2C expander - 12x LED (4 are driven by AR9344, 7 by PCA9539) - 1x button (reset) - DC jack for main power input (9-30 V) - UART available on PCB edge connector Serial console 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.03.960" firmware and U-Boot "3.0.1". Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target/linux/ar71xx/image')
-rw-r--r--target/linux/ar71xx/image/generic.mk42
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index f1efebc523..3fbfca35e0 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -7,6 +7,15 @@ define Build/alfa-network-rootfs-header
@mv $@.new $@
endef
+define Build/append-md5sum-bin
+ $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | sed 's/../\\\\x&/g' |\
+ xargs echo -ne >> $@
+endef
+
+define Build/append-string
+ echo -n $(1) >> $@
+endef
+
define Build/mkbuffaloimg
$(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
-R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
@@ -68,6 +77,17 @@ define Build/seama-seal
$(call Build/seama,-s $@.seama $(1))
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 Build/uImageHiWiFi
# Field ih_name needs to start with "tw150v1"
mkimage -A $(LINUX_KARCH) \
@@ -620,6 +640,28 @@ define Device/r602n
endef
TARGET_DEVICES += r602n
+define Device/rut900
+ DEVICE_TITLE := Teltonika RUT900
+ DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -uboot-envtools
+ BOARDNAME := RUT900
+ SUPPORTED_DEVICES := rut900
+ IMAGE_SIZE := 15552k
+ MTDPARTS := spi0.0:128k(u-boot)ro,64k(config)ro,64k(art)ro,15552k(firmware),576k(event-log)ro
+ TPLINK_HWID := 0x35000001
+ TPLINK_HWREV := 0x1
+ TPLINK_HEADER_VERSION := 1
+ KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
+ KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma
+ IMAGES := sysupgrade.bin 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 += rut900
+
define Device/mc-mac1200r
$(Device/tplink-8mlzma)
DEVICE_TITLE := Mercury MAC1200R