From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 21 Sep 2020 11:03:13 -0400 Subject: [PATCH] defconfig: espressobin: enable NET_RANDOM_ETHADDR In-Reply-To: <20200921133114.wojf5ndsr7j3emsr@pali> References: <20200908074259.63fai53pej72epm4@pali> <20200908125256.GH7259@bill-the-cat> <20200908223831.qzqzyqrdvybri6z5@pali> <20200911135505.4e902304@dellmb.labs.office.nic.cz> <1da8d6e3-dc10-2aa2-ce4f-26edf25bd74d@gmail.com> <20200911182204.56faff52@dellmb.labs.office.nic.cz> <20200921130522.ppypg7rfw32lekck@pali> <20200921152144.246a59d9@nic.cz> <20200921133114.wojf5ndsr7j3emsr@pali> Message-ID: <20200921150313.GL14816@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Sep 21, 2020 at 03:31:14PM +0200, Pali Roh?r wrote: > On Monday 21 September 2020 15:21:44 Marek Behun wrote: > > On Mon, 21 Sep 2020 15:05:22 +0200 > > Pali Roh?r 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. If the random address that U-Boot generates is NOT being sent to the kernel, that's a bug to go and fix. That's not usually the case for random MAC addresses generated in U-Boot. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: