diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-11 18:51:43 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-20 22:39:10 +0100 |
commit | 62c93d92f1b6266b2f33c5f403931b51cbd2a246 (patch) | |
tree | 0411102e6f6c767ad8200bdb4a94523b632b9905 /common/cmd_elf.c | |
parent | de2dff6ff89f98c6062f4d224fd434a3ede035d1 (diff) | |
download | u-boot-imx-62c93d92f1b6266b2f33c5f403931b51cbd2a246.zip u-boot-imx-62c93d92f1b6266b2f33c5f403931b51cbd2a246.tar.gz u-boot-imx-62c93d92f1b6266b2f33c5f403931b51cbd2a246.tar.bz2 |
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>
Diffstat (limited to 'common/cmd_elf.c')
-rw-r--r-- | common/cmd_elf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/cmd_elf.c b/common/cmd_elf.c index 19e1249..4a3fff1 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -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 |