Add 'ethaddr' and 'eth1addr' to the Linux kernel environment if
they are set in the U-Boot environment.

Signed-off-by: Jason McMullan <[EMAIL PROTECTED]>
---
 lib_mips/bootm.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c
index f813fc5..8fe3782 100644
--- a/lib_mips/bootm.c
+++ b/lib_mips/bootm.c
@@ -54,6 +54,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, 
char *argv[],
        char    *commandline = getenv ("bootargs");
        char    env_buf[12];
        int     ret;
+       const char *cp;
 
        /* find kernel entry point */
        if (images->legacy_hdr_valid) {
@@ -113,6 +114,16 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int 
argc, char *argv[],
        sprintf (env_buf, "0x%X", (uint) (gd->bd->bi_flashsize));
        linux_env_set ("flash_size", env_buf);
 
+       cp = getenv("ethaddr");
+       if (cp != NULL) {
+               linux_env_set("ethaddr", cp);
+       }
+
+       cp = getenv("eth1addr");
+       if (cp != NULL) {
+               linux_env_set("eth1addr", cp);
+       }
+
        if (!images->autostart)
                return ;
 
-- 
1.5.4.3


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to