]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Makefile: Have binary_size_check report only first match of _image_binary_end
authorTom Rini <trini@konsulko.com>
Thu, 15 Jan 2026 22:19:31 +0000 (16:19 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 20 Jan 2026 16:19:24 +0000 (10:19 -0600)
If we have ASSERT macros that validate the position of
_image_binary_end, our awk expression will report a string that causes
the rest of our check to fail with garbage values. Have it exit after
the first match to fix this.

Signed-off-by: Tom Rini <trini@konsulko.com>
Makefile

index 50737f938503be9a25514cae730eb28423664fd2..37cebd4f8edd47c7cfb1d878be7988f863fb88dc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1583,7 +1583,7 @@ binary_size_check: u-boot-nodtb.bin FORCE
        map_size=$(shell cat u-boot.map | \
                awk ' \
                        /_image_copy_start/ { start = $$1 } \
-                       /_image_binary_end/ { end = $$1 } \
+                       /_image_binary_end/ { end = $$1;exit } \
                        END { \
                                if (start != "" && end != "") \
                                        print end " " start; \