Implementing a check on FDT header

Udit agarwal dev.madaari at
Mon Mar 5 15:03:55 UTC 2018

While going through uboot docs, i found something intresting:
Here <>(Sec:, It is
given that if FDT is not passed as the third argument to bootm command
then, by default a data structure called bd_info(given here
is passed instread of the pointer to fdt. Thus, the argument being passed
to bsp_fdt_copy function during start.S shouldn't be random(or NULL).
Now, checking for the presence of bd_info can allow us to load an empty FDT
in case of missing bootm param. I did load media01 test with empty FDT and
it didn't crashed(Logs:here
In case, if the FDT is loaded by the user, now we can implement a FDT
header check to confirm it's validity.One possible way to do that could be
via libfdt(there's a build in function that checks for magic number) as
given in this
test. Other possible way(I am not sure about it) could be a validy check
within uboot itself(Given here

Moreover, I have a doubt, Why is uboot RTEMS format depreciated as per your
discussions in previous threads?
Udit agarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list