Skip to contentSkip to conversation

net: Handle disabling of compilation for SPL builds

PATCH New Nathan Rossi 2 participants 3 messages Jan 27, 2020 – Jan 28, 2020 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: Handle disabling of compilation for SPL builds

Whilst the net/ directory is excluded from libs-y when CONFIG_SPL_NET_SUPPORT is disabled, this does not prevent SPL builds trying to compile net/ objects. During SPL builds overwrite the value of CONFIG_NET with CONFIG_SPL_NET_SUPPORT to exclude compilation during SPL builds.

---
 net/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
net/Makefile +4 -0
index fef71b940a..0f57244015 100644
@@ -5,6 +5,10 @@
 
 #ccflags-y += -DDEBUG
 
+ifdef CONFIG_SPL_BUILD
+CONFIG_NET = $(CONFIG_SPL_NET_SUPPORT)
+endif
+
 obj-$(CONFIG_NET)      += arp.o
 obj-$(CONFIG_CMD_BOOTP) += bootp.o
 obj-$(CONFIG_CMD_CDP)  += cdp.o

---
2.24.1

#1 lore raw

PATCH 1/1 net: Handle disabling of compilation for SPL builds

Quoted 16 lines · Nathan Rossi

Whilst the net/ directory is excluded from libs-y when CONFIG_SPL_NET_SUPPORT is disabled, this does not prevent SPL builds trying to compile net/ objects. During SPL builds overwrite the value of CONFIG_NET with CONFIG_SPL_NET_SUPPORT to exclude compilation during SPL builds.

---
 net/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
net/Makefile +0 -0
index fef71b940a..0f57244015 100644

net/Makefile line 14

Quoted 10 lines
net/Makefile +4 -0
@@ -5,6 +5,10 @@
 
 #ccflags-y += -DDEBUG
 
+ifdef CONFIG_SPL_BUILD
+CONFIG_NET = $(CONFIG_SPL_NET_SUPPORT)
+endif
+
 obj-$(CONFIG_NET)      += arp.o
 obj-$(CONFIG_CMD_BOOTP) += bootp.o
 obj-$(CONFIG_CMD_CDP)  += cdp.o

This needs to be fixed the same way we have in other cases and that is for CONFIG_SPL_NET_SUPPORT to become CONFIG_SPL_NET and then Makefiles use 'obj-$(CONFIG_$(SPL_)NET) += ...' and so forth. Thanks!

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

PATCH 1/1 net: Handle disabling of compilation for SPL builds

Quoted 22 lines · Tom Rini
Quoted 19 lines · Nathan Rossi

Whilst the net/ directory is excluded from libs-y when CONFIG_SPL_NET_SUPPORT is disabled, this does not prevent SPL builds trying to compile net/ objects. During SPL builds overwrite the value of CONFIG_NET with CONFIG_SPL_NET_SUPPORT to exclude compilation during SPL builds.

---
 net/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
net/Makefile +0 -0
index fef71b940a..0f57244015 100644
@@ -5,6 +5,10 @@
 
 #ccflags-y += -DDEBUG
 
Quoted 11 lines

net/Makefile line 14

Quoted 7 lines
net/Makefile +4 -0
+ifdef CONFIG_SPL_BUILD
+CONFIG_NET = $(CONFIG_SPL_NET_SUPPORT)
+endif
+
 obj-$(CONFIG_NET)      += arp.o
 obj-$(CONFIG_CMD_BOOTP) += bootp.o
 obj-$(CONFIG_CMD_CDP)  += cdp.o

This needs to be fixed the same way we have in other cases and that is for CONFIG_SPL_NET_SUPPORT to become CONFIG_SPL_NET and then Makefiles use 'obj-$(CONFIG_$(SPL_)NET) += ...' and so forth. Thanks!

Will do, new series incoming.

Thanks,
Nathan