mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Setting MAC address from nv variable broken in barebox 2017.05.0?
@ 2017-05-08 13:39 Ian Abbott
  2017-05-08 14:34 ` Sascha Hauer
  2017-05-08 14:45 ` Ian Abbott
  0 siblings, 2 replies; 9+ messages in thread
From: Ian Abbott @ 2017-05-08 13:39 UTC (permalink / raw)
  To: barebox

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:

barebox@xxxx:/ nv
   allow_color: true
   autoboot_timeout: 3
   dev.eth0.ethaddr: xx:xx:xx:xx:xx:xx
   user: none

barebox@xxxx:/ global
* allow_color: true
* autoboot_timeout: 3
   boot.default: xxxx
   boot.watchdog_timeout: 0
   bootm.appendroot: 0
   bootm.image:
   bootm.image.loadaddr:
   bootm.initrd:
   bootm.initrd.loadaddr:
   bootm.oftree:
   bootm.verbose: 0
   bootm.verify: hash
* dev.eth0.ethaddr: xx:xx:xx:xx:xx:xx
   dhcp.bootfile:
   dhcp.client_id:
   dhcp.client_uuid:
   dhcp.oftree_file:
   dhcp.rootpath:
   dhcp.tftp_server_name:
   dhcp.user_class:
   dhcp.vendor_id:
   editcmd: sedit
   hostname: generic
   linux.bootargs.base:
   linux.bootargs.console:
   linux.bootargs.dyn.ip:
   linux.bootargs.dyn.root:
   linux.rootnfsopts: v3,tcp
   loglevel: 4
   model: xxxx
   system.reset: unknown
* user: none
   version: 2017.04.0

barebox@xxxx:/ devinfo eth0
Parameters:
   ethaddr: xx:xx:xx:xx:xx:xx
   gateway: 0.0.0.0
   ipaddr: 0.0.0.0
   linux.bootargs:
   netmask: 0.0.0.0
   serverip: 0.0.0.0

However, in 2017.05.0, my 'dev.eth0.ethaddr' variable is no longer being 
propagated to global on boot, and as a consequence, is no longer 
propagated to eth0 (note that 'dev.eth0.ethaddr' is the only nv variable 
that I set manually when setting up a new board):

barebox@xxxx:/ global
* allow_color: true
* autoboot_timeout: 3
   boot.default: xxxx
   boot.watchdog_timeout: 0
   bootm.appendroot: 0
   bootm.image:
   bootm.image.loadaddr:
   bootm.initrd:
   bootm.initrd.loadaddr:
   bootm.oftree:
   bootm.verbose: 0
   bootm.verify: hash ("none", "hash", "signature", "available")
   dhcp.bootfile:
   dhcp.client_id:
   dhcp.client_uuid:
   dhcp.oftree_file:
   dhcp.rootpath:
   dhcp.tftp_server_name:
   dhcp.user_class:
   dhcp.vendor_id:
   editcmd: sedit
   hostname: generic
   linux.bootargs.base:
   linux.bootargs.console:
   linux.bootargs.dyn.ip:
   linux.bootargs.dyn.root:
   linux.rootnfsopts: v3,tcp
   loglevel: 4
   model: xxxx
   of_partition_binding: new ("new", "legacy", "donttouch")
   system.reset: unknown ("unknown", "POR", "RST", "WDG", "WKE", "JTAG", 
"THERM", "EXT")
* user: none
   version: 2017.05.0

barebox@xxxx:/ devinfo eth0
Parameters:
   ethaddr: 00:00:00:00:00:00
   gateway: 0.0.0.0
   ipaddr: 0.0.0.0
   linux.bootargs:
   netmask: 0.0.0.0
   serverip: 0.0.0.0

I can work around this using a script in /env/init/ to set the global 
from the nv variable, or change /env/network/eth0 to set the MAC address 
from the nv variable.

Is this the proper behaviour or a bug?  Could it be related to commit 
35d8e858bea17ec4796069c9c27fd0b134125eaf ("nv: Do not create globalvars 
from nvvars")?

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-05-11  9:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-08 13:39 Setting MAC address from nv variable broken in barebox 2017.05.0? Ian Abbott
2017-05-08 14:34 ` Sascha Hauer
2017-05-08 15:44   ` Ian Abbott
2017-05-08 14:45 ` Ian Abbott
2017-05-08 14:49   ` Ian Abbott
2017-05-08 18:12   ` Sascha Hauer
2017-05-09 10:02     ` Ian Abbott
2017-05-11  6:17       ` Sascha Hauer
2017-05-11  9:48         ` Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox