[openwrt/openwrt] ramips: sercomm.mk: make common recipe to set a bit in pid

LEDE Commits lede-commits at lists.infradead.org
Sun Nov 26 17:03:58 PST 2023


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/a8f31d2aa15ad940a75ddc99aa0e82d2a617f4eb

commit a8f31d2aa15ad940a75ddc99aa0e82d2a617f4eb
Author: Mikhail Zhilkin <csharper2005 at gmail.com>
AuthorDate: Sun Nov 12 07:52:45 2023 +0000

    ramips: sercomm.mk: make common recipe to set a bit in pid
    
    This commit makes a common recipe to set bit in Sercomm factory pid since
    this is necessary for several devices (WiFire S1500.nbn, Rostelecom
    RT-FL-1) at different offsets.
    
    Signed-off-by: Mikhail Zhilkin <csharper2005 at gmail.com>
    (cherry picked from commit e900c452112a2309681ed4ee12894f3a18ed650f)
---
 target/linux/ramips/image/common-sercomm.mk | 8 ++++----
 target/linux/ramips/image/mt7621.mk         | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/ramips/image/common-sercomm.mk b/target/linux/ramips/image/common-sercomm.mk
index 4060da0923..182f2251ba 100644
--- a/target/linux/ramips/image/common-sercomm.mk
+++ b/target/linux/ramips/image/common-sercomm.mk
@@ -38,10 +38,6 @@ define Build/sercomm-factory-cqr
 	mv $@.fhdr $@
 endef
 
-define Build/sercomm-fix-buc-pid
-	printf 1 | dd seek=$$((0x13)) of=$@ bs=1 conv=notrunc 2>/dev/null
-endef
-
 define Build/sercomm-kernel
 	$(TOPDIR)/scripts/sercomm-kernel-header.py \
 		--kernel-image $@ \
@@ -104,6 +100,10 @@ define Build/sercomm-payload
 	rm $@.pid
 endef
 
+define Build/sercomm-pid-setbit
+	printf 1 | dd seek=$$(($(1))) of=$@ bs=1 conv=notrunc 2>/dev/null
+endef
+
 define Build/sercomm-prepend-tagged-kernel
 	$(CP) $(IMAGE_KERNEL) $(IMAGE_KERNEL).tagged
 	$(call Build/sercomm-part-tag-common,$(word 1,$(1)) \
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 8a194d6bc1..d456176a01 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -2518,7 +2518,7 @@ define Device/wifire_s1500-nbn
   IMAGE_SIZE := 51200k
   IMAGE/factory.img := append-kernel | sercomm-kernel-factory | \
 	sercomm-reset-slot1-chksum | append-ubi | check-size | \
-	sercomm-factory-cqr | sercomm-fix-buc-pid | sercomm-mkhash | \
+	sercomm-factory-cqr | sercomm-pid-setbit 0x13 | sercomm-mkhash | \
 	sercomm-crypto
   SERCOMM_HWID := BUC
   SERCOMM_HWVER := 10000




More information about the lede-commits mailing list