Skip to content

Commit

Permalink
bootvx: get mac address from environment
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <[email protected]>
CC: Niklaus Giger <[email protected]>
CC: Ben Warren <[email protected]>
  • Loading branch information
vapier authored and wdenx committed Mar 20, 2009
1 parent de2dff6 commit 62c93d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/cmd_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62c93d9

Please sign in to comment.