]> git.sur5r.net Git - u-boot/commitdiff
bootvx: get mac address from environment
authorMike Frysinger <vapier@gentoo.org>
Wed, 11 Feb 2009 23:51:43 +0000 (18:51 -0500)
committerWolfgang Denk <wd@denx.de>
Fri, 20 Mar 2009 21:39:10 +0000 (22:39 +0100)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Niklaus Giger <niklaus.giger@member.fsf.org>
CC: Ben Warren <biggerbadderben@gmail.com>
common/cmd_elf.c

index 19e12493a2fd6aca245140e5faa75850fd62dcae..4a3fff1e8609e02a5ab7bd6c7b0325aaae4d11ed 100644 (file)
@@ -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