public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] question regarding generic board.c
@ 2011-12-15 10:02 Andreas Bießmann
  2011-12-27  5:20 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Bießmann @ 2011-12-15 10:02 UTC (permalink / raw)
  To: u-boot

Hi all,

I encountered a compile warning in avr32 which lead me to the fact that
every board.c utilizes these three lines:

---8<---
#if defined(CONFIG_CMD_NET)
	s = getenv("bootfile");
	if (s)
		copy_filename(BootFile, s, sizeof(BootFile));
#endif
--->8---

I know there is currently some effort to move the common stuff out of
the respective board.c files and this part would be one of these. But I
wonder if this specific part shouldn't move into the network framework.
The BootFile is declared in net/ and is only required if some ethernet
device is attached. The ethernet stuff will be initialized by
eth_initialize(), this could be one place for setting BootFile initial
but maybe there are better places.

Any comments?

best regards

Andreas Bie?mann

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

* [U-Boot] question regarding generic board.c
  2011-12-15 10:02 [U-Boot] question regarding generic board.c Andreas Bießmann
@ 2011-12-27  5:20 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2011-12-27  5:20 UTC (permalink / raw)
  To: u-boot

Hi Andreas,

On Thu, Dec 15, 2011 at 2:02 AM, Andreas Bie?mann
<andreas.devel@googlemail.com> wrote:
> Hi all,
>
> I encountered a compile warning in avr32 which lead me to the fact that
> every board.c utilizes these three lines:
>
> ---8<---
> #if defined(CONFIG_CMD_NET)
> ? ? ? ?s = getenv("bootfile");
> ? ? ? ?if (s)
> ? ? ? ? ? ? ? ?copy_filename(BootFile, s, sizeof(BootFile));
> #endif
> --->8---
>
> I know there is currently some effort to move the common stuff out of
> the respective board.c files and this part would be one of these. But I
> wonder if this specific part shouldn't move into the network framework.
> The BootFile is declared in net/ and is only required if some ethernet
> device is attached. The ethernet stuff will be initialized by
> eth_initialize(), this could be one place for setting BootFile initial
> but maybe there are better places.
>
> Any comments?

Well arguably we could create a net function to do this and call it
from each board. However I hope to reduce the number of board files to
one soon so this might not be worthwhile (although of course I may
fail in which case it might be :-)

I hope to complete an RFC series for ARM and x86 in the next few days.

Regards,
Simon

>
> best regards
>
> Andreas Bie?mann

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

end of thread, other threads:[~2011-12-27  5:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-15 10:02 [U-Boot] question regarding generic board.c Andreas Bießmann
2011-12-27  5:20 ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox