diff options
| author | Heiko Schocher <[email protected]> | 2021-08-06 06:44:26 +0200 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2021-10-07 16:53:50 +0200 |
| commit | 884ba50a078f57df5bf18a1bbc8aa337f5ce404d (patch) | |
| tree | 5550d37706ab4013c6c3814aa433ca6389760eb4 /common | |
| parent | 7d4541cdfbf9697c39e720690f13b9c02d3c7555 (diff) | |
spl_fit. add hook to make fixes after fit header is loaded
add hook function spl_load_simple_fit_fix_load()
which is called after fit image header is loaded.
Signed-off-by: Heiko Schocher <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/spl/spl_fit.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index f41abca0ccb..849e01ad8ee 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -548,6 +548,15 @@ __weak bool spl_load_simple_fit_skip_processing(void) return false; } +/* + * Weak default function to allow fixes after fit header + * is loaded. + */ +__weak void *spl_load_simple_fit_fix_load(const void *fit) +{ + return (void *)fit; +} + static void warn_deprecated(const char *msg) { printf("DEPRECATED: %s\n", msg); @@ -685,6 +694,8 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, if (spl_load_simple_fit_skip_processing()) return 0; + ctx.fit = spl_load_simple_fit_fix_load(ctx.fit); + ret = spl_simple_fit_parse(&ctx); if (ret < 0) return ret; |
