[U-Boot] *preferred* place in u-boot to tweak device tree?

18 Oct
2016
18 Oct
'16
7:21 p.m.
a while back, i asked about the best way to have u-boot extract the MAC address from a well-known address in flash, and add it to the device tree to pass to the kernel; discussion was here:
http://lists.denx.de/pipermail/u-boot/2016-May/255856.html
i notice that another option for tweaking the MAC address that is popular is to add that code to a board's misc_init_r(). so both ways work just fine, but i'm assuming that the *proper* place to do it is in ft_board_setup(), since the routine image_setup_libfdt() pretty much handles everything, and all that's left to do is extend ft_board_setup() to set the env variable:
eth_setenv_enetaddr("ethaddr", <physical addr of 6-byte MAC address>);
is that what you'd call "best practice"?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
3124
Age (days ago)
3124
Last active (days ago)
0 comments
1 participants
participants (1)
-
Robert P. J. Day