summaryrefslogtreecommitdiff
path: root/lib_mips
diff options
context:
space:
mode:
authorJason McMullan <mcmullan@netapp.com>2008-06-08 23:56:00 -0400
committerShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2008-07-08 22:31:31 +0900
commite7c374529c87525c9aa463e0557c287887ae4e9e (patch)
treee27ebd70738d4a1fb94e9f60cf65d0890bb729e8 /lib_mips
parentc956717ab25c962ef49d49064dfc73f4edcba1fb (diff)
mips: When booting Linux images, add 'ethaddr' and 'eth1addr' to the environment
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>
Diffstat (limited to 'lib_mips')
-rw-r--r--lib_mips/bootm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c
index f813fc58310..8fe3782b758 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 ;