diff options
author | Ot ten Thije <ottenthije@google.com> | 2010-10-05 17:53:30 +0100 |
---|---|---|
committer | Ot ten Thije <ottenthije@google.com> | 2010-10-22 11:18:47 +0100 |
commit | 353b3b1135563e2bcaf7797acfa35a2fe2d3a818 (patch) | |
tree | 49f495ea08d718709426f03205726bfdc957aa57 /android/cmdline-options.h | |
parent | 6133adcd101e17118354e64771c52355dbafb1d7 (diff) | |
download | external_qemu-353b3b1135563e2bcaf7797acfa35a2fe2d3a818.zip external_qemu-353b3b1135563e2bcaf7797acfa35a2fe2d3a818.tar.gz external_qemu-353b3b1135563e2bcaf7797acfa35a2fe2d3a818.tar.bz2 |
Load state snapshot rather than booting to start emulator.
This patch adds support for an optional file "snapshots.img" in the
data directory of an AVD. This file should be an image formatted with
the qcow2 file system and will be mounted on -hdb when the emulator
starts up. If present, the emulator will attempt to load the snapshot
named "default-boot" from this image, rather than going through the
full boot procedure.
To control the behaviour of this functionality, this patch introduces
the following new command line options for the emulator:
-snapstorage <file>: override the default location of the
snapshot storage file.
-no-snapstorage: do not load the snapshots file, even if an explicit
path is given.
-snapshot <name>: instead of loading "default-boot", load the state
snapshot with the given name.
-no-snapshot: do not load a snapshot, but force a full boot
sequence, even if a snapshots file is mounted. Useful for
creating snapshots.
Note that this functionality is experimental and will be enabled
only if the constant CONFIG_ANDROID_SNAPSHOTS in
android/config/config.h is set to "1" before building. It is turned
off by default.
Change-Id: Iee2e9096a27f3414bacfc271f90ef93a98730c82
Diffstat (limited to 'android/cmdline-options.h')
-rw-r--r-- | android/cmdline-options.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/android/cmdline-options.h b/android/cmdline-options.h index a311912..a9b02ac 100644 --- a/android/cmdline-options.h +++ b/android/cmdline-options.h @@ -76,6 +76,12 @@ CFG_PARAM( cache, "<file>", "cache partition image (default is temporary file CFG_FLAG ( no_cache, "disable the cache partition" ) CFG_FLAG ( nocache, "same as -no-cache" ) OPT_PARAM( sdcard, "<file>", "SD card image (default <system>/sdcard.img") +#if CONFIG_ANDROID_SNAPSHOTS +OPT_PARAM( snapstorage, "<file>", "file that contains all state snapshots (default <datadir>/snapshots.img)") +OPT_FLAG ( no_snapstorage, "do not mount a snapshot storage file (this disables all snapshot functionality)" ) +OPT_PARAM( snapshot, "<name>", "immediately load state snapshot rather than doing a full boot (default 'default-boot')" ) +OPT_FLAG ( no_snapshot, "do not start from snapshot, but perform a full boot sequence" ) +#endif OPT_FLAG ( wipe_data, "reset the use data image (copy it from initdata)" ) CFG_PARAM( avd, "<name>", "use a specific android virtual device" ) CFG_PARAM( skindir, "<dir>", "search skins in <dir> (default <system>/skins)" ) |