[U-Boot] sandbox: Net: No ethernet found.

Hello Simon,
when I run sandbox_defconfig I always get Net: No ethernet found.
The dm command shows no driver attached to uclass 21: eth. Why are the sandbox and sandbox-raw drivers not loaded?
device_bind_common is not called for these drivers.
arch/sandbox/dts/sandbox.dts makes assumptions about the naming of interfaces:
host-raw-interface = "eth0"
With systemd eth0 tends not to exist. The interfaces on my Debian Buster system the interfaces are called lo, enp0s25, and wlp12s0.
Shouldn't we use if_nameindex() to enumerate the interfaces?
Best regards
Heinrich

Provide sandbox.dtb as default device tree for sandbox_defconfig.
We can use the dtb with
./u-boot -d u-boot.dtb
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- configs/sandbox_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 2fc84a16c9..3bdb97b7d3 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -19,6 +19,7 @@ CONFIG_PRE_CONSOLE_BUFFER=y CONFIG_PRE_CON_BUF_ADDR=0x100000 CONFIG_LOG_MAX_LEVEL=6 CONFIG_LOG_ERROR_RETURN=y +CONFIG_DEFAULT_FDT_FILE="sandbox.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_CMD_CPU=y CONFIG_CMD_LICENSE=y

Hi Heinrich,
On 15 June 2018 at 14:05, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Provide sandbox.dtb as default device tree for sandbox_defconfig.
We can use the dtb with
./u-boot -d u-boot.dtb
There is a -D flag for that. Also I think your commit message should distinguish between the U-Boot DT and the kernel DT.
Regards, Simon

Provide sandbox.dtb as default device tree for sandbox_defconfig.
We can use the dtb with
./u-boot -d u-boot.dtb
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- v2 adjust commit message --- configs/sandbox_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 2fc84a16c9..3bdb97b7d3 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -19,6 +19,7 @@ CONFIG_PRE_CONSOLE_BUFFER=y CONFIG_PRE_CON_BUF_ADDR=0x100000 CONFIG_LOG_MAX_LEVEL=6 CONFIG_LOG_ERROR_RETURN=y +CONFIG_DEFAULT_FDT_FILE="sandbox.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_CMD_CPU=y CONFIG_CMD_LICENSE=y

Hi Heinrich,
On 15 June 2018 at 14:06, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Provide sandbox.dtb as default device tree for sandbox_defconfig.
We can use the dtb with
./u-boot -d u-boot.dtb
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
v2 adjust commit message
configs/sandbox_defconfig | 1 + 1 file changed, 1 insertion(+)
I afraid I still don't understand the purpose of this patch. Can you please expand the commit message? Also please reference -D since that is supposed to provide the default DT.
Regards, Simon

On 07/15/2018 11:22 PM, Simon Glass wrote:
Hi Heinrich,
On 15 June 2018 at 14:06, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Provide sandbox.dtb as default device tree for sandbox_defconfig.
We can use the dtb with
./u-boot -d u-boot.dtb
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
v2 adjust commit message
configs/sandbox_defconfig | 1 + 1 file changed, 1 insertion(+)
I afraid I still don't understand the purpose of this patch. Can you please expand the commit message? Also please reference -D since that is supposed to provide the default DT.
Regards, Simon
With current master ./u-boot -D provides ethernet. So we don't this patch.
Regards
Heinrich

+Joe
On 15 June 2018 at 00:10, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Hello Simon,
when I run sandbox_defconfig I always get Net: No ethernet found.
The dm command shows no driver attached to uclass 21: eth. Why are the sandbox and sandbox-raw drivers not loaded?
device_bind_common is not called for these drivers.
arch/sandbox/dts/sandbox.dts makes assumptions about the naming of interfaces:
host-raw-interface = "eth0"
With systemd eth0 tends not to exist. The interfaces on my Debian Buster system the interfaces are called lo, enp0s25, and wlp12s0.
Shouldn't we use if_nameindex() to enumerate the interfaces?
Best regards
Heinrich

Hey Guys,
On Tue, Jun 19, 2018 at 5:03 PM, Simon Glass sjg@chromium.org wrote:
+Joe
On 15 June 2018 at 00:10, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Hello Simon,
when I run sandbox_defconfig I always get Net: No ethernet found.
The dm command shows no driver attached to uclass 21: eth. Why are the sandbox and sandbox-raw drivers not loaded?
device_bind_common is not called for these drivers.
arch/sandbox/dts/sandbox.dts makes assumptions about the naming of interfaces:
host-raw-interface = "eth0"
With systemd eth0 tends not to exist. The interfaces on my Debian Buster system the interfaces are called lo, enp0s25, and wlp12s0.
Shouldn't we use if_nameindex() to enumerate the interfaces?
Best regards
Heinrich
I sent out a patch set that fixes these issues,
Cheers, -Joe
participants (3)
-
Heinrich Schuchardt
-
Joe Hershberger
-
Simon Glass