aboutsummaryrefslogtreecommitdiffstats
path: root/packages/u-boot/u-boot-1.3.2/boc01/012-081209-BUG_SETENV.patch
blob: 7c5b2e21235ee5dcb273f7ffe38981525a595089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: u-boot-1.3.2/common/cmd_nvedit.c
===================================================================
--- u-boot-1.3.2.orig/common/cmd_nvedit.c	2008-12-09 16:40:17.000000000 +0100
+++ u-boot-1.3.2/common/cmd_nvedit.c	2008-12-09 16:40:49.000000000 +0100
@@ -353,6 +353,21 @@
 		return 0;
 	}
 
+#if defined(CONFIG_HAS_ETH1)
+	if (strcmp(argv[1],"eth1addr") == 0) {
+		char *s = argv[2];	/* always use only one arg */
+		char *e;
+		for (i=0; i<6; ++i) {
+			bd->bi_enet1addr[i] = s ? simple_strtoul(s, &e, 16) : 0;
+			if (s) s = (*e) ? e+1 : e;
+		}
+#ifdef CONFIG_NET_MULTI
+		eth_set_enetaddr(1, argv[2]);
+#endif
+		return 0;
+	}
+#endif
+
 	if (strcmp(argv[1],"ipaddr") == 0) {
 		char *s = argv[2];	/* always use only one arg */
 		char *e;