[openwrt/openwrt] qualcommax: make header length configurable on Build/mstc-header
LEDE Commits
lede-commits at lists.infradead.org
Thu Jun 12 01:54:39 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2186f4aa757d63f22cdd6cb3b02d09d15848b1f6
commit 2186f4aa757d63f22cdd6cb3b02d09d15848b1f6
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Tue Jun 3 23:56:13 2025 +0900
qualcommax: make header length configurable on Build/mstc-header
I-O DATA WN-DAX3000GR has a MSTC (Mitra Star Technology Corp.) specific
header with a different length than ELECOM WRC-X3000GS2.
Make the header length configurable by parameterizing on
Build/mstc-header.
- WRC-X3000GS2: 0x400
- WN-DAX3000GR: 0x480
Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19053
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/qualcommax/image/ipq50xx.mk | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/linux/qualcommax/image/ipq50xx.mk b/target/linux/qualcommax/image/ipq50xx.mk
index 4de3fd292b..3ea222c984 100644
--- a/target/linux/qualcommax/image/ipq50xx.mk
+++ b/target/linux/qualcommax/image/ipq50xx.mk
@@ -1,7 +1,8 @@
DEVICE_VARS += BOOT_SCRIPT
define Build/mstc-header
- $(eval version=$(1))
+ $(eval version=$(word 1,$(1)))
+ $(eval hdrlen=$(if $(word 2,$(1)),$(word 2,$(1)),0x400))
gzip -c $@ | tail -c8 > $@.crclen
( \
printf "CMOC"; \
@@ -10,7 +11,7 @@ define Build/mstc-header
dd bs=64 count=1 conv=sync 2>/dev/null; \
printf "$(version)" | \
dd bs=64 count=1 conv=sync 2>/dev/null; \
- dd if=/dev/zero bs=884 count=1 2>/dev/null; \
+ dd if=/dev/zero bs=$$(($(hdrlen) - 0x8c)) count=1 2>/dev/null; \
cat $@; \
) > $@.new
mv $@.new $@
More information about the lede-commits
mailing list