[U-Boot] Uboot - verified boot - CONFIG_OF_SEPARATE

Hey!
When I build my Uboot with the CONFIG_OF_SEPARATE set to gain access to the compiled dtb, Uboot can't find my concatenated dtb during the boot. After injecting the pulbic keys for the verified boot, I cat the u-boot.dtb behind the u-boot.bin. After that I mkimage the u-boot.img as usuall.
I found, that if I change the offset where the fdt_blob is searched for by +300, it finds the dtb correctly. Like this: ------------------- #elif defined CONFIG_OF_SEPARATE /* FDT is at end of image */ - gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE); + gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE + 300); #endif -------------------
But I can't explain why this might be. The 300 isn't a random value! I calculated it via some debug output and it works reliably. But like it is with these workarounds, I don't like them! So I'm searching for an answer.
Any ideas, why the offset is not _end_ofs + _TEXT_BASE, like it should be?
Cheers, Thilo

Hi,
On 11 March 2014 05:39, Thilo Cestonaro thilo@cestona.ro wrote:
Hey!
When I build my Uboot with the CONFIG_OF_SEPARATE set to gain access to the compiled dtb, Uboot can't find my concatenated dtb during the boot. After injecting the pulbic keys for the verified boot, I cat the u-boot.dtb behind the u-boot.bin. After that I mkimage the u-boot.img as usuall.
I found, that if I change the offset where the fdt_blob is searched for by +300, it finds the dtb correctly. Like this:
#elif defined CONFIG_OF_SEPARATE /* FDT is at end of image */
gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE);
gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE + 300);
#endif
But I can't explain why this might be. The 300 isn't a random value! I calculated it via some debug output and it works reliably. But like it is with these workarounds, I don't like them! So I'm searching for an answer.
Any ideas, why the offset is not _end_ofs + _TEXT_BASE, like it should be?
I just saw this now. You probably already know the outcome, but for the record, commit 8974292 added a check for this problem, and it was fixed for TI boards. Specifically for the Beaglebone, see doc/uImage.FIT/beaglebone_vboot.txt for a walk-through.
Regards, Simon
participants (2)
-
Simon Glass
-
Thilo Cestonaro