Adding device support for Teltonika RUTXR1


Teltonika devices run from a modified version of the OpenWrt firmware.
An SDK package is also available.

The RUTXR1 seems to have a target of ipq40xx
Subtarget: generic
Target profile: DEVICE_teltonika_rutx

The make save file is:
I've erased the comments and some of the duplicate new lines from the file.

in /target/linux/ipq40xx/image/Makefile:

define Device/teltonika_rutx
#~ 	$(call Device/FitImage)
#~ 	$(call Device/UbiFit)
	BOARD_NAME := rutx
	DEVICE_DTS := qcom-ipq4018-rutx
	DEVICE_DTS_CONFIG := config@5
	BLOCKSIZE := 128k
	PAGESIZE := 2048
	FILESYSTEMS := squashfs
	# Default common packages for RUTX series
	# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	# Essential must-have:
	DEVICE_PACKAGES := sysupgrade-helper uboot-ipq40xx

	# Mobile related:
	DEVICE_PACKAGES += quectel_newflash

	# Wi-Fi related:
	DEVICE_PACKAGES += ipq-wifi-teltonika_rutx

	# USB related:
	DEVICE_PACKAGES += kmod-usb-uhci kmod-usb-printer p910nd luci-app-p910nd

	# USB Serial
	DEVICE_PACKAGES += kmod-usb-serial kmod-usb-acm kmod-usb-serial-ch341 kmod-usb-serial-pl2303 \
	                   kmod-usb-serial-ark3116 kmod-usb-serial-belkin kmod-usb-serial-cp210x \
	                   kmod-usb-serial-cypress-m8 kmod-usb-serial-ftdi

	# Uncaterizored stuff
	DEVICE_PACKAGES += kmod-r2ec stm32flasher libfuse libcap libwebsockets-openssl

	# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	IMAGES := sysupgrade.bin
	IMAGE/sysupgrade.bin := append-ubi | UbootFw | append-metadata | finalize-tlt-webui
TARGET_DEVICES += teltonika_rutx

You also need to come up with a DTS file, ART extraction, potentially MAC assignments and hook it up to the sysupgrade support.

List of additional files included in the Teltonika firmware -

I did a quick check between the Teltonika SDK target and the latest OpenWrt target.

It doesn't seem to reference a DTS file for the Teltonika RUTX exactly however doing a build of the Teltonika firmware and searching the build_target folder provides the qcom-ipq4018-rutx.dts & qcom-ipq4018-rutx.dtb

It looks like the Teltonika SDK is based off of the 19.07.04 version of OpenWrt.