Re: Getting a stable MAC address for a RPI CM3+ with ue0 interface

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On Sep 20, 2023, at 19:35, Kyle Evans <[email protected]> wrote:

> On 9/20/23 15:13, Patrick M. Hausen wrote:
>> Hi,
>>> Am 20.09.2023 um 22:08 schrieb Kyle Evans <[email protected]>:
>>> 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? ;-)
> 
> You should be able to get a clean dump with, e.g.:
> 
> 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=... 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 = "/scb/ethernet@7d580000";
. . .
        chosen {

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

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

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


===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.