[U-Boot] [PATCH] mvebu: turris_omnia: Only set eth?addr env if CONFIG_CMD_NET

Marek BehĂșn marek.behun at nic.cz
Sun Sep 3 13:13:42 UTC 2017


Otherwise the linking will fail since eth_env_set_enetaddr cannot
be found.

Signed-off-by: Marek Behun <marek.behun at nic.cz>
---
 board/CZ.NIC/turris_omnia/turris_omnia.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index af66837909..7db3b8ff3b 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -470,6 +470,7 @@ out:
 	return 0;
 }
 
+#if defined(CONFIG_ATSHA204A) && defined(CONFIG_CMD_NET)
 static void increment_mac(u8 *mac)
 {
 	int i;
@@ -480,10 +481,11 @@ static void increment_mac(u8 *mac)
 			break;
 	}
 }
+#endif
 
 int misc_init_r(void)
 {
-#ifdef CONFIG_ATSHA204A
+#if defined(CONFIG_ATSHA204A) && defined(CONFIG_CMD_NET)
 	int err;
 	struct udevice *dev = get_atsha204a_dev();
 	u8 mac0[4], mac1[4], mac[6];
-- 
2.13.5



More information about the U-Boot mailing list