From owner-freebsd-arm@freebsd.org Sat Nov 26 09:27:08 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55801C54015 for ; Sat, 26 Nov 2016 09:27:08 +0000 (UTC) (envelope-from John.Kitz@xs4all.nl) Received: from lb1-smtp-cloud2.xs4all.net (lb1-smtp-cloud2.xs4all.net [194.109.24.21]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "*.xs4all.nl", Issuer "GlobalSign Domain Validation CA - SHA256 - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F23CA762 for ; Sat, 26 Nov 2016 09:27:07 +0000 (UTC) (envelope-from John.Kitz@xs4all.nl) Received: from picard ([82.95.89.208]) by smtp-cloud2.xs4all.net with ESMTP id CZT41u0044VixDu01ZT5Cl; Sat, 26 Nov 2016 10:27:05 +0100 Reply-To: From: "John W. Kitz" To: References: <001701d245ce$e64e33f0$b2ea9bd0$@Kitz@xs4all.nl> <454137dc-30f7-cd33-6c75-0cc3045090dd@t-online.de> <002801d24755$f9017420$eb045c60$@Kitz@xs4all.nl> <177ae37f-db52-c7ee-77fa-d9bc7d61b4ee@t-online.de> <1480137537.1889.97.camel@freebsd.org> In-Reply-To: <1480137537.1889.97.camel@freebsd.org> Subject: RE: How to change MAC address on RPI-B? Date: Sat, 26 Nov 2016 10:27:11 +0100 Message-ID: <000c01d247c7$452a4db0$cf7ee910$@Kitz@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdJHpK4zmzIcvcMlT+ylrHT99yqvpQAIdGng Content-Language: en-us X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 09:27:08 -0000 Ian, On Sat, 2016-11-26 at 00:07 +0100, diffusae wrote: > Hi John, >=20 > On 25.11.2016 20:56, John W. Kitz wrote: >=20 > >=20 > > So when doing so the locally administered MAC address is passed on=20 > > from uEnv.txt to the O/S during boot and is then used to override=20 > > the globally > I didn't think, that it will be passed from the U-Boot Enviroment=20 > settings. You can set the MAC address, but the FreeBSD kernel shows=20 > always the unique MAC address. >=20 > >=20 > > unique MAC address or does the O/S check both the information found=20 > > in its configuration files and what is configured in uEnv.txt before = > > configuring and activating the network interface(s)? > Which configuration files do you mean? AFAIK there is only the FDT=20 > blob. > I guess it ignores the setting in uEnv.txt. >=20 > >=20 > > Makes me wonder which of the two (i.e. locally administered through=20 > > uEnv.txt or locally administered through the O/S) takes precedence. > Only the unique MAC address and the locally administered MAC address,=20 > will take affect. >=20 > >=20 > > In addition this might affect configuration decisions when one would = > > want to configure a device for net booting (at least when browsing=20 > > through what can be configured by means of uEnv.txt I believe that=20 > > was one of the options I > > saw) through uEnv.txt? > Personally, I like u-boot. It has various options, runs on a lot of=20 > devices and it's also nice to handle. >=20 > Best regards, > _ I looked into this tonight, and there is some code missing in u-boot to handle passing a mac address set in the u-boot environment into the = kernel via the fdt data. It would be pretty simple to fix. =A0We need to add an ethernet0 alias pointing to the /axi/usb/hub/ethernet node to our rpi dts, and the = attached patch needs to replace the current one in the u-boot-rpi port. This lets you set usbethaddr in the u-boot environment (via uEnv.txt or saved directly using saveenv), and it will get used by both u-boot and freebsd. Having gotten it this far, I don't really have time right now to get the patch committed to ports. =A0Hopefully somebody else can help with that. JKi: I was just curious, but have no immediate use for the features discussed in this particular thread at this time. So please don't make = the effort to get mentioned changes implemented because of this thread.