[PATCH] Makefile: doesn't need check stack size when dtb is not built
AKASHI Takahiro
takahiro.akashi at linaro.org
Wed Mar 4 07:54:51 CET 2020
The commit 5fed97af20da ("Makefile: ensure DTB doesn't overflow into
initial stack") adds an extra check for stack size in BSS if
CONFIG_SYS_INIT_SP_BSS_OFFSET is enabled.
This check, however, doesn't make sense under the configuration where
control dtb won't be built in and it should be void in such cases.
Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
Fixes: 5fed97af20da ("Makefile: ensure DTB doesn't overflow into
initial stack")
---
Makefile | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0af89e0a7881..78efd7e9e250 100644
--- a/Makefile
+++ b/Makefile
@@ -1208,7 +1208,10 @@ binary_size_check: u-boot-nodtb.bin FORCE
fi \
fi
-ifdef CONFIG_INIT_SP_RELATIVE
+ifeq ($(CONFIG_INIT_SP_RELATIVE),y)
+ifneq ($(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),)
+# u-boot.dtb will be built only if one of those options is enabled
+
ifneq ($(CONFIG_SYS_MALLOC_F_LEN),)
subtract_sys_malloc_f_len = space=$$(($${space} - $(CONFIG_SYS_MALLOC_F_LEN)))
else
@@ -1233,6 +1236,10 @@ init_sp_bss_offset_check: u-boot.dtb FORCE
echo "(CONFIG_SYS_INIT_SP_BSS_OFFSET - CONFIG_SYS_MALLOC_F_LEN)" >&2 ; \
exit 1 ; \
fi
+else
+init_sp_bss_offset_check:
+
+endif
endif
u-boot-nodtb.bin: u-boot FORCE
--
2.25.1
More information about the U-Boot
mailing list