mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-10 12:39:22 -04:00
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>
This commit is contained in:
parent
c956717ab2
commit
e7c374529c
@ -54,6 +54,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
|
|||||||
char *commandline = getenv ("bootargs");
|
char *commandline = getenv ("bootargs");
|
||||||
char env_buf[12];
|
char env_buf[12];
|
||||||
int ret;
|
int ret;
|
||||||
|
const char *cp;
|
||||||
|
|
||||||
/* find kernel entry point */
|
/* find kernel entry point */
|
||||||
if (images->legacy_hdr_valid) {
|
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));
|
sprintf (env_buf, "0x%X", (uint) (gd->bd->bi_flashsize));
|
||||||
linux_env_set ("flash_size", env_buf);
|
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)
|
if (!images->autostart)
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user