sunxi-fel: add TOC0 boot image support#235
Conversation
4826daa to
82bc99c
Compare
Secure boot sunxi images use TOC0 containers instead of a bare eGON SPL header. Teach the spl/uboot command path to recognize a TOC0 image, validate its header and checksum, extract the firmware item, and wrap it in a synthetic eGON SPL header at the SoC SPL load address. After the wrapped SPL returns to FEL, pass the payload appended after the TOC0 container to the existing U-Boot image loader so FIT-based u-boot-sunxi-with-spl.bin images can be loaded by the normal uboot command path. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
Why is that code patching the in-SRAM copy to look like eGON? U-Boot is able to handle TOC0 images, when loaded from SD card, for instance. So I think for consistency it should keep as much of the original TOC0 as possible. |
|
The conversion is intentional for the FEL path. It is not trying to model the For media boot, the BROM parses TOC0 itself, loads the firmware item to the For FEL
U-Boot also has special handling for that eGON/FEL convention. In SPL, So preserving a valid TOC0 header in SRAM is not equivalent here. It would make The original TOC0 container is still validated by |
Secure boot sunxi images use TOC0 containers instead of a bare eGON SPL header. Teach the spl/uboot command path to recognize a TOC0 image, validate its header and checksum, extract the firmware item, and wrap it in a synthetic eGON SPL header at the SoC SPL load address.
After the wrapped SPL returns to FEL, pass the payload appended after the TOC0 container to the existing U-Boot image loader so FIT-based u-boot-sunxi-with-spl.bin images can be loaded by the normal uboot command path.