net: move bootfile init into eth_initialize

All arches init this the same way, so move the logic into the core
net code to avoid duplicating it everywhere else.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
diff --git a/net/eth.c b/net/eth.c
index 35e0de6..d9a6430 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -245,6 +245,14 @@
 	return 0;
 }
 
+static void eth_env_init(bd_t *bis)
+{
+	const char *s;
+
+	if ((s = getenv("bootfile")) != NULL)
+		copy_filename(BootFile, s, sizeof(BootFile));
+}
+
 int eth_initialize(bd_t *bis)
 {
 	int num_devices = 0;
@@ -260,6 +268,8 @@
 	phy_init();
 #endif
 
+	eth_env_init(bis);
+
 	/*
 	 * If board-specific initialization exists, call it.
 	 * If not, call a CPU-specific one