From 62a15f06b1840baea88550c968c64375b57a7151 Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Tue, 7 Apr 2026 16:55:57 +0000 Subject: [PATCH] realtek: image: add zynos-firmware recipe Add a build recipe to build a ZyNOS firmware image using mkzynfw from firmware-utils to produce an image that can be flashed with the web interface of ZyNOS vendor firmware. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/22909 Signed-off-by: Robert Marko --- target/linux/realtek/image/Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 965657938e9..2b95035e9ea 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -17,7 +17,9 @@ DEVICE_VARS += \ H3C_DEVICE_ID \ H3C_PRODUCT_ID \ LINKSYS_HEADER \ - ZYXEL_VERS + ZYNFW_BOARD \ + ZYNFW_ALIGN \ + ZYXEL_VERS define Build/rt-compress $(STAGING_DIR_HOST)/bin/xz -9 --format=lzma --stdout "$@" > "$@.new" @@ -168,6 +170,15 @@ define Device/rt-loader-bootbase KERNEL_INITRAMFS := $$(KERNEL/rt-compress) | uImage lzma | rt-loader endef +define Build/zynos-firmware + $(STAGING_DIR_HOST)/bin/mkzynfw \ + -B $(ZYNFW_BOARD) \ + -b $(KDIR)/loader-$(DEVICE_NAME).bin \ + -r $@:$(ZYNFW_ALIGN) \ + -o $@.new + mv $@.new $@ +endef + include $(SUBTARGET).mk $(eval $(call BuildImage))