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@gmail.com>
(cherry picked from commit e900c452112a2309681ed4ee12894f3a18ed650f)
This commit is contained in:
Mikhail Zhilkin 2023-11-12 07:52:45 +00:00 committed by Hauke Mehrtens
parent dae399196b
commit a8f31d2aa1
2 changed files with 5 additions and 5 deletions

View File

@ -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)) \

View File

@ -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