]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mips: When booting Linux images, add 'ethaddr' and 'eth1addr' to the environment
authorJason McMullan <mcmullan@netapp.com>
Mon, 9 Jun 2008 03:56:00 +0000 (23:56 -0400)
committerShinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Tue, 8 Jul 2008 13:31:31 +0000 (22:31 +0900)
Add 'ethaddr' and 'eth1addr' to the Linux kernel environment if
they are set in the U-Boot environment.

Signed-off-by: Jason McMullan <mcmullan@netapp.com>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
lib_mips/bootm.c

index f813fc583100a9a15a3e1dc6fe1cea21a8d8ef2d..8fe3782b758318cfee5c2408dfab5c6e2e55f96d 100644 (file)
@@ -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 ;