]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: image: pin FLASH_ADDR per device
authorJonas Jelonek <jelonek.jonas@gmail.com>
Thu, 30 Apr 2026 10:54:33 +0000 (10:54 +0000)
committerRobert Marko <robimarko@gmail.com>
Thu, 7 May 2026 09:08:33 +0000 (11:08 +0200)
FLASH_ADDR is referenced inside Build/rt-loader-standalone but is not
listed in DEVICE_VARS, so include/image.mk's Device/Export does not
emit a per-target FLASH_ADDR := <value> assignment for the standalone
loader recipe. At recipe expansion time $(FLASH_ADDR) therefore
resolves to whatever value the last device in TARGET_DEVICES set
globally, which is not necessarily the value belonging to the loader
being built.

This currently happens to produce correct binaries only because every
device that sets FLASH_ADDR within a given subtarget shares the same
value, so the leaked global matches by coincidence.

Add FLASH_ADDR to DEVICE_VARS so each loader recipe captures its own
device's address.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23226
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/image/Makefile

index 2b95035e9ea347e191b5d35d43af8d5bdcfdd3cd..457fb0c1095abee924ac9697fe9b2a60b46410c5 100644 (file)
@@ -14,6 +14,7 @@ DEVICE_VARS += \
         CAMEO_KERNEL_PART \
         CAMEO_KERNEL_PART_SIZE \
         CAMEO_ROOTFS_PART \
+        FLASH_ADDR \
         H3C_DEVICE_ID \
         H3C_PRODUCT_ID \
        LINKSYS_HEADER \