aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-11-10 14:16:32 +0000
committerDaniel Golle <daniel@makrotopia.org>2022-11-10 21:35:34 +0000
commite586de8dbf00fac72a37177ba08f74bb1091dd86 (patch)
tree88d02f55ad3d5639ef1a1708fef5eea8df11671e /target/linux/ath79/image
parent04b8ad60fd92b375cf661a56afb853344c95ca99 (diff)
downloadupstream-e586de8dbf00fac72a37177ba08f74bb1091dd86.tar.gz
upstream-e586de8dbf00fac72a37177ba08f74bb1091dd86.tar.bz2
upstream-e586de8dbf00fac72a37177ba08f74bb1091dd86.zip
ath79: add support for Teltonika RUT300
Add support for the Teltonika RUT300 rugged industrial Ethernet router Hardware -------- SoC: Qualcomm Atheros QCA9531 RAM: 64M DDR2 (EtronTech EM68B16CWQK-25IH) FLASH: 16M SPI-NOR (Winbond W25Q128) ETH: 4x 100M LAN (QCA9533 internal AR8229 switch, eth0) 1x 100M WAN (QCA9533 internal PHY, eth1) UART: 115200 8n1, same debug port as other Teltonika devices USB: 1 single USB 2.0 host port BUTTON: Reset LED: 1x green power LED (always on) 5x yellow Ethernet port LED (controlled by Linux) WAN port LED is used as boot status and upgrade indicator as the power LED cannot be controlled in software. Use the *-factory.bin file to intially flash the device using the vendor firmware's Web-UI. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/ath79/image')
-rw-r--r--target/linux/ath79/image/generic.mk47
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 11c5669fe4..e5bc73e5a6 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -10,6 +10,7 @@ DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
DEVICE_VARS += KERNEL_INITRAMFS_PREFIX DAP_SIGNATURE
DEVICE_VARS += EDIMAX_HEADER_MAGIC EDIMAX_HEADER_MODEL
DEVICE_VARS += OPENMESH_CE_TYPE ZYXEL_MODEL_STRING
+DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
define Build/addpattern
-$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \
@@ -139,6 +140,35 @@ define Build/teltonika-v1-header
@mv $@.new $@
endef
+metadata_json_teltonika = \
+ '{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
+ "metadata_version": "1.1", \
+ "compat_version": "$(call json_quote,$(compat_version))", \
+ "version":"$(call json_quote,$(VERSION_DIST))-$(call json_quote,$(VERSION_NUMBER))-$(call json_quote,$(REVISION))", \
+ "device_code": [".*"], \
+ "hwver": [".*"], \
+ "batch": [".*"], \
+ "serial": [".*"], \
+ $(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
+ $(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
+ [$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma) \
+ "supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
+ $(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma)) \
+ "version_wrt": { \
+ "dist": "$(call json_quote,$(VERSION_DIST))", \
+ "version": "$(call json_quote,$(VERSION_NUMBER))", \
+ "revision": "$(call json_quote,$(REVISION))", \
+ "target": "$(call json_quote,$(TARGETID))", \
+ "board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
+ }, \
+ "hw_support": {}, \
+ "hw_mods": {} \
+ }'
+
+define Build/append-metadata-teltonika
+ echo $(call metadata_json_teltonika) | fwtool -I - $@
+endef
+
define Build/wrgg-pad-rootfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
endef
@@ -2527,6 +2557,23 @@ define Device/teltonika_rut230-v1
endef
TARGET_DEVICES += teltonika_rut230-v1
+define Device/teltonika_rut300
+ SOC := qca9531
+ DEVICE_VENDOR := Teltonika
+ DEVICE_MODEL := RUT300
+ SUPPORTED_TELTONIKA_DEVICES := teltonika,rut30x
+ DEVICE_PACKAGES := -kmod-ath9k -uboot-envtools -wpad-basic-wolfssl kmod-usb2
+ IMAGE_SIZE := 15552k
+ IMAGES += factory.bin
+ IMAGE/factory.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
+ append-rootfs | pad-rootfs | append-metadata-teltonika | \
+ 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_rut300
+
define Device/teltonika_rut955
SOC := ar9344
DEVICE_VENDOR := Teltonika