How to add eth1 to test device tree?

Ehsan Mohandesi emohandesi at linux.microsoft.com
Mon Mar 27 21:58:31 CEST 2023


Hi All,

When running the sandbox tests, I want to know how to enable eth1 in 
order to be able to test network features.

The following command is used to run sandbox tests.

./test/py/test.py -k testname.py

I am specifically interested in running the network tests.

./test/py/test.py -k test_net.py

These Python tests use test.dts device tree which does not have eth1 in 
it. I can replace the test.dts file with sandbox.dts to enable eth1 and 
run the network tests; however, I think there should be a better way to 
do it.

Can anyone help me with this issue?

When running U-Boot, the -T option could be used to tell it to use the 
test.dts or -D to use sandbox.dts; however, there is no such option when 
running test.py.

Eth1 is needed in order to enable the network. Enabling the sandbox 
network is explained after line 250 in doc/arch/sandbox.rst.

For more information, the following is the list of network interfaces 
when each device tree is used.

**

*arch/sandbox/dts/sandbox.dts**
*Net:   eth0: host_lo, *eth1: host_eth0*, eth2: host_br1, eth3: eth at 10002000

*arch/sandbox/dts/test.dts*

Net:   eth0: eth at 10002000, eth5: eth at 10003000, eth3: sbe5, eth6: 
eth at 10004000, eth4: dsa-test-eth, eth2: lan0, eth7: lan1



More information about the U-Boot mailing list