aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/image
diff options
context:
space:
mode:
authorFelix Matouschek <felix@matouschek.org>2021-07-15 21:48:11 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-11-28 18:39:01 +0100
commit1cc3b95efcc616fba91a7f34e9781743229cc640 (patch)
treef412fc5d20cbc34fdda146b87a17032ce3bd4352 /target/linux/ipq40xx/image
parent67f52012760ce553ba6393aaba77359a458deeda (diff)
downloadupstream-1cc3b95efcc616fba91a7f34e9781743229cc640.tar.gz
upstream-1cc3b95efcc616fba91a7f34e9781743229cc640.tar.bz2
upstream-1cc3b95efcc616fba91a7f34e9781743229cc640.zip
ipq40xx: Add support for Teltonika RUTX10
This patch adds support for the Teltonika RUTX10. This device is an industrial DIN-rail router with 4 ethernet ports, 2.4G/5G dualband WiFi, Bluetooth, a USB 2.0 port and two GPIOs. The RUTX series devices are very similiar so common parts of the DTS are kept in a DTSI file. They are based on the QCA AP-DK01.1-C1 dev board. See https://teltonika-networks.com/product/rutx10 for more info. Hardware: SoC: Qualcomm IPQ4018 RAM: 256MB DDR3 SPI Flash 1: XTX XT25F128B (16MB, NOR) SPI Flash 2: XTX XT26G02AWS (256MB, NAND) Ethernet: Built-in IPQ4018 (SoC, QCA8075), 4x 10/100/1000 ports WiFi 1: Qualcomm QCA4019 IEEE 802.11b/g/n Wifi 2: Qualcomm QCA4019 IEEE 802.11a/n/ac USB Hub: Genesys Logic GL852GT Bluetooth: Qualcomm CSR8510 (A10U) LED/GPIO controller: STM32F030 with custom firmware Buttons: Reset button Leds: Power (green, cannot be controlled) WiFi 2.4G activity (green) WiFi 5G activity (green) MACs Details verified with the stock firmware: eth0: Partition 0:CONFIG Offset: 0x0 eth1: = eth0 + 1 radio0 (2.4 GHz): = eth0 + 2 radio1 (5.0 GHz): = eth0 + 3 Label MAC address is from eth0. The LED/GPIO controller needs a separate kernel driver to function. The driver was extracted from the Teltonika GPL sources and can be found at following feed: https://github.com/0xFelix/teltonika-rutx-openwrt USB detection of the bluetooth interface is sometimes a bit flaky. When not detected power cycle the device. When the bluetooth interface was detected properly it can be used with bluez / bluetoothctl. Flash instructions via stock web interface (sysupgrade based): 1. Set PC to fixed ip address 192.168.1.100 2. Push reset button and power on the device 3. Open u-boot HTTP recovery at http://192.168.1.1 4. Upload latest stock firmware and wait until the device is rebooted 5. Open stock web interface at http://192.168.1.1 6. Set some password so the web interface is happy 7. Go to firmware upgrade settings 8. Choose openwrt-ipq40xx-generic-teltonika_rutx10-squashfs-nand-factory.ubi 9. Set 'Keep settings' to off 10. Click update, when warned that it is not a signed image proceed Return to stock firmware: 1. Set PC to fixed ip address 192.168.1.100 2. Push reset button and power on the device 3. Open u-boot HTTP recovery at http://192.168.1.1 4. Upload latest stock firmware and wait until the device is rebooted Note: The DTS expects OpenWrt to be running from the second rootfs partition. u-boot on these devices hot-patches the DTS so running from the first rootfs partition should also be possible. If you want to be save follow the instructions above. u-boot HTTP recovery restores the device so that when flashing OpenWrt from stock firmware it is flashed to the second rootfs partition and the DTS matches. Signed-off-by: Felix Matouschek <felix@matouschek.org>
Diffstat (limited to 'target/linux/ipq40xx/image')
-rw-r--r--target/linux/ipq40xx/image/generic.mk27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index c24eb28523..0d7d7a30d2 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -46,6 +46,17 @@ define Build/append-rootfshdr
dd if=$@.new bs=64 count=1 >> $(IMAGE_KERNEL)
endef
+define Build/append-rutx-metadata
+ echo \
+ '{ \
+ "device_code": [".*"], \
+ "hwver": [".*"], \
+ "batch": [".*"], \
+ "serial": [".*"], \
+ "supported_devices":["teltonika,rutx"] \
+ }' | fwtool -I - $@
+endef
+
define Build/mkmylofw_32m
$(eval device_id=$(word 1,$(1)))
$(eval revision=$(word 2,$(1)))
@@ -873,6 +884,22 @@ define Device/qxwlan_e2600ac-c2
endef
TARGET_DEVICES += qxwlan_e2600ac-c2
+define Device/teltonika_rutx10
+ $(call Device/FitImage)
+ $(call Device/UbiFit)
+ DEVICE_VENDOR := Teltonika
+ DEVICE_MODEL := RUTX10
+ SOC := qcom-ipq4018
+ DEVICE_DTS_CONFIG := config@5
+ KERNEL_INSTALL := 1
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ FILESYSTEMS := squashfs
+ IMAGE/nand-factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
+ DEVICE_PACKAGES := ipq-wifi-teltonika_rutx kmod-bluetooth
+endef
+TARGET_DEVICES += teltonika_rutx10
+
define Device/unielec_u4019-32m
$(call Device/FitImage)
DEVICE_VENDOR := Unielec