summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-09-17 11:51:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-09-18 07:39:06 +0200
commit1c1292a1393996ce32aa59170c151acfe29d2784 (patch)
tree160c11d3d70ad9d372add8a6ce1d8c1daa8019f7
parent183d018fc35383676f8cd8c449ee2570a8233025 (diff)
downloadbarebox-1c1292a1393996ce32aa59170c151acfe29d2784.tar.gz
barebox-1c1292a1393996ce32aa59170c151acfe29d2784.tar.xz
ARM: omap: xload: Fix network boot filename
The dhcp code no longer exports the "bootfile" environment variable. It now uses global.dhcp.bootfile. Since global variable support is not necessarily part of the MLO we instead use struct dhcp_result * to get the bootfile information. Fixes: 528298b702 ("net: dhcp: rework") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Dennis Menschel <menschel-d@posteo.de>
-rw-r--r--arch/arm/mach-omap/xload.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index d8b1c9ee1c..bb58825dcf 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -236,6 +236,7 @@ static void *am33xx_net_boot(void)
char *file;
char ip4_str[sizeof("255.255.255.255")];
struct eth_device *edev;
+ struct dhcp_result *dhcp_res;
am33xx_register_ethaddr(0, 0);
@@ -248,12 +249,14 @@ static void *am33xx_net_boot(void)
return NULL;
}
- err = dhcp(edev, &dhcp_param);
+ err = dhcp_request(edev, &dhcp_param, &dhcp_res);
if (err) {
printf("dhcp failed\n");
return NULL;
}
+ dhcp_set_result(edev, dhcp_res);
+
/*
* Older tftp server don't send the file size.
* Then tftpfs needs temporary place to store the file.
@@ -276,7 +279,7 @@ static void *am33xx_net_boot(void)
return NULL;
}
- bootfile = getenv("bootfile");
+ bootfile = dhcp_res->bootfile;
if (!bootfile) {
printf("bootfile not found.\n");
return NULL;