mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
bootvx: get mac address from environment
Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Niklaus Giger <niklaus.giger@member.fsf.org> CC: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
de2dff6ff8
commit
62c93d92f1
1 changed files with 4 additions and 2 deletions
|
@ -131,10 +131,12 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
|
||||
#if defined(CONFIG_WALNUT)
|
||||
tmp = (char *) CONFIG_SYS_NVRAM_BASE_ADDR + 0x500;
|
||||
memcpy ((char *) tmp, (char *) &gd->bd->bi_enetaddr[3], 3);
|
||||
eth_getenv_enetaddr("ethaddr", build_buf);
|
||||
memcpy(tmp, &build_buf[3], 3);
|
||||
#elif defined(CONFIG_SYS_VXWORKS_MAC_PTR)
|
||||
tmp = (char *) CONFIG_SYS_VXWORKS_MAC_PTR;
|
||||
memcpy ((char *) tmp, (char *) &gd->bd->bi_enetaddr[0], 6);
|
||||
eth_getenv_enetaddr("ethaddr", build_buf);
|
||||
memcpy(tmp, build_buf, 6);
|
||||
#else
|
||||
puts ("## Ethernet MAC address not copied to NV RAM\n");
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue