Ethtool command on torizonCore6

Dear Toradex Support,

The ethtool is a command-line tool in Linux for managing network interface devices.

I am trying to use LAN7850 and in this step, I need to use the ethool command to setup EEPROM of the LAN module, Could you please let me know how I can install the package ethtool command in the imx8 mini SoM? Is it doable?

Thank you so much for any help.

Best regards,

ethtool commands -

    • Read - ethtool -e eth0 offset 0 length 512

Greetings @Mehrdad,

You are correct ethtool is not shipped with TorizonCore by default. As of this moment your options are too either re-build TorizonCore to add the ethtool utility. Or, you could install ethtool inside a container.

I did a quick test with a Debian based container that has --privileged and --network=host. With this it appears that ethtool can view the Ethernet devices on the host:

ethtool ethernet0
Settings for ethernet0:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: slave
        Port: Twisted Pair
        PHYAD: 7
        Transceiver: external
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d
        Link detected: yes

Though I’m not sure if this would be good enough, to configure your LAN device. It’s also obviously not as convienent as having ethtool out of the box on the host OS. Let me bring up the idea of adding ethtool to TorizonCore to our team here. Though for the time being you’ll need to work around this limitation.

Best Regards,


Dear @jeremias.tx ,

Thank you for your response using ethtool on TorizonCore. I appreciate your help on this matter.

I would like to follow up on your suggestion to install ethtool inside a container with the --privileged and --network=host options. However, I am not sure how to set up this container properly. Could you please provide me with instructions or resources on how to create a container with the necessary options to use ethtool on TorizonCore?

Thank you for your time and assistance.
Best regards,

It’s not too complicated, you just have to run a container like so:

docker run -it --privileged --net=host <whatever Debian based container image you want to use> bash

This should give you a terminal inside this Debian based container. From there you just treat it like normal Debian:

# Inside the container
$ apt update
$ apt install ethtool

Then that’s it you should have ethtool installed in this container and should be able to use it inside this container. Due to --net=host and --privileged, you should be able to access the host ethernet interface from inside the container.

Best Regards,

1 Like

Hi @Mehrdad !

Do you have any updates regarding this topic?

Best regards,

Hi @henrique.tx

I appreciate your follow-up. :pray:t3: After executing the command below, I was able to see the ethtool command.

Best regards,

Hello @Mehrdad , thanks for your feedback.
If the answer from @jeremias.tx solved your issue, can you please mark it as a solution?

Best regards,

1 Like