
Hi Stefano,
On Thu, Apr 23, 2015 at 3:13 AM, Stefano Babic sbabic@denx.de wrote:
I admit I do not like a lot to have C code setting / fixing the environment. This has the drawback that when a user try to set the environment from the console as he wants, he cannot because the code has reverted back and it is not easy to track. I would like to propose another solution.
Thanks for the suggestion.
What about to export your is_hummingboard() function as U-Boot command ? You can then use it in U-Boot scripts, and the correct fdt name can be set in the "bootcmd" variable. Something like "if is_humming;then ..."
I am not sure how I can retrieve the returned value from is_hummingboard() as a U-boot command and use it inside a script? Maybe I did not understand your suggestion. Please advise.
And if a user wants to use other names, he can because it is not hard-coded.
Yes, I understand the concern, but in this specific case we are talking about a DTB file, which is board specific and cannot really change.
Regards,
Fabio Estevam