Re: 13.1R problems on Pi3

From: Mark Millard <marklmi_at_yahoo.com>
Date: Wed, 06 Jul 2022 01:00:55 UTC

On 2022-Jul-5, at 17:27, bob prohaska <fbsd@www.zefox.net> wrote:

> On Mon, Jul 04, 2022 at 01:29:59PM -0700, Mark Millard wrote:
>> [This ends with a possible config.txt way to control the
>> default Ether MAC address used, independent of which OS
>> happens to be running. Possibly better than using the
>> only-FreeBSD technique.]
>> 
>> 
>> Did you get the two RPi3*'s in the same purchase? Ending up with
>> 2 that both happen to have b8:27:eb:71:46:4e seems odd unless
>> possibly the means of setting the values at the factory was
>> not varying the values like it should in some production lot (or
>> over some range of lots). Independent purchases at different
>> times would make it seem even odder.
>> 
> Oddness won this round. They were bought in 2016 and 2018

Wow. Technically that means the two RPi3* serial numbers
should be of the pattern:

??:71:46:4e

with the ?? part being different. (I might have the
ordering wrong.)

Such matches is part of why the RPi4B's no longer use
part of the serial number to form the MAC address.

>> 
>> 
>> I've found references to an undocumented control in config.txt :
>> 
>> force_mac_address=??:??:??:??:??:??
>> 
>> See, for example, https://forums.raspberrypi.com/viewtopic.php?t=327562
>> 
>> Apparently, force_mac_address controls what value shows up in
>> the device tree for what the ethernet0 alias points to in the
>> device tree.
>> 
>> Note that having a odd .dtb file could lead to force_mac_address
>> not working. (The RPi* firmware reads the file and then makes
>> a device tree with some modifications applied.)
>> 
> 
> With the files on the 13.1R image force_mac_address seems to work.
> 

Cool. One advantage of force_mac_address is that all activity
gets the address assigned. Doing such assignment just in
FreeBSD's /etc/rc.conf means that any Ethernet activity from
any of the below would use the bad MAC address for the machine:

RPi* EEPROM/firmware
U-Boot or EDK2 UEFI/ACPI
FreeBSD loader

It is definitely the kind of assignment where earlier is better.
That makes the force_mac_address in config.txt for the RPi*
firmware to use the best place: everything later uses the
definition as well.

===
Mark Millard
marklmi at yahoo.com