Skip to contentSkip to conversation

net: nfs: Only link in NFS code outside of SPL builds

PATCH New Tom Rini 2 participants 2 messages Dec 6, 2019 – Dec 9, 2019 Networking

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 net: nfs: Only link in NFS code outside of SPL builds

While we have networking use cases within SPL we do not support loading files via NFS at this point in time. Disable calling nfs_start() so that the NFS related code can be garbage collected at link time.

Cc Joe Hershberger <[email protected]>
---
 net/net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/net.c +2 -2
index 0513444eb78f..9b6f80dc9a03 100644
@@ -308,7 +308,7 @@ U_BOOT_ENV_CALLBACK(dnsip, on_dnsip);
  */
 void net_auto_load(void)
 {
-#if defined(CONFIG_CMD_NFS)
+#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_SPL_BUILD)
 	const char *s = env_get("autoload");
 
 	if (s != NULL && strcmp(s, "NFS") == 0) {
@@ -496,7 +496,7 @@ restart:
 			ping_start();
 			break;
 #endif
-#if defined(CONFIG_CMD_NFS)
+#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_SPL_BUILD)
 		case NFS:
 			nfs_start();
 			break;
Signature · 1 line
2.17.1