aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/image/generic.mk
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/image/generic.mk')
-rw-r--r--target/linux/ath79/image/generic.mk35
1 files changed, 33 insertions, 2 deletions
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 9d0be2b86b..ab875bd220 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -142,11 +142,20 @@ define Build/teltonika-fw-fake-checksum
# 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"; \
+ offs="$$(stat -c%s $@) - $(1)"; \
dd if=$@ bs=1 count=16 skip=76 |\
dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc
endef
+define Build/teltonika-v1-header
+ $(STAGING_DIR_HOST)/bin/mktplinkfw \
+ -c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
+ -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
+ -m $(TPLINK_HEADER_VERSION) -N "$(VERSION_DIST)" -V "RUT2xx " \
+ -k $@ -o $@.new $(1)
+ @mv $@.new $@
+endef
+
define Build/wrgg-pad-rootfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
endef
@@ -2182,6 +2191,28 @@ define Device/telco_t1
endef
TARGET_DEVICES += telco_t1
+define Device/teltonika_rut230-v1
+ SOC := ar9331
+ DEVICE_VENDOR := Teltonika
+ DEVICE_MODEL := RUT230
+ DEVICE_VARIANT := v1
+ DEVICE_PACKAGES := kmod-usb-chipidea2 kmod-usb-acm kmod-usb-net-qmi-wwan \
+ uqmi -uboot-envtools
+ IMAGE_SIZE := 15552k
+ TPLINK_HWID := 0x32200002
+ TPLINK_HWREV := 0x1
+ TPLINK_HEADER_VERSION := 1
+ KERNEL := kernel-bin | append-dtb | lzma | teltonika-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 | pad-extra 64 | teltonika-fw-fake-checksum 54 | check-size
+ IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
+ append-rootfs | pad-rootfs | append-metadata |\
+ check-size
+endef
+TARGET_DEVICES += teltonika_rut230-v1
+
define Device/teltonika_rut955
SOC := ar9344
DEVICE_VENDOR := Teltonika
@@ -2196,7 +2227,7 @@ define Device/teltonika_rut955
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 |\
+ pad-rootfs | teltonika-fw-fake-checksum 20 | append-string master |\
append-md5sum-bin | check-size
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
append-rootfs | pad-rootfs | append-metadata |\