All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Errors when starting sandbox
Date: Thu, 18 Oct 2018 19:43:44 -0600	[thread overview]
Message-ID: <CAPnjgZ1VkGfcXSZ1hA5YN+WcZw=UbtskxTTcuBWFqA0-fGmdpQ@mail.gmail.com> (raw)
In-Reply-To: <CANr=Z=bn5_ft7cFmyUvro7PfU=i=-Tbag6ATM3c_swDL+N_wuw@mail.gmail.com>

Hi Joe,

On 1 October 2018 at 16:01, Joe Hershberger <joe.hershberger@ni.com> wrote:
>
> On Mon, Oct 1, 2018 at 4:27 PM, Simon Glass <sjg@chromium.org> wrote:
> > Hi Joe,
> >
> > On 1 October 2018 at 15:14, Joe Hershberger <joe.hershberger@ni.com> wrote:
> >>
> >> Hi Simon,
> >>
> >> On Mon, Oct 1, 2018 at 12:32 PM, Simon Glass <sjg@chromium.org> wrote:
> >> > Hi Joe,
> >> >
> >> > When I start sandbox now I see these errors every time. It is possible
> >> > to fix this?
> >> >
> >> > $ u-boot -D
> >> > ...
> >> > Warning: host_lo MAC addresses don't match:
> >> > Address in ROM is          ea:06:97:67:f4:b6
> >> > Address in environment is  00:00:11:22:33:44
> >> >
> >> > Warning: host_eth0 MAC addresses don't match:
> >> > Address in ROM is          ea:06:97:67:f4:b6
> >> > Address in environment is  00:00:11:22:33:45
> >> >
> >> > Warning: host_enp0s31f6 using MAC address from ROM
> >> >
> >> > Warning: host_eth6 MAC addresses don't match:
> >> > Address in ROM is          ea:06:97:67:f4:b6
> >> > Address in environment is  00:00:11:22:33:46
> >> >
> >> > Warning: host_docker_gwbridge using MAC address from ROM
> >> >
> >> > Warning: host_docker0 MAC addresses don't match:
> >> > Address in ROM is          ca:07:52:28:25:66
> >> > Address in environment is  00:00:11:22:33:47
> >> >
> >> > Warning: host_veth1f6bcd2 using MAC address from ROM
> >>
> >> These are warnings based on commit b96ced9cdb6 (sandbox: eth-raw: Make
> >> random MAC addresses available to eth-raw). Because we don't know the
> >> number of interfaces that exist on the given host when we write the
> >> sandbox.dts, we override the MAC addresses with random ones. In the
> >> normal case (real hardware), we would warn, since the hardware should
> >> know its interfaces.
> >>
> >> Do you have a proposed different approach? I don't like the idea of
> >> adding sandbox checks in the core code that prints this warning, and
> >> it also doesn't seem like a great idea to add a hook that doesn't warn
> >> just for sandbox.
> >>
> >> I'm happy to work on this, but I didn't address it at the time because
> >> I didn't see a clear way to do it that didn't degrade the code in
> >> order to remove warnings in sandbox.
> >
> > Can we make it so that the addresses do actually match in sandbox?
>
> The issue is that the eth(N)?addr lives in the default env and the
> interfaces are discovered by drivers/net/sandbox-raw-bus.c. Currently
> we make sure we don't "run out" of addresses defined in the env by
> using a randomly generated one instead. Unfortunately, the env is
> shared with all modes of sandbox, so while the addresses are not
> shared when running sandbox.dts, they are required when running
> test.dts.
>
> Thoughts?
>

How about a device-tree property that is only present in the test DT,
to control the behaviour?

Regards,
Simon

      reply	other threads:[~2018-10-19  1:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 17:32 [U-Boot] Errors when starting sandbox Simon Glass
2018-10-01 21:14 ` Joe Hershberger
2018-10-01 21:27   ` Simon Glass
2018-10-01 22:01     ` Joe Hershberger
2018-10-19  1:43       ` Simon Glass [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='CAPnjgZ1VkGfcXSZ1hA5YN+WcZw=UbtskxTTcuBWFqA0-fGmdpQ@mail.gmail.com' \
    --to=sjg@chromium.org \
    --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 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.