spl: Add full fitImage support
PATCH 1/1 spl: Add full fitImage support
Add support for loading U-Boot and optionally FDT from a fitImage in SPL by using the full fitImage support from U-Boot. While we do have limited SPL loading support in SPL with a small footprint, it is missing a lot of important features, like checking signatures. This support has all the fitImage features, while the footprint is obviously larger.
---
V2: - Drop blank line below spl_load_fit_image()
- Explicitly enable image verification if available
--- Kconfig | 11 +++++++++ common/spl/spl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+)
Kconfig +11 -0
@@ -328,6 +328,17 @@ config SPL_LOAD_FIT particular it can handle selecting from multiple device tree and passing the correct one to U-Boot. +config SPL_LOAD_FIT_FULL + bool "Enable SPL loading U-Boot as a FIT" + select SPL_FIT + help + Normally with the SPL framework a legacy image is generated as part + of the build. This contains U-Boot along with information as to + where it should be loaded. This option instead enables generation + of a FIT (Flat Image Tree) which provides more flexibility. In + particular it can handle selecting from multiple device tree + and passing the correct one to U-Boot. + config SPL_FIT_IMAGE_POST_PROCESS bool "Enable post-processing of FIT artifacts after loading by the SPL" depends on SPL_LOAD_FIT
common/spl/spl.c +74 -0
83 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 1/1 spl: Add full fitImage support
Quoted 10 lines · Marek Vasut
Add support for loading U-Boot and optionally FDT from a fitImage in SPL by using the full fitImage support from U-Boot. While we do have limited SPL loading support in SPL with a small footprint, it is missing a lot of important features, like checking signatures. This support has all the fitImage features, while the footprint is obviously larger.
Signed-off-by Marek Vasut <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Simon Glass <[email protected]>
Quoted 8 lines
---
V2: - Drop blank line belowspl_load_fit_image()
- Explicitly enable image verification if available--- Kconfig | 11 +++++++++ common/spl/spl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+)
Can you add this to the FIT tests?
PATCH 1/1 spl: Add full fitImage support
Quoted 20 lines · Simon Glass
Quoted 10 lines · Marek Vasut
Add support for loading U-Boot and optionally FDT from a fitImage in SPL by using the full fitImage support from U-Boot. While we do have limited SPL loading support in SPL with a small footprint, it is missing a lot of important features, like checking signatures. This support has all the fitImage features, while the footprint is obviously larger.
Signed-off-by Marek Vasut <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Simon Glass <[email protected]>Quoted 8 lines
---
V2: - Drop blank line belowspl_load_fit_image()
- Explicitly enable image verification if available--- Kconfig | 11 +++++++++ common/spl/spl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+)
Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>Can you add this to the FIT tests?
Yeah, do you have some pointers for me ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 spl: Add full fitImage support
Hi Marek,
Quoted 21 lines · Marek Vasut
Quoted 20 lines · Simon Glass
Quoted 18 lines · Marek Vasut
Add support for loading U-Boot and optionally FDT from a fitImage in SPL by using the full fitImage support from U-Boot. While we do have limited SPL loading support in SPL with a small footprint, it is missing a lot of important features, like checking signatures. This support has all the fitImage features, while the footprint is obviously larger.
Signed-off-by Marek Vasut <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Simon Glass <[email protected]>---
V2: - Drop blank line belowspl_load_fit_image()
- Explicitly enable image verification if available--- Kconfig | 11 +++++++++ common/spl/spl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+)
Quoted 5 lines
Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>Can you add this to the FIT tests?
Yeah, do you have some pointers for me ?
The current test is in test/py/tests/test_fit.py so you can start with that, or create a new one based on it.
At present we have sandbox_spl which includes SPL support. If you run a test with that (i.e. CONFIG_SPL set) it will run SPL, which in turn will load U-Boot. The logic for that is in u_boot_console_sandbox.py and the function which actually loads U-Boot is spl_board_load_image().
So I think you could create a FIT with U-Boot and a DTB in it, then modify spl_board_load_image() to use that instead. Then your test could simply check the console output. For example test_ofplatdata.py shows how to find a string in the output, although at present that test does nothing, since there is no way to tell SPL to output the platdata.
Regards,
Simon
Quoted 11 lines · Marek Vasut
Add support for loading U-Boot and optionally FDT from a fitImage in SPL by using the full fitImage support from U-Boot. While we do have limited SPL loading support in SPL with a small footprint, it is missing a lot of important features, like checking signatures. This support has all the fitImage features, while the footprint is obviously larger.
Signed-off-by Marek Vasut <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Simon Glass <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180524/f8f7e68a/attachment.sig>