[openwrt/openwrt] realtek: add rt-loader recipe

LEDE Commits lede-commits at lists.infradead.org
Sat Jun 28 07:15:00 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ae0a1f5b08088301c82fe27aa1e9ecbd68a3bbc3

commit ae0a1f5b08088301c82fe27aa1e9ecbd68a3bbc3
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sun Jun 8 12:42:10 2025 -0400

    realtek: add rt-loader recipe
    
    To make use of the new rt-loader provide the needed recipes.
    This has been tested with the following devices:
    
    - rtl838x Linksys LGS310: initramfs & flash
    - rtl930x Zyxel XGS1210: initramfs
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/18397
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/image/Makefile | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile
index 19fab03dba..39c834b773 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -19,6 +19,17 @@ DEVICE_VARS += \
 	LINKSYS_HEADER \
         ZYXEL_VERS
 
+define Build/rt-compress
+	$(STAGING_DIR_HOST)/bin/xz -9 --format=lzma --stdout "$@" > "$@.new"
+	mv "$@.new" "$@"
+endef
+
+define Build/rt-loader
+	$(MAKE) all clean -C rt-loader CROSS_COMPILE="$(TARGET_CROSS)" \
+		KERNEL_IMG_IN="$@" KERNEL_IMG_OUT="$@.new" BUILD_DIR="$@.build"
+	mv "$@.new" "$@"
+endef
+
 define Build/zyxel-vers
        ( echo VERS;\
        for hw in $(ZYXEL_VERS); do\
@@ -108,6 +119,12 @@ define Device/Default
 	append-metadata
 endef
 
+define Device/uimage-rt-loader
+	KERNEL/rt-loader := kernel-bin | append-dtb | rt-compress | rt-loader
+	KERNEL := $$(KERNEL/rt-loader) | uImage none
+	KERNEL_INITRAMFS := $$(KERNEL/rt-loader) | uImage none
+endef
+
 include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))




More information about the lede-commits mailing list