Android userland for bc9 (1/2)
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[Android]]~
[[Android userland for bc9 (2/2)]]~
#contents
*Setting up Android userland 1 [#s7ac0872]
It is assumed that you get and build open source version ...
-[[Get source ‎(Android Open Source Project):http:/...
Before you proceed, please install and set up required ap...
**Obtaining source [#p9b4af08]
+Make an directory:
$ mkdir mydroid
$ cd mydroid
+Init repo. This time we use master branch. (We are using...
$ repo init -u git://android.git.kernel.org/platform/man...
+Checkout source code.
$ repo sync
Make sure that following directories are exist:
$ ls
Makefile build external kernel system
bionic dalvik frameworks packages
bootable development hardware prebuilt
**Adjustment for gumstix [#f9c77680]
In order to run Android on gumstix, we add small modifica...
(Some of these may be not necessary. Though we add these ...
&color(red){On April 2009 a lots of source code are merge...
(reference http://androidzaurus.seesaa.net/article/11699...
+~Disable pmem~
(reference  http://groups.google.co.jp/grou...
pmem is a function to allocate a large continuous physica...
When pmem is enabled, Android won't work on gumstix.
~/mydroid/system/core/init/devices.c
So modify this file as follows:
diff -u devices.c.original devices.c
--- devices.c.original 2009-03-30 19:05:50.000000000 +0900
+++ devices.c 2009-03-11 19:13:54.000000000 +0900
@@ -109,9 +109,9 @@
{ "/dev/eac", 0660, AID_ROOT, AID...
{ "/dev/cam", 0660, AID_ROOT, AID...
{ "/dev/pmem", 0660, AID_SYSTEM, AID...
- { "/dev/pmem_gpu", 0660, AID_SYSTEM, AID...
- { "/dev/pmem_adsp", 0660, AID_SYSTEM, AID...
- { "/dev/pmem_camera", 0660, AID_SYSTEM, AID...
+ { "/dev/pmem_gpu", 0660, AID_SYSTEM, AID...
+ { "/dev/pmem_adsp", 0660, AID_SYSTEM, AID...
+ { "/dev/pmem_camera", 0660, AID_SYSTEM, AID...
{ "/dev/oncrpc/", 0660, AID_ROOT, AID...
{ "/dev/adsp/", 0660, AID_SYSTEM, AID...
{ "/dev/mt9t013", 0660, AID_SYSTEM, AID...
+~Fixing drawing position of Boot animation~
To fix position of Android's logo and robot blinking anim...
(reference https://review.source.android.com/Gerrit#chan...
~
-Modifying source code~
~/mydroid/frameworks/base/libs/surfaceflinger/BootAnimat...
Modify source code as follows:
diff -u BootAnimation.cpp.original BootAnimation.cpp
--- BootAnimation.cpp.original 2009-03-30 19:53:25.00000...
+++ BootAnimation.cpp 2009-03-25 20:59:04.000000000 +0900
@@ -196,6 +196,7 @@
return r;
}
+static const int RIGHT_MARGIN = 112;
bool BootAnimation::android()
{
- initTexture(&mAndroid[0], mAssets, "images/android_...
+ initTexture(&mAndroid[0], mAssets, "images/android_...
initTexture(&mAndroid[1], mAssets, "images/boot_rob...
initTexture(&mAndroid[2], mAssets, "images/boot_rob...
@@ -219,24 +221,28 @@
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_M...
const int steps = 8;
+ int x = (mWidth - mAndroid[0].w)/2;
+ int y = (mHeight - mAndroid[0].h)/2;
+ x = (x < 0) ? 0 : x;
+ y = (y < 0) ? 0 : y;
for (int i=1 ; i<steps ; i++) {
float fade = i / float(steps);
glColor4f(1, 1, 1, fade*fade);
glClear(GL_COLOR_BUFFER_BIT);
- glDrawTexiOES(0, 0, 0, mAndroid[0].w, mAndroid[...
+ glDrawTexiOES(x, y, 0, mAndroid[0].w, mAndroid[...
eglSwapBuffers(mDisplay, mSurface);
}
// draw last frame
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_R...
glDisable(GL_BLEND);
- glDrawTexiOES(0, 0, 0, mAndroid[0].w, mAndroid[0].h);
+ glDrawTexiOES(x, y, 0, mAndroid[0].w, mAndroid[0].h);
eglSwapBuffers(mDisplay, mSurface);
// update rect for the robot
- const int x = mWidth - mAndroid[1].w - 33;
- const int y = (mHeight - mAndroid[1].h)/2 - 1;
+ x = mWidth - (mWidth - mAndroid[0].w)/2 - mAndroid[...
+ y = (mHeight - mAndroid[1].h)/2 - 1;
const Rect updateRect(x, y, x+mAndroid[1].w, y+mAnd...
// draw and update only what we need
-Replace image file~
From the image file used in BootAnimation.cpp,
~/mydroid/frameworks/base/core/res/assets/images/android...
We made an image file android_480x272.png, fitted to gums...
Put this android_480x272.png file in same directory as an...
&ref(android_480x272.png);~
+~Modifying key event check ~
(reference http://ozetchi.cocolog-nifty.com/amerika/2009...
~mydroid/frameworks/base/services/java/com/android/serve...
Modify this file as follows:
diff -u KeyInputQueue.java.original KeyInputQueue.java
--- KeyInputQueue.java.original 2009-03-30 19:23:51.0000...
+++ KeyInputQueue.java 2009-03-11 12:31:56.000000000 +0900
@@ -247,7 +247,7 @@
}
if (!send) {
- continue;
+// continue;
}
synchronized (mFirst) {
This modification is for accepting key input event certai...
**build [#ifc21761]
After you finish those modifications, move to mydroid dir...
$ cd ~/mydroid
$ make
[[Android userland for bc9 (2/2)]]
---------------------------------------
RIGHT:by Satoshi OTSUKA
End:
[[Android]]~
[[Android userland for bc9 (2/2)]]~
#contents
*Setting up Android userland 1 [#s7ac0872]
It is assumed that you get and build open source version ...
-[[Get source ‎(Android Open Source Project):http:/...
Before you proceed, please install and set up required ap...
**Obtaining source [#p9b4af08]
+Make an directory:
$ mkdir mydroid
$ cd mydroid
+Init repo. This time we use master branch. (We are using...
$ repo init -u git://android.git.kernel.org/platform/man...
+Checkout source code.
$ repo sync
Make sure that following directories are exist:
$ ls
Makefile build external kernel system
bionic dalvik frameworks packages
bootable development hardware prebuilt
**Adjustment for gumstix [#f9c77680]
In order to run Android on gumstix, we add small modifica...
(Some of these may be not necessary. Though we add these ...
&color(red){On April 2009 a lots of source code are merge...
(reference http://androidzaurus.seesaa.net/article/11699...
+~Disable pmem~
(reference  http://groups.google.co.jp/grou...
pmem is a function to allocate a large continuous physica...
When pmem is enabled, Android won't work on gumstix.
~/mydroid/system/core/init/devices.c
So modify this file as follows:
diff -u devices.c.original devices.c
--- devices.c.original 2009-03-30 19:05:50.000000000 +0900
+++ devices.c 2009-03-11 19:13:54.000000000 +0900
@@ -109,9 +109,9 @@
{ "/dev/eac", 0660, AID_ROOT, AID...
{ "/dev/cam", 0660, AID_ROOT, AID...
{ "/dev/pmem", 0660, AID_SYSTEM, AID...
- { "/dev/pmem_gpu", 0660, AID_SYSTEM, AID...
- { "/dev/pmem_adsp", 0660, AID_SYSTEM, AID...
- { "/dev/pmem_camera", 0660, AID_SYSTEM, AID...
+ { "/dev/pmem_gpu", 0660, AID_SYSTEM, AID...
+ { "/dev/pmem_adsp", 0660, AID_SYSTEM, AID...
+ { "/dev/pmem_camera", 0660, AID_SYSTEM, AID...
{ "/dev/oncrpc/", 0660, AID_ROOT, AID...
{ "/dev/adsp/", 0660, AID_SYSTEM, AID...
{ "/dev/mt9t013", 0660, AID_SYSTEM, AID...
+~Fixing drawing position of Boot animation~
To fix position of Android's logo and robot blinking anim...
(reference https://review.source.android.com/Gerrit#chan...
~
-Modifying source code~
~/mydroid/frameworks/base/libs/surfaceflinger/BootAnimat...
Modify source code as follows:
diff -u BootAnimation.cpp.original BootAnimation.cpp
--- BootAnimation.cpp.original 2009-03-30 19:53:25.00000...
+++ BootAnimation.cpp 2009-03-25 20:59:04.000000000 +0900
@@ -196,6 +196,7 @@
return r;
}
+static const int RIGHT_MARGIN = 112;
bool BootAnimation::android()
{
- initTexture(&mAndroid[0], mAssets, "images/android_...
+ initTexture(&mAndroid[0], mAssets, "images/android_...
initTexture(&mAndroid[1], mAssets, "images/boot_rob...
initTexture(&mAndroid[2], mAssets, "images/boot_rob...
@@ -219,24 +221,28 @@
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_M...
const int steps = 8;
+ int x = (mWidth - mAndroid[0].w)/2;
+ int y = (mHeight - mAndroid[0].h)/2;
+ x = (x < 0) ? 0 : x;
+ y = (y < 0) ? 0 : y;
for (int i=1 ; i<steps ; i++) {
float fade = i / float(steps);
glColor4f(1, 1, 1, fade*fade);
glClear(GL_COLOR_BUFFER_BIT);
- glDrawTexiOES(0, 0, 0, mAndroid[0].w, mAndroid[...
+ glDrawTexiOES(x, y, 0, mAndroid[0].w, mAndroid[...
eglSwapBuffers(mDisplay, mSurface);
}
// draw last frame
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_R...
glDisable(GL_BLEND);
- glDrawTexiOES(0, 0, 0, mAndroid[0].w, mAndroid[0].h);
+ glDrawTexiOES(x, y, 0, mAndroid[0].w, mAndroid[0].h);
eglSwapBuffers(mDisplay, mSurface);
// update rect for the robot
- const int x = mWidth - mAndroid[1].w - 33;
- const int y = (mHeight - mAndroid[1].h)/2 - 1;
+ x = mWidth - (mWidth - mAndroid[0].w)/2 - mAndroid[...
+ y = (mHeight - mAndroid[1].h)/2 - 1;
const Rect updateRect(x, y, x+mAndroid[1].w, y+mAnd...
// draw and update only what we need
-Replace image file~
From the image file used in BootAnimation.cpp,
~/mydroid/frameworks/base/core/res/assets/images/android...
We made an image file android_480x272.png, fitted to gums...
Put this android_480x272.png file in same directory as an...
&ref(android_480x272.png);~
+~Modifying key event check ~
(reference http://ozetchi.cocolog-nifty.com/amerika/2009...
~mydroid/frameworks/base/services/java/com/android/serve...
Modify this file as follows:
diff -u KeyInputQueue.java.original KeyInputQueue.java
--- KeyInputQueue.java.original 2009-03-30 19:23:51.0000...
+++ KeyInputQueue.java 2009-03-11 12:31:56.000000000 +0900
@@ -247,7 +247,7 @@
}
if (!send) {
- continue;
+// continue;
}
synchronized (mFirst) {
This modification is for accepting key input event certai...
**build [#ifc21761]
After you finish those modifications, move to mydroid dir...
$ cd ~/mydroid
$ make
[[Android userland for bc9 (2/2)]]
---------------------------------------
RIGHT:by Satoshi OTSUKA
Page: