diff options
author | Pali Rohár | 2022-01-14 14:31:40 +0100 |
---|---|---|
committer | Stefan Roese | 2022-01-20 11:35:29 +0100 |
commit | c10939d8a11921c2d0bba56e72999dffe36d57bf (patch) | |
tree | 7c6653fefb63765aed6f7dde8686b096e2d6c294 /common/spl/spl.c | |
parent | f830703f4284a0e28e7060b85e659c619a0d8e23 (diff) |
SPL: Add support for checking board / BootROM specific image types
Commit 9baab60b8054 ("SPL: Add support for parsing board / BootROM specific
image types") added support for loading board specific image types.
This commit adds support for a new weak function spl_parse_board_header()
which is called after loading boot image. Board may implement this function
for checking if loaded board specific image is valid.
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r-- | common/spl/spl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 653e71f00cf..54f91783966 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -589,6 +589,12 @@ static struct spl_image_loader *spl_ll_find_loader(uint boot_device) return NULL; } +__weak int spl_check_board_image(struct spl_image_info *spl_image, + const struct spl_boot_device *bootdev) +{ + return 0; +} + static int spl_load_image(struct spl_image_info *spl_image, struct spl_image_loader *loader) { @@ -610,6 +616,9 @@ static int spl_load_image(struct spl_image_info *spl_image, } } #endif + if (!ret) + ret = spl_check_board_image(spl_image, &bootdev); + return ret; } |