2009年6月1日月曜日

embinux Android

embinuxのgit repositryからrepo syncしたAndroidにはTLSパッチがあたっていないようなので,とりあえず以下の修正を入れてAndroidを起動。

diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h
index da34344..5b8d8fc 100644
--- a/libc/private/bionic_tls.h
+++ b/libc/private/bionic_tls.h
@@ -81,7 +81,9 @@ extern int __set_tls(void *ptr);

/* get the TLS */
#ifdef __arm__
-# define __get_tls() ( *((volatile void **) 0xffff0ff0) )
+/*# define __get_tls() ( *((volatile void **) 0xffff0ff0) )*/
+typedef void* (__get_tls_t) (void);
+static const __get_tls_t* __get_tls = (const __get_tls_t *)0xffff0fe0;
#else
extern void* __get_tls( void );
#endif

diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h
index 63fb017..22c7b98 100644
--- a/opengl/libs/hooks.h
+++ b/opengl/libs/hooks.h
@@ -35,7 +35,7 @@
#define MAX_NUMBER_OF_GL_EXTENSIONS 32


-#if defined(HAVE_ANDROID_OS) && !USE_SLOW_BINDING && !GL_LOGGER && __OPTIMIZE__
+#if 0 && defined(HAVE_ANDROID_OS) && !USE_SLOW_BINDING && !GL_LOGGER && __OPTIM
IZE__
#define USE_FAST_TLS_KEY 1
#else
#define USE_FAST_TLS_KEY 0

0 件のコメント: