[openwrt/openwrt] realtek: image: add rt-loader-no-uimage recipe

LEDE Commits lede-commits at lists.infradead.org
Mon Dec 22 15:27:19 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/74b5a63cf954219289e35a00d70eb09355b5d5ec

commit 74b5a63cf954219289e35a00d70eb09355b5d5ec
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Mon Dec 22 09:57:52 2025 +0000

    realtek: image: add rt-loader-no-uimage recipe
    
    Add a new recipe 'rt-loader-no-uimage' that passes the kernel load
    address to rt-loader, causing it to use that instead of it's initial run
    address.
    
    The usual behavior is fine for uImages where the load address is
    predefined in the header, U-boot loads the image to that address and
    then runs it, rt-loader just takes over that address. For non-uImage
    instead, the address is tightly coupled to where the image has been
    transferred during serial or TFTP upload. This may not be possible on
    several devices. Passing a separate kernel load address to rt-loader
    decouples that and avoids taking the pain to change the load address of
    the kernel itself.
    
    Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/21248
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/image/Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile
index 786dd12710..db1776340e 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -30,6 +30,13 @@ define Build/rt-loader
 	mv "$@.new" "$@"
 endef
 
+define Build/rt-loader-no-uimage
+        $(MAKE) all clean -C rt-loader CROSS_COMPILE="$(TARGET_CROSS)" \
+                KERNEL_ADDR="$(KERNEL_LOADADDR)" 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\




More information about the lede-commits mailing list