Skip to contentSkip to conversation

Makefile: doesn't need check stack size when dtb is not built

PATCH Superseded AKASHI Takahiro 3 participants 4 messages Mar 10, 2020 – Mar 13, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Makefile: doesn't need check stack size when dtb is not built

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.

Fixes 5fed97af20da ("Makefile: ensure DTB doesn't overflow into

initial stack")
---
v2:
* guard ALL-y += init_sp_bss_offset_check with simplified "if" condition

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index 0af89e0a7881..93931c3cb51b 100644
@@ -903,7 +903,7 @@ ifneq ($(CONFIG_BUILD_TARGET),)
 ALL-y += $(CONFIG_BUILD_TARGET:"%"=%)
 endif
 
-ifdef CONFIG_INIT_SP_RELATIVE
+ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy)
 ALL-y += init_sp_bss_offset_check
 endif
 
@@ -1208,7 +1208,7 @@ binary_size_check: u-boot-nodtb.bin FORCE
 		fi \
 	fi
 
-ifdef CONFIG_INIT_SP_RELATIVE
+ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy)
 ifneq ($(CONFIG_SYS_MALLOC_F_LEN),)
 subtract_sys_malloc_f_len = space=$$(($${space} - $(CONFIG_SYS_MALLOC_F_LEN)))
 else
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 Makefile: doesn't need check stack size when dtb is not built

Quoted 9 lines · AKASHI Takahiro

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.

Fixes 5fed97af20da ("Makefile: ensure DTB doesn't overflow into

initial stack")

It would be best if that line wasn't wrapped; that will make it easier for anyone searching for the commit description, since they won't have to know to search for a substring of the the description instead of the whole thing.

#2 lore raw

PATCH v2 1/1 Makefile: doesn't need check stack size when dtb is not built

Tom,

Quoted 7 lines · Stephen Warren
Quoted 6 lines · AKASHI Takahiro

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.

Quoted 7 lines
Quoted 3 lines
Fixes 5fed97af20da ("Makefile: ensure DTB doesn't overflow into

initial stack")

It would be best if that line wasn't wrapped; that will make it easier for anyone searching for the commit description, since they won't have to know to search for a substring of the the description instead of the whole thing.

Can you make this change for me when you merge this patch, please?

Quoted 1 line

Thanks,
-Takahiro Akashi

#3 lore raw

PATCH v2 1/1 Makefile: doesn't need check stack size when dtb is not built

In reply to AKASHI Takahiro
Quoted 9 lines · AKASHI Takahiro

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.

Fixes 5fed97af20da ("Makefile: ensure DTB doesn't overflow into initial stack")

(I undid the linewrap as requested)

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200313/f307ca82/attachment.sig>