Hi Joe, On 26 June 2018 at 16:31, Joe Hershberger <[email protected]> wrote: > On Tue, Jun 26, 2018 at 6:18 PM, Simon Glass <[email protected]> wrote: >> Hi Joe, >> >> On 26 June 2018 at 14:19, Joe Hershberger <[email protected]> wrote: >>> With systemd stable interface names, eth0 will almost never exist. >>> Instead of using that name in the sandbox.dts, use index 2 (the first >>> interface after "lo"). Enumerate the interfaces on the system to choose >>> a valid interace name. >>> >>> Signed-off-by: Joe Hershberger <[email protected]> >>> --- >>> >>> arch/sandbox/cpu/eth-raw-os.c | 28 ++++++++++++++++++++++++++++ >>> arch/sandbox/dts/sandbox.dts | 2 +- >>> arch/sandbox/include/asm/eth-raw-os.h | 4 +++- >>> drivers/net/sandbox-raw.c | 8 +++++++- >>> 4 files changed, 39 insertions(+), 3 deletions(-) >>> >> >> This seems brittle too. A name seems better to me. I might be missing >> something though. Can we ask the OS for a name, etc? > > This asks for the equivalent of "eth0", but asks the OS to tell us the > actual name. I don't know that we can possibly choose the correct > network interface to use across any machine configuration. Choosing > the first one, whatever it's name is, seems like a pretty reliable way > to get a good interface in most cases.
OK well let's see how it works out. Reviewed-by: Simon Glass <[email protected]> Regards, Simon _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

