[openwrt/openwrt] ramips: allow custom trx magic for Arcadyan

LEDE Commits lede-commits at lists.infradead.org
Mon Jun 13 00:26:57 PDT 2022


981213 pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/109c503bee9aed34ffb485a29af1e2ec6f3bb6b1

commit 109c503bee9aed34ffb485a29af1e2ec6f3bb6b1
Author: Mikhail Zhilkin <csharper2005 at gmail.com>
AuthorDate: Thu Apr 28 18:24:07 2022 +0000

    ramips: allow custom trx magic for Arcadyan
    
    This commit:
    1. Renames beeline-trx recipe in mt7621.mk to arcadyan-trx. The recipe
       is necessary for:
       - MTS WG430223 (Arcadyan WG430223)
       - Beeline Smartbox Flash (Arcadyan WG443223)
    2. Allows specify custom trx magic which is different for the routers
       mentined above.
    
    Signed-off-by: Mikhail Zhilkin <csharper2005 at gmail.com>
---
 target/linux/ramips/image/mt7621.mk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index a485a5043a..6ea827b41c 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -13,9 +13,10 @@ ifdef CONFIG_LINUX_5_10
   DTS_CPPFLAGS += -DDTS_LEGACY
 endif
 
-define Build/beeline-trx
+define Build/arcadyan-trx
 	echo -ne "hsqs" > $@.hsqs
-	$(STAGING_DIR_HOST)/bin/otrx create $@.trx -M 0x746f435d -f $@ \
+	$(eval trx_magic=$(word 1,$(1)))
+	$(STAGING_DIR_HOST)/bin/otrx create $@.trx -M $(trx_magic) -f $@ \
 		-a 0x20000 -b 0x420000 -f $@.hsqs -a 1000
 	mv $@.trx $@
 	dd if=/dev/zero bs=1024 count=1 >> $@.tail
@@ -242,7 +243,7 @@ define Device/beeline_smartbox-flash
   BLOCKSIZE := 128k
   PAGESIZE := 2048
   KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | \
-	uImage none | beeline-trx | pad-to $$(KERNEL_SIZE)
+	uImage none | arcadyan-trx 0x746f435d | pad-to $$(KERNEL_SIZE)
   KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | \
 	uImage none
   IMAGES += factory.trx




More information about the lede-commits mailing list