Random eth MAC Address at every boot

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Fenix 1.1.1 Ubuntu 20.04.6 LTS Linux 5.18.0 installed from OOWOW

Please describe your issue below:

On my Edge-V, connected via ethernet, I get a new random MAC address every time the system reboots.
I followed this thread and tried all the proposed solutions, to no avail.

In the Ubuntu image I’m using there is no command fw_setenv, but the package u-boot-tools was preinstalled.
I tried installing libubootenv-tool and the command fw_setenv worked, but it kept responding “Configuration file wrong or corrupted” (even with fw_readenv).

The custom custom_ethmac in /boot/env.txt gets ignored.

I also tried to write an address in /etc/network/interfaces.d/eth0 using the same string as the one in env.txt, and that does not work either.

I don’t have access to U-boot, and I gladly would avoid going that way.

Is there a way to set the MAC address?
I’ll gladly write a documentation page on the matter, as I didn’t find anything in docs.khadas, if someone knows how to make it work.

Solved.

I created a file /etc/network/interfaces with the content

auto eth0
iface eth0 inet dhcp
  hwaddress ether xx:xx:xx:xx:xx:xx

using one of the randomly generated addresses.
No need for U-boot