Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2023 21:09:31 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        "Patrick M. Hausen" <pmh@hausen.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Getting a stable MAC address for a RPI CM3+ with ue0 interface
Message-ID:  <38325594-6F01-4E43-86A9-D3C92A5151B7@yahoo.com>
In-Reply-To: <6a842b75-c9ea-d697-c223-c2d8c5653d68@FreeBSD.org>
References:  <3C1032FF-B914-4863-8A03-759A8B4BE216@hausen.com> <77E70D30-8E7D-42DC-A041-3A783E1C6908@yahoo.com> <5205C76E-BAB4-4AB7-8A03-1E8A2D4353BB@hausen.com> <4C192A4E-8F53-4FE5-B1E3-836943F9A050@hausen.com> <cdddd5cf-c6a5-3a50-9688-8bb65f1c14ce@FreeBSD.org> <3306D438-576B-46A6-A124-1F1D803A2236@hausen.com> <6a842b75-c9ea-d697-c223-c2d8c5653d68@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 20, 2023, at 19:35, Kyle Evans <kevans@FreeBSD.org> wrote:

> On 9/20/23 15:13, Patrick M. Hausen wrote:
>> Hi,
>>> Am 20.09.2023 um 22:08 schrieb Kyle Evans <kevans@FreeBSD.org>:
>>> Can you dump the running FDT on this machine and send it our way? It =
may be that it sets a local-mac-address somewhere sensible that we can =
just tap in a generally-not-ugly way.
>> Sure - how? ;-)
>=20
> You should be able to get a clean dump with, e.g.:
>=20
> sysctl -b hw.fdt.dtb | dtc -I dtb > current.dts

Much better than the old ofwdump that I suggested.
(My old powerpc* days are showing.)

I will note that if one wants to diff *.dts sources,
also having a -s (sort) option makes this much more
reasonable:

sysctl -b hw.fdt.dtb | dtc -I dtb -s > current_sorted.dts

(There may be some filtering of uninteresting lines
to avoid numbering differences that may not be of
interest.)

With this one can explore what different config.txt
changes mean for the .dtb used. For example, with and
without force_mac_address=3D... use can be compared.

Like the ofwdump suggestion, one only gets to see the
final live *.dtb content via the kernel's copy.  It
does not work for discovering what stages make what
changes.

For the RPi4B example ( -s ordering based ):

/dts-v1/;

/memreserve/ 0x0 0x1000;

/  {
. . .
        aliases {

                . . .
                ethernet0 =3D "/scb/ethernet@7d580000";
. . .
        chosen {

                . . .
                u-boot,version =3D "2023.01";
. . .
        psci {

                compatible =3D "arm,psci-0.2";
                method =3D "smc";
        };
. . .
        scb {
. . .=20
                ethernet@7d580000 {

                        . . .
                        compatible =3D "brcm,bcm2711-genet-v5";
                        . . .
                        local-mac-address =3D [?? ?? ?? ?? ?? ??];
. . .


=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?38325594-6F01-4E43-86A9-D3C92A5151B7>