All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC] - sanve the server's mac address...
@ 2009-07-08 18:50 Robin Getz
  2009-07-09 15:12 ` Robin Getz
  2009-07-13 20:19 ` [U-Boot] [PATCH] - save " Robin Getz
  0 siblings, 2 replies; 17+ messages in thread
From: Robin Getz @ 2009-07-08 18:50 UTC (permalink / raw)
  To: u-boot


Linux's netconsole works much better when you can pass it the MAC address of
the server. (otherwise it just uses broadcast, which everyone else on my
network complains about :)

This sets the evn var "serveraddr" (to match ethaddr), so that you can pass
it to linux with whatever bootargs you want to....

addnetconsole=set bootargs $(bootargs) netconsole=@$(ipaddr)/eth0,@$(serverip)/$(serveraddr)

I'm sure this is white space damaged - but you get the idea...

Index: net/net.c
===================================================================
--- net/net.c   (revision 1961)
+++ net/net.c   (working copy)
@@ -1273,6 +1273,15 @@
                        /* are we waiting for a reply */
                        if (!NetArpWaitPacketIP || !NetArpWaitPacketMAC)
                                break;
+
+#ifdef CONFIG_KEEP_SERVERADDR
+                       if (NetServerIP == NetArpWaitPacketIP) {
+                               char buf[20];
+                               sprintf(buf, "%pM", arp->ar_data);
+                               setenv("serveraddr", buf);
+                       }
+#endif
+
 #ifdef ET_DEBUG
                        printf("Got ARP REPLY, set server/gtwy eth addr (%pM)\n",
                                arp->ar_data)

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-07-23  6:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 18:50 [U-Boot] [RFC] - sanve the server's mac address Robin Getz
2009-07-09 15:12 ` Robin Getz
2009-07-09 15:26   ` Mike Frysinger
2009-07-09 19:45   ` Wolfgang Denk
2009-07-09 20:03     ` Robin Getz
2009-07-09 20:51       ` Wolfgang Denk
2009-07-09 21:13         ` Wolfgang Denk
2009-07-10  4:31       ` Ben Warren
2009-07-13 20:19 ` [U-Boot] [PATCH] - save " Robin Getz
2009-07-15 15:00   ` Mike Frysinger
2009-07-15 15:48     ` Robin Getz
2009-07-16 16:56     ` Ben Warren
2009-07-17 11:53       ` Robin Getz
2009-07-17 12:18         ` Wolfgang Denk
2009-07-21  6:37   ` Ben Warren
2009-07-21 16:15     ` Robin Getz
2009-07-23  6:05       ` Ben Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.