sandbox: Add options to clean up temporary files
authorSimon Glass <sjg@chromium.org>
Thu, 27 Feb 2014 20:26:23 +0000 (13:26 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 18 Mar 2014 02:05:49 +0000 (20:05 -0600)
commitab839dc3e6c1d07bc926199f3eebace0804f2ecf
tree831168b1d78c5ba25177e8baa78fad1c285b4a2e
parentffb87905cb3883c84598b87ca05384c17d59dee1
sandbox: Add options to clean up temporary files

When jumping from one sandbox U-Boot to another in sandbox, the RAM buffer
is preserved in the jump by using a temporary file. Add an option to tell
the receiving U-Boot to remove this file when it is no longer needed.

Similarly the old U-Boot image is left behind in this case. We cannot delete
it immediately since gdb cannot then find its debug symbols. Delete it just
before exiting.

Together these changes ensure that temporary files are removed both for
memory and U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/os.c
arch/sandbox/cpu/start.c
arch/sandbox/cpu/state.c
arch/sandbox/include/asm/state.h