Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2023 14:06:57 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        "Patrick M. Hausen" <pmh@hausen.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Getting a stable MAC address for a RPI CM3+ with ue0 interface
Message-ID:  <2093E18F-3F37-4C0B-8A73-2E85A631E30E@yahoo.com>
In-Reply-To: <5205C76E-BAB4-4AB7-8A03-1E8A2D4353BB@hausen.com>
References:  <3C1032FF-B914-4863-8A03-759A8B4BE216@hausen.com> <77E70D30-8E7D-42DC-A041-3A783E1C6908@yahoo.com> <5205C76E-BAB4-4AB7-8A03-1E8A2D4353BB@hausen.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 20, 2023, at 12:05, Patrick M. Hausen <pmh@hausen.com> wrote:

> Hi!

Hello.

>=20
>> 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=3D327562 =
:
>>=20
>> QUOTE
>> Re: /boot/cmdline.txt help
>> Thu Jan 13, 2022 8:35 am
>>=20
>> And on all Pis you can use the config.txt setting =
"force_mac_address":
>>=20
>> force_mac_address=3Daa:bb:cc:dd:ee:ff
>> END QUOTE
>>=20
>> That makes the live dtb match and is the earliest assignment
>> available, before any external visability.
>=20
>=20
> 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=3D1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> =
metric 0 mtu 1500
> options=3D80009<RXCSUM,VLAN_MTU,LINKSTATE>
> ether 5e:2f:31:ef:bc:b4
>=20
> root@generic:~ # cat /boot/efi/config.txt=20
> [all]
> arm_64bit=3D1
> dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don
> dtoverlay=3Dmmc
> dtoverlay=3Ddisable-bt
> device_tree_address=3D0x4000
> kernel=3Du-boot.bin
> force_mac_address=3Db8:27:eb:09:cb:7d
>=20
> In that thread you cited PhilE also wrote:
>=20
>> 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????=20
U-Boot> fdt print /      =20
/ {
. . .

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.



=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2093E18F-3F37-4C0B-8A73-2E85A631E30E>