02. Enabling networking on iMX93

Notice that the FRDM-iMX93 has two Ethernet ports. But if you boot your previous Buildroot distro and try to see the available network: ip link show, notice that they are missing. Instead, you'll only have the loopback interface lo.

In this task, you will have to debug the problem and try to fix it or at least find a workaround that lets you use your network interface.

Here are a few suggestions to get you started:

  • Investigate your kernel's Device Tree Blob (dtb) and search for the ethernet node
    • You can use the Device Tree Compiler tool dtc to convert between dtb and dts formats
    • dtc is compiled automatically with Linux and can be found at linux/scripts/dtc/dtc
    • Alternatively, it is packaged as dtc on Arch or device-tree-compiler on Ubuntu
  • Use dmesg to view the kernel's boot log and search for any relevant messages
    • grep -rn parts of any interesting message in the kernel's source to determine the context
    • If you've compiled the kernel already, you can run ./scripts/clang-tools/gen_compile_commands.py and it will generate a compile_commands.json file. This file can be used by your language server to allow you to *go to definition* or highlight code sections included in #ifdefs.
  • Try to identify the driver responsible for our network controller
    • Remember that on ARM, drivers are matched to devices based on their compatible string from the DTB
    • The driver must also have at least one of these strings written in its source files.

Once you are done, enable the iperf3, iproute2 and ethtool network packages in Buildroot and build them. The compilation should not take more than 1-2 minutes. Re-generate linux.itb and copy it to the board's eMMC.

Connect to a colleague's board with an Ethernet cable.
Use the ip command to add a static IP to your network interface (man ip-address).
Then, use the iperf3 tool to test the throughput and compare it to what ethtool advertises.
Why is it not a full 1Gbps?

Hint #1

Hint #1

This line from dmesg tells us why the Network Interface Controller (NIC) remains unavailable.

[   12.004678] platform 42890000.ethernet: deferred probe pending: platform: wait for supplier /soc@0/efuse@47510000/mac-address@4ec

Hint #2

Hint #2

The driver can be found at linux/drivers/net/ethernet/freescale/fec_main.c.
There, the fec_get_mac() function will tell you how the driver gets the NIC's MAC address.
Try to provide it via another means, other than through the eFuse protected by the EdgeLink Enclave (that doesn't work).

Hint #3

Hint #3

In linux/net/ethernet/eth.c look at the comments of the fwnode_get_mac_address() function.
This will give you some alternatives for the nvmem-cells and nvmem-cell-names properties that block the driver initialization.
Try spoofing the MAC address of some vendor.

ass/labs-2025/03/tasks/02.txt ยท Last modified: 2025/08/06 18:03 by radu.mantu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0