diff options
author | Simon Glass <sjg@chromium.org> | 2021-02-06 09:57:34 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-02 11:26:27 -0500 |
commit | c6dccc69d01204df655266b991e70cba6bb3099e (patch) | |
tree | 5534c927c08a4bb085a503e20e9ac21b8d5edf74 | |
parent | 7604780d5160d2552b848ce99d41a6b7369f170b (diff) | |
download | u-boot-c6dccc69d01204df655266b991e70cba6bb3099e.zip u-boot-c6dccc69d01204df655266b991e70cba6bb3099e.tar.gz u-boot-c6dccc69d01204df655266b991e70cba6bb3099e.tar.bz2 |
sandbox: Write out bloblist when exiting
Sandbox provides a way to write out its emulated memory on exit. This
makes it possible to pass a bloblist from one phase (e.g. SPL) to the
next.
However the bloblist is not closed off, so the checksum is generally
invalid. Fix this by finishing up the bloblist before writing the memory
file.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | arch/sandbox/cpu/state.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 4ffaf16..f63cfd3 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <bloblist.h> #include <errno.h> #include <fdtdec.h> #include <log.h> @@ -398,8 +399,12 @@ int state_uninit(void) { int err; + log_info("Writing sandbox state\n"); state = &main_state; + /* Finish the bloblist, so that it is correct before writing memory */ + bloblist_finish(); + if (state->write_ram_buf) { err = os_write_ram_buf(state->ram_buf_fname); if (err) { |