Setting MAC address from nv variable broken in barebox 2017.05.0?
Ian Abbott
abbotti at mev.co.uk
Mon May 8 08:44:48 PDT 2017
On 08/05/17 15:34, Sascha Hauer wrote:
> Hi Ian,
>
> On Mon, May 08, 2017 at 02:39:19PM +0100, Ian Abbott wrote:
>> Hi,
>>
>> I'm not sure if this is a bug or whether I'm doing something wrong. In
>> barebox 2017.04.0 and earlier, I stored the Ethernet MAC address in a
>> non-volatile ('nv') variable dev.eth0.macaddr=xx:xx:xx:xx:xx:xx and that got
>> propagated to 'global' and the eth0 device on boot:
>
> Yes this is broken. Sorry for breaking it and thank you for reporting it
> ;)
> I just sent out a fix, you're on Cc. Please let me know if this works.
>
> Sascha
Hi Sacha,
I tried it. I had to modify the patch slightly to apply it directly to
2017-05-0 due to other changes on master (I think mostly due to commit
0071bacb4c7cab21c9fab8540f5aa9922a270a85 ("param: remove unnecessary
device_d * argument")).
The global.dev.eth0.ethaddr variable is not created, but the
nv.dev.eth0.ethaddr variable does now get applied to the eth0 device. I
think this is as expected.
The other problem I mentioned about setting global variables is still
present. That is:
barebox at xxxx:/ nv -r quux
barebox at xxxx:/ global -r quux
barebox at xxxx:/ nv quux=foo
barebox at xxxx:/ global quux=bar
barebox at xxxx:/ echo ${global.quux}
foo
barebox at xxxx:/ global quux=i_really_mean_it
barebox at xxxx:/ echo ${global.quux}
foo
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti at mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
More information about the barebox
mailing list