[U-Boot] *preferred* place in u-boot to tweak device tree?
Robert P. J. Day
rpjday at crashcourse.ca
Tue Oct 18 19:21:02 CEST 2016
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
========================================================================
More information about the U-Boot
mailing list