Re: Getting a stable MAC address for a RPI CM3+ with ue0 interface
Date: Wed, 20 Sep 2023 21:06:57 UTC
On Sep 20, 2023, at 12:05, Patrick M. Hausen <pmh@hausen.com> wrote: > Hi! Hello. > >> Am 20.09.2023 um 20:25 schrieb Mark Millard <marklmi@yahoo.com>: >> Quoting a post from a "Raspberry Pi Engineer & Forum Moderator" >> (PhilE) from https://forums.raspberrypi.com/viewtopic.php?t=327562 : >> >> QUOTE >> Re: /boot/cmdline.txt help >> Thu Jan 13, 2022 8:35 am >> >> And on all Pis you can use the config.txt setting "force_mac_address": >> >> force_mac_address=aa:bb:cc:dd:ee:ff >> END QUOTE >> >> That makes the live dtb match and is the earliest assignment >> available, before any external visability. > > > No worky. Too bad. https://lists.freebsd.org/archives/freebsd-arm/2022-July/001517.html is a message indicating successful use on two RPI3*'s that had the same default MAC address, forcing one to be distinct: QUOTE With the files on the 13.1R image force_mac_address seems to work. END QUOTE I will note that no special U-Boot/FreeBSD-loader/FreeBSD-kernel context or update was needed. > root@generic:~ # ifconfig ue0 > ue0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 > options=80009<RXCSUM,VLAN_MTU,LINKSTATE> > ether 5e:2f:31:ef:bc:b4 > > root@generic:~ # cat /boot/efi/config.txt > [all] > arm_64bit=1 > dtparam=audio=on,i2c_arm=on,spi=on > dtoverlay=mmc > dtoverlay=disable-bt > device_tree_address=0x4000 > kernel=u-boot.bin > force_mac_address=b8:27:eb:09:cb:7d > > In that thread you cited PhilE also wrote: > >> With the right overlay and a supporting Ethernet driver it could be made to change the MAC address of any >> single interface - it depends on where the ethernet0 alias points to. It might be worth figuring out if the ethernet0 alias exists and what it points to (if it exists). The overall boot sequence reports the fdt addr in use for one or more live dtb's. Rebooting and stopping in U-Boot one can capture: U-Boot> fdt addr 0x???? U-Boot> fdt print / / { . . . if one has a serial console environment that can record the output that shows the live dtb. Technically, with appropriate RPi*debugging output enabled, as I remember, U-Boot can dump both of: A) The live dtb produced by the RPi* firmware (read by U-Boot) B) The later adjusted live dtb produced by U-Boot (read by the FreeBSD loader/kernel) (This is based on the live dtb's having addresses that are stable across reboots. So far that has been true in what I have observed.) > So do we possibly not have the "right overlay and supporting Ethernet driver"? Unsure. I've never had my hands on a CM* . > I'll go with static configuration for now to get this puppy up and running - still very interested in a proper solution. === Mark Millard marklmi at yahoo.com