[openwrt/openwrt] ath79: fix platform check image mikrotik nor

LEDE Commits lede-commits at lists.infradead.org
Fri Dec 5 01:27:03 PST 2025


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

commit 3a10dd596760ecebe5d8a5f3804bfe1d13f952ae
Author: Marcin Maj <marcinmajsc at gmail.com>
AuthorDate: Thu Dec 4 01:43:41 2025 +0100

    ath79: fix platform check image mikrotik nor
    
    Every attempt to update a device with NOR flash
    and RouterBOOT v6 resulted in the error:
    “RouterBOOT 6 and earlier requires ELF-in-YAFFS image.”
    The cause was that xargs did not fully remove whitespace,
    so the condition "$bootentry" != "kernel" always evaluated to true.
    
    Signed-off-by: Marcin Maj <marcinmajsc at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/21034
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
index 629e7fd9b8..67e8d77175 100644
--- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
@@ -6,7 +6,7 @@ REQUIRE_IMAGE_METADATA=1
 
 platform_check_image_mikrotik_nor() {
 	local bootfwver bootfwmajor
-	local bootentry="$(dd bs=10 skip=1 count=1 if="$1" 2>/dev/null | xargs -0)"
+	local bootentry="$(dd bs=10 skip=1 count=1 if="$1" 2>/dev/null | xargs)"
 
 	read -r bootfwver < /sys/firmware/mikrotik/hard_config/booter_version
 	bootfwmajor="${bootfwver%%.*}"




More information about the lede-commits mailing list