aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-02-09 18:04:23 -0800
committerXavier Ducrohet <xav@android.com>2011-02-09 18:04:23 -0800
commitfc8ed80ba1362d2ce500003625e1c9c39f765661 (patch)
tree760b9c298c8fe37411e174f7bd214ff644cda0ec /android
parent1ebd6d701f91c34f4562f522d5b2ce32be056d85 (diff)
downloadexternal_qemu-fc8ed80ba1362d2ce500003625e1c9c39f765661.zip
external_qemu-fc8ed80ba1362d2ce500003625e1c9c39f765661.tar.gz
external_qemu-fc8ed80ba1362d2ce500003625e1c9c39f765661.tar.bz2
Revert "Build arm and x86 binaries at the same time."
This fails to build on MacOS X This reverts commit a39b10bd2574825a815d6ad854499dd127cfa9cb.
Diffstat (limited to 'android')
-rw-r--r--android/avd/info.c21
-rw-r--r--android/avd/info.h1
-rw-r--r--android/cmdline-options.h2
-rw-r--r--android/config/config.h18
-rw-r--r--android/config/target-arm/config.h5
-rw-r--r--android/config/target-x86/config.h3
-rw-r--r--android/help.c13
-rw-r--r--android/main-common.c62
-rw-r--r--android/main-ui.c1
-rw-r--r--android/main.c11
-rw-r--r--android/utils/system.h6
11 files changed, 37 insertions, 106 deletions
diff --git a/android/avd/info.c b/android/avd/info.c
index dc53849..3d91a30 100644
--- a/android/avd/info.c
+++ b/android/avd/info.c
@@ -124,7 +124,6 @@ struct AvdInfo {
char inAndroidBuild;
char* androidOut;
char* androidBuildRoot;
- char* targetArch;
/* for the normal virtual device case */
char* deviceName;
@@ -559,7 +558,7 @@ imageLoader_empty( ImageLoader* l, unsigned flags )
}
-/* copy image file from a given source
+/* copy image file from a given source
* assumes locking is needed.
*/
static void
@@ -607,7 +606,7 @@ imageLoader_load( ImageLoader* l,
/* set image state */
l->pState[0] = (flags & IMAGE_DONT_LOCK) == 0
- ? IMAGE_STATE_MUSTLOCK
+ ? IMAGE_STATE_MUSTLOCK
: IMAGE_STATE_READONLY;
/* check user-provided path */
@@ -652,7 +651,7 @@ imageLoader_load( ImageLoader* l,
if (flags & IMAGE_REQUIRED) {
AvdInfo* i = l->info;
- derror("could not find required %s image (%s).",
+ derror("could not find required %s image (%s).",
l->imageText, l->imageFile);
if (i->inAndroidBuild) {
@@ -1191,8 +1190,14 @@ _getBuildImagePaths( AvdInfo* i, AvdInfoParams* params )
if ( !imageLoader_load( l, IMAGE_OPTIONAL |
IMAGE_DONT_LOCK ) )
{
- p = bufprint(temp, end, "%s/prebuilt/android-%s/kernel/kernel-qemu",
- i->androidBuildRoot, i->targetArch);
+#ifdef TARGET_ARM
+#define PREBUILT_KERNEL_PATH "prebuilt/android-arm/kernel/kernel-qemu"
+#endif
+#ifdef TARGET_I386
+#define PREBUILT_KERNEL_PATH "prebuilt/android-x86/kernel/kernel-qemu"
+#endif
+ p = bufprint(temp, end, "%s/%s", i->androidBuildRoot,
+ PREBUILT_KERNEL_PATH);
if (p >= end || !path_exists(temp)) {
derror("bad workspace: cannot find prebuilt kernel in: %s", temp);
exit(1);
@@ -1275,7 +1280,7 @@ _getBuildImagePaths( AvdInfo* i, AvdInfoParams* params )
/* if the user provided one cache image, lock & use it */
if ( params->forcePaths[l->id] != NULL ) {
- imageLoader_load(l, IMAGE_REQUIRED |
+ imageLoader_load(l, IMAGE_REQUIRED |
IMAGE_IGNORE_IF_LOCKED);
}
}
@@ -1393,7 +1398,6 @@ _getBuildHardwareIni( AvdInfo* i )
AvdInfo*
avdInfo_newForAndroidBuild( const char* androidBuildRoot,
const char* androidOut,
- const char* targetArch,
AvdInfoParams* params )
{
AvdInfo* i;
@@ -1404,7 +1408,6 @@ avdInfo_newForAndroidBuild( const char* androidBuildRoot,
i->androidBuildRoot = ASTRDUP(androidBuildRoot);
i->androidOut = ASTRDUP(androidOut);
i->contentPath = ASTRDUP(androidOut);
- i->targetArch = ASTRDUP(targetArch);
/* TODO: find a way to provide better information from the build files */
i->deviceName = ASTRDUP("<build>");
diff --git a/android/avd/info.h b/android/avd/info.h
index 1a65355..2b2899f 100644
--- a/android/avd/info.h
+++ b/android/avd/info.h
@@ -126,7 +126,6 @@ AvdInfo* avdInfo_new( const char* name, AvdInfoParams* params );
*/
AvdInfo* avdInfo_newForAndroidBuild( const char* androidBuildRoot,
const char* androidOut,
- const char* targetArch,
AvdInfoParams* params );
/* Frees an AvdInfo object and the corresponding strings that may be
diff --git a/android/cmdline-options.h b/android/cmdline-options.h
index 70e5f6c..273d151 100644
--- a/android/cmdline-options.h
+++ b/android/cmdline-options.h
@@ -131,9 +131,7 @@ OPT_FLAG( version, "display emulator version number" )
OPT_PARAM( report_console, "<socket>", "report console port to remote socket" )
OPT_PARAM( gps, "<device>", "redirect NMEA GPS to character device" )
-#ifndef CONFIG_STANDALONE_CORE
OPT_PARAM( keyset, "<name>", "specify keyset file name" )
-#endif
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" )
diff --git a/android/config/config.h b/android/config/config.h
index e07cc2c..fdfbe31 100644
--- a/android/config/config.h
+++ b/android/config/config.h
@@ -1,9 +1,4 @@
-/* This file is included by target-specific files under
- * android/config/target-$ARCH/config.h, but contains all config
- * definitions that are independent of the target CPU.
- *
- * Do not include directly.
- */
+/* Automatically generated by configure - do not modify */
#include "config-host.h"
#define TARGET_PHYS_ADDR_BITS 32
@@ -16,4 +11,13 @@
#define CONFIG_NAND_LIMITS 1
#endif
#define CONFIG_ANDROID_SNAPSHOTS 1
-#define CONFIG_MEMCHECK 1
+
+#ifdef ARCH_FLAGS_x86
+#define TARGET_ARCH "x86"
+#define TARGET_I386 1
+#else
+#define TARGET_ARCH "arm"
+#define TARGET_ARM 1
+#define CONFIG_SOFTFLOAT 1
+#endif
+
diff --git a/android/config/target-arm/config.h b/android/config/target-arm/config.h
deleted file mode 100644
index d6da04f..0000000
--- a/android/config/target-arm/config.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* ARM-specific configuration */
-#include "android/config/config.h"
-
-#define TARGET_ARM 1
-#define CONFIG_SOFTFLOAT 1
diff --git a/android/config/target-x86/config.h b/android/config/target-x86/config.h
deleted file mode 100644
index ea31c39..0000000
--- a/android/config/target-x86/config.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* x86-specific configuration */
-#include "android/config/config.h"
-#define TARGET_I386 1
diff --git a/android/help.c b/android/help.c
index a2180ef..7df6704 100644
--- a/android/help.c
+++ b/android/help.c
@@ -213,7 +213,6 @@ help_disk_images( stralloc_t* out )
datadir );
}
-#ifndef CONFIG_STANDALONE_CORE
static void
help_keys(stralloc_t* out)
{
@@ -254,7 +253,7 @@ help_keys(stralloc_t* out)
PRINTF( "\n" );
PRINTF( " note that NumLock must be deactivated for keypad keys to work\n\n" );
}
-#endif /* !CONFIG_STANDALONE_CORE */
+
static void
help_environment(stralloc_t* out)
@@ -286,7 +285,7 @@ help_environment(stralloc_t* out)
);
}
-#ifndef CONFIG_STANDALONE_CORE
+
static void
help_keyset_file(stralloc_t* out)
{
@@ -356,7 +355,7 @@ help_keyset_file(stralloc_t* out)
"\n"
);
}
-#endif /* !CONFIG_STANDALONE_CORE */
+
static void
help_debug_tags(stralloc_t* out)
@@ -1305,7 +1304,6 @@ help_gps(stralloc_t* out)
}
-#ifndef CONFIG_STANDALONE_CORE
static void
help_keyset(stralloc_t* out)
{
@@ -1345,7 +1343,6 @@ help_keyset(stralloc_t* out)
"\n"
);
}
-#endif /* !CONFIG_STANDALONE_CORE */
static void
help_old_system(stralloc_t* out)
@@ -1497,15 +1494,11 @@ typedef struct {
static const TopicHelp topic_help[] = {
{ "disk-images", "about disk images", help_disk_images },
-#ifndef CONFIG_STANDALONE_CORE
{ "keys", "supported key bindings", help_keys },
-#endif
{ "debug-tags", "debug tags for -debug <tags>", help_debug_tags },
{ "char-devices", "character <device> specification", help_char_devices },
{ "environment", "environment variables", help_environment },
-#ifndef CONFIG_STANDALONE_CORE
{ "keyset-file", "key bindings configuration file", help_keyset_file },
-#endif
{ "virtual-device", "virtual device management", help_virtual_device },
{ "sdk-images", "about disk images when using the SDK", help_sdk_images },
{ "build-images", "about disk images when building Android", help_build_images },
diff --git a/android/main-common.c b/android/main-common.c
index 3c8b320..bb07943 100644
--- a/android/main-common.c
+++ b/android/main-common.c
@@ -19,16 +19,8 @@
#include <process.h>
#endif
-#ifndef CONFIG_STANDALONE_CORE
#include <SDL.h>
#include <SDL_syswm.h>
-#include "android/qemulator.h"
-#include "android/skin/image.h"
-#include "android/skin/trackball.h"
-#include "android/skin/keyboard.h"
-#include "android/skin/file.h"
-#include "android/skin/window.h"
-#endif
#include "console.h"
@@ -39,7 +31,13 @@
#include "android/globals.h"
#include "android/resource.h"
#include "android/user-config.h"
+#include "android/qemulator.h"
#include "android/display.h"
+#include "android/skin/image.h"
+#include "android/skin/trackball.h"
+#include "android/skin/keyboard.h"
+#include "android/skin/file.h"
+#include "android/skin/window.h"
@@ -56,20 +54,6 @@
/*** CONFIGURATION
***/
-#ifdef CONFIG_STANDALONE_CORE
-
-void
-user_config_init( void )
-{
-}
-
-/* only call this function on normal exits, so that ^C doesn't save the configuration */
-void
-user_config_done( void )
-{
-}
-
-#else /* !CONFIG_STANDALONE_CORE */
static AUserConfig* userConfig;
void
@@ -102,7 +86,6 @@ user_config_get_window_pos( int *window_x, int *window_y )
if (userConfig)
auserConfig_getWindowPos(userConfig, window_x, window_y);
}
-#endif /* !CONFIG_STANDALONE_CORE */
unsigned convertBytesToMB( uint64_t size )
{
@@ -122,7 +105,6 @@ uint64_t convertMBToBytes( unsigned megaBytes )
}
-#ifndef CONFIG_STANDALONE_CORE
/***********************************************************************/
/***********************************************************************/
/***** *****/
@@ -217,7 +199,7 @@ write_default_keyset( void )
}
}
-#endif /* !CONFIG_STANDALONE_CORE */
+
/***********************************************************************/
/***********************************************************************/
@@ -227,8 +209,6 @@ write_default_keyset( void )
/***********************************************************************/
/***********************************************************************/
-#ifndef CONFIG_STANDALONE_CORE
-
void *readpng(const unsigned char* base, size_t size, unsigned *_width, unsigned *_height);
#ifdef CONFIG_DARWIN
@@ -289,19 +269,15 @@ sdl_set_window_icon( void )
}
}
-#ifndef CONFIG_STANDALONE_CORE
SDL_Surface* icon = sdl_surface_from_argb32( icon_pixels, icon_w, icon_h );
if (icon != NULL) {
SDL_WM_SetIcon(icon, NULL);
SDL_FreeSurface(icon);
free( icon_pixels );
}
-#endif
-
#endif /* !_WIN32 */
}
}
-#endif /* !CONFIG_STANDALONE_CORE */
/***********************************************************************/
/***********************************************************************/
@@ -314,7 +290,7 @@ sdl_set_window_icon( void )
const char* skin_network_speed = NULL;
const char* skin_network_delay = NULL;
-#ifndef CONFIG_STANDALONE_CORE
+
static void sdl_at_exit(void)
{
user_config_done();
@@ -343,7 +319,6 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
android_display_init(ds, qframebuffer_fifo_get());
#endif
}
-#endif
/* list of skin aliases */
static const struct {
@@ -487,26 +462,6 @@ DEFAULT_SKIN:
}
-#ifdef CONFIG_STANDALONE_CORE
-void
-init_sdl_ui(AConfig* skinConfig,
- const char* skinPath,
- AndroidOptions* opts)
-{
- signal(SIGINT, SIG_DFL);
-#ifndef _WIN32
- signal(SIGQUIT, SIG_DFL);
- /* prevent SIGTTIN and SIGTTOUT from stopping us. this is necessary to be
- * able to run the emulator in the background (e.g. "emulator &").
- * despite the fact that the emulator should not grab input or try to
- * write to the output in normal cases, we're stopped on some systems
- * (e.g. OS X)
- */
- signal(SIGTTIN, SIG_IGN);
- signal(SIGTTOU, SIG_IGN);
-#endif
-}
-#else /* !CONFIG_STANDALONE_CORE */
void
init_sdl_ui(AConfig* skinConfig,
const char* skinPath,
@@ -581,7 +536,6 @@ init_sdl_ui(AConfig* skinConfig,
qemulator_get()->onion_rotation = rotate;
}
}
-#endif /* !CONFIG_STANDALONE_CORE */
int64_t get_screen_pixels(AConfig* skinConfig)
{
diff --git a/android/main-ui.c b/android/main-ui.c
index c31cfef..ca83a9a 100644
--- a/android/main-ui.c
+++ b/android/main-ui.c
@@ -812,7 +812,6 @@ int main(int argc, char **argv)
android_avdInfo = avdInfo_newForAndroidBuild(
android_build_root,
android_build_out,
- "arm",
android_avdParams );
if(android_avdInfo == NULL) {
diff --git a/android/main.c b/android/main.c
index 15adaf4..919810b 100644
--- a/android/main.c
+++ b/android/main.c
@@ -26,11 +26,8 @@
#include "console.h"
#include "user-events.h"
-#ifndef CONFIG_STANDALONE_CORE
#include <SDL.h>
#include <SDL_syswm.h>
-#include "android/qemulator.h"
-#endif
#include "math.h"
@@ -51,6 +48,7 @@
#include "android/globals.h"
+#include "android/qemulator.h"
#include "android/display.h"
#include "android/snapshot.h"
@@ -262,7 +260,7 @@ _adjustPartitionSize( const char* description,
if (imageMB > defaultMB) {
snprintf(temp, sizeof temp, "(%d MB > %d MB)", imageMB, defaultMB);
} else {
- snprintf(temp, sizeof temp, "(%" PRUd64" bytes > %" PRUd64" bytes)", imageBytes, defaultBytes);
+ snprintf(temp, sizeof temp, "(%lld bytes > %lld bytes)", imageBytes, defaultBytes);
}
if (inAndroidBuild) {
@@ -605,7 +603,6 @@ int main(int argc, char **argv)
android_avdInfo = avdInfo_newForAndroidBuild(
android_build_root,
android_build_out,
- TARGET_ARCH,
android_avdParams );
if(android_avdInfo == NULL) {
@@ -634,7 +631,6 @@ int main(int argc, char **argv)
exit(1);
}
-#ifndef CONFIG_STANDALONE_CORE
if (opts->keyset) {
parse_keyset(opts->keyset, opts);
if (!android_keyset) {
@@ -657,7 +653,6 @@ int main(int argc, char **argv)
write_default_keyset();
}
}
-#endif /* !CONFIG_STANDALONE_CORE */
if (opts->shared_net_id) {
char* end;
@@ -1095,7 +1090,7 @@ int main(int argc, char **argv)
}
/* Pass LCD density value to the core. */
- snprintf(lcd_density, sizeof(lcd_density), "%d", hw->hw_lcd_density);
+ snprintf(lcd_density, sizeof(lcd_density), "%d", get_device_dpi(opts));
args[n++] = "-lcd-density";
args[n++] = lcd_density;
diff --git a/android/utils/system.h b/android/utils/system.h
index 464957d..c8163c6 100644
--- a/android/utils/system.h
+++ b/android/utils/system.h
@@ -173,12 +173,6 @@ extern void sleep_ms( int timeout );
#ifndef PRIx64
# define PRIx64 "llx"
#endif
-#ifndef PRUd64
-# define PRUd64 "llu"
-#endif
-#ifndef PRUx64
-# define PRUx64 "llx"
-#endif
/* */