From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] - save the server's mac address...
Date: Wed, 22 Jul 2009 23:05:09 -0700 [thread overview]
Message-ID: <4A67FD95.4030001@gmail.com> (raw)
In-Reply-To: <200907211215.28131.rgetz@blackfin.uclinux.org>
Robin,
Please keep in mind that the exact subject text becomes the changelog title:
" - save the server's mac address..."
looks pretty dumb. I took the liberty of cleaning it up.
Robin Getz wrote:
> On Tue 21 Jul 2009 02:37, Ben Warren pondered:
>
>> Can you please re-submit using git tools?
>>
>
> From: Robin Getz <rgetz@blackfin.uclinux.org>
>
> 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 env 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)
>
> Signed-of-by: Robin Getz <rgetz@blackfin.uclinux.org>
>
> -----
>
>
Please create the patch using git tools, 'git format-patch' in
particular. It takes care of generating nice lines with three hyphens.
This one that you've created messes things up.
> diff --git a/README b/README
> index 4c74cb7..9071472 100644
> --- a/README
> +++ b/README
> @@ -1184,6 +1184,11 @@ The following options need to be configured:
> Defines a default value for the IP address of a TFTP
> server to contact when using the "tftboot" command.
>
> + CONFIG_KEEP_SERVERADDR
> +
> + Keeps the server's MAC address, in the env 'serveraddr'
> + for passing to bootargs (like Linux's netconsole option)
> +
> - Multicast TFTP Mode:
> CONFIG_MCAST_TFTP
>
> diff --git a/net/net.c b/net/net.c
> index 7ce947d..641c37c 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -1287,6 +1287,15 @@ NetReceive(volatile uchar * inpkt, int len)
> /* 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);
>
Anti-climatically...
applied to net repo.
thanks,
Ben
prev parent reply other threads:[~2009-07-23 6:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A67FD95.4030001@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox