diff options
author | David Turner <> | 2009-03-25 02:42:23 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-25 02:42:23 -0700 |
commit | eef8d85e91a28678d710458f57defe242b522da3 (patch) | |
tree | e1d0c6b12d42cd59d093d318139ce19785ef07ed | |
parent | 9877e2e3e3c2df64de306b48f80a4f5d0b028d95 (diff) | |
download | external_qemu-eef8d85e91a28678d710458f57defe242b522da3.zip external_qemu-eef8d85e91a28678d710458f57defe242b522da3.tar.gz external_qemu-eef8d85e91a28678d710458f57defe242b522da3.tar.bz2 |
Automated import from //branches/cupcake/...@142527,142527
-rw-r--r-- | android/avd/info.c | 12 | ||||
-rw-r--r-- | android/cmdline-options.h | 5 | ||||
-rw-r--r-- | android/help.c | 16 | ||||
-rw-r--r-- | android/main.c | 32 | ||||
-rw-r--r-- | sysemu.h | 2 |
5 files changed, 34 insertions, 33 deletions
diff --git a/android/avd/info.c b/android/avd/info.c index afff342..2f0e5a9 100644 --- a/android/avd/info.c +++ b/android/avd/info.c @@ -1242,7 +1242,7 @@ _getBuildSkin( AvdInfo* i, AvdInfoParams* params ) if (!skinName) { /* the (current) default skin name for the build system */ skinName = SKIN_DEFAULT; - DD("selecting default skin name '%s'", skinName); + D("selecting default skin name '%s'", skinName); } i->skinName = ASTRDUP(skinName); @@ -1354,6 +1354,16 @@ avdInfo_getHwConfig( AvdInfo* i, AndroidHwConfig* hw ) if (ini != i->configIni) iniFile_free(ini); + /* special product-specific hardware configuration */ + { + char* p = strrchr(i->androidOut, '/'); + if (p != NULL && p[0] != 0) { + if (p[1] == 's') { + hw->hw_keyboard = 0; + } + } + } + return ret; } diff --git a/android/cmdline-options.h b/android/cmdline-options.h index c57ed10..5291177 100644 --- a/android/cmdline-options.h +++ b/android/cmdline-options.h @@ -16,7 +16,7 @@ #endif /* required to ensure that the CONFIG_XXX macros are properly defined */ -//XXX#include "config.h" +#include "android/config/config.h" /* Some options acts like flags, while others must be followed by a parameter * string. Nothing really new here. @@ -126,11 +126,12 @@ OPT_PARAM( shell_serial, "<device>", "specific character device for root shell" OPT_FLAG ( old_system, "support old (pre 1.4) system images" ) OPT_PARAM( tcpdump, "<file>", "capture network packets to file" ) +OPT_PARAM( bootchart, "<timeout>", "enable bootcharting") + #ifdef CONFIG_NAND_LIMITS OPT_PARAM( nand_limits, "<nlimits>", "enforce NAND/Flash read/write thresholds" ) #endif -OPT_PARAM( bootchart, "<timeout>", "enable bootcharting") #undef CFG_FLAG #undef CFG_PARAM diff --git a/android/help.c b/android/help.c index ae4dbc0..391b63d 100644 --- a/android/help.c +++ b/android/help.c @@ -35,8 +35,10 @@ help_virtual_device( stralloc_t* out ) " The 'android' helper tool can be used to manage virtual devices.\n" " For example:\n\n" - " android avd -- creates a new virtual device.\n" - " android list -- list all virtual devices available.\n\n" + " android create avd -n <name> -t 1 # creates a new virtual device.\n" + " android list avd # list all virtual devices available.\n\n" + + " Try 'android --help' for more commands.\n\n" " Each AVD really corresponds to a content directory which stores\n" " persistent and writable disk images as well as configuration files.\n" @@ -446,14 +448,14 @@ static void help_avd(stralloc_t* out) { PRINTF( - " use '-avd <name>' to start the emulator program with a given avd,\n" - " where <name> must correspond to the name of one of the\n" - " Android Virtual Devices available on your host.\n\n" + " use '-avd <name>' to start the emulator program with a given Android\n" + " Virtual Device (a.k.a. AVD), where <name> must correspond to the name\n" + " of one of the existing AVDs available on your host machine.\n\n" + + "See -help-virtual-device to learn how to create/list/manage AVDs.\n\n" " As a special convenience, using '@<name>' is equivalent to using\n" " '-avd <name>'.\n\n" - - " For more information about virtual devices, see -help-virtual-device.\n" ); } diff --git a/android/main.c b/android/main.c index b645740..efa79aa 100644 --- a/android/main.c +++ b/android/main.c @@ -1999,21 +1999,9 @@ int main(int argc, char **argv) exit(1); } } - else { - if (!opts->skin && android_build_out) { - /* select default skin based on product type */ - const char* p = strrchr(android_build_out,'/'); - if (p) { - if (p[1] == 's') { - opts->skin = "HVGA"; /* used to be QVGA-L */ - } else if (p[1] == 'd') { - opts->skin = "HVGA"; - } - } - D("autoconfig: -skin %s", opts->skin); - } - android_avdParams->skinName = opts->skin; - } + android_avdParams->skinName = opts->skin; + android_avdParams->skinRootPath = opts->skindir; + /* setup the virtual device differently depending on whether * we are in the Android build system or not */ @@ -2848,15 +2836,15 @@ void android_emulation_setup( void ) * under VMWare. */ BEGIN_NOSIGALRM - pid = fork(); + pid = fork(); + if (pid == 0) { + int fd = open("/dev/null", O_WRONLY); + dup2(fd, 1); + dup2(fd, 2); + execl( tmp, _ANDROID_PING_PROGRAM, "ping", "emulator", VERSION_STRING, NULL ); + } END_NOSIGALRM - if (pid == 0) { - int fd = open("/dev/null", O_WRONLY); - dup2(fd, 1); - dup2(fd, 2); - execl( tmp, _ANDROID_PING_PROGRAM, "ping", "emulator", VERSION_STRING, NULL ); - } /* don't do anything in the parent or in case of error */ strncat( tmp, " ping emulator " VERSION_STRING, PATH_MAX - strlen(tmp) ); D( "ping command: %s", tmp ); @@ -135,7 +135,7 @@ extern int drive_get_max_bus(BlockInterfaceType type); /* serial ports */ -#define MAX_SERIAL_PORTS 4 +#define MAX_SERIAL_PORTS 8 extern CharDriverState *serial_hds[MAX_SERIAL_PORTS]; |