
On Monday 21 September 2020 15:21:44 Marek Behun wrote:
On Mon, 21 Sep 2020 15:05:22 +0200 Pali Rohár pali@kernel.org wrote:
Moreover CONFIG_NET_RANDOM_ETHADDR introduce another issue. In case there is no valid mac address, U-Boot generates one. But it does not pass this generates mac address to kernel and therefore kernel generates another new random mac address.
I think it does :) At least on A3720, if the net controller has MAC address set by U-Boot, I think the same one will be used by kernel.
I mean the case when mac address is not already set in env. The case when CONFIG_NET_RANDOM_ETHADDR code configure mac address, when env variable is not set.
U-Boot set mac address into FDT file only from env.
turris_mox.c code calls eth_env_set_enetaddr() to set env with correct mac address.