1
0
Fork 0
remarkable-uboot/net
Enric Balletbo i Serra 23a70bf9c3 net/net.c: Update ipaddr if the environment has changed
At least on ARM the ipaddr is only set in board_init_r function. The
problem is if ipaddr is not defined in environment importing another
environment defined don't update the ipaddr value.

For example, suppose we've a default environment without net variables
defined and we want to import an uEnv.txt environment from SD-card like
this:

  ipaddr=192.168.2.240
  netmask=255.255.255.0
  gatewayip=192.168.2.1
  serverip=192.168.2.114

Then if you try boot from NFS results in:

  Importing environment from mmc ...
  Running uenvcmd ...
  smc911x: detected LAN9221 controller
  smc911x: phy initialized
  smc911x: MAC ac🇩🇪48:00:00:00
  *** ERROR: `ipaddr' not set

The ipaddr at this point is NULL beacause is only set at board_init_r
function. This patch updates the ipaddr value if the environment has
changed.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-06-01 22:17:49 +02:00
..
Makefile Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
bootp.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
bootp.h net: express the first argument to NetSetTimeout() in milliseconds 2008-10-18 21:54:00 +02:00
dns.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
dns.h Add DNS support 2009-07-22 22:53:44 -07:00
eth.c Create PHY Lib for U-Boot 2011-04-20 15:09:19 -05:00
net.c net/net.c: Update ipaddr if the environment has changed 2011-06-01 22:17:49 +02:00
nfs.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
nfs.h nfs: accept CONFIG_NFS_READ_SIZE from config file 2009-08-25 13:35:54 -07:00
rarp.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
rarp.h Initial revision 2002-07-20 20:14:13 +00:00
sntp.c NET: pass source IP address to packet handlers 2011-05-12 19:38:19 +02:00
sntp.h * Patch by Masami Komiya, 30 Mar 2005: 2005-04-01 00:25:43 +00:00
tftp.c net/tftp.c: fix typo 2011-05-19 21:38:38 +02:00
tftp.h TFTP: net/tftp.c: add server mode receive 2011-05-19 21:38:26 +02:00