Software/Android/bc9/userland(1/2)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
]
開始行:
[[Software/Android]]~
[[Software/Android/bc9]]~
[[Software/Android/bc9/userland(2/2)]]~
#contents
*Android userland の作成1 [#w185e6d6]
オープンソース版 Android のソースコードを入手し、自分で b...
-[[Get source ‎(Android Open Source Project):http:/...
build に必要なアプリケーションやパッケージは上記を参照し...
**source の入手 [#jb910f43]
+作業用ディレクトリを作成し、
$ mkdir mydroid
$ cd mydroid
+repo 初期化。今回は master branch を使用します。(2009年3...
$ repo init -u git://android.git.kernel.org/platform/man...
+ソースコードを checkout。
$ repo sync
以下のファイル・ディレクトリがあることを確認して下さい。
$ ls
Makefile build external kernel system
bionic dalvik frameworks packages
bootable development hardware prebuilt
**gumstix用修正 [#y405877f]
gumstix 上で動作させるため、build の前にソースコードに若...
(必須ではないかも知れませんが、当方ではこの設定でうまく...
&color(red){2009年4月の cupcake ブランチからの merge 作業...
(参考 http://androidzaurus.seesaa.net/article/116995835.h...
&color(red){2009年5月1日追記 4月30日時点で repo sync し...
&color(red){repo sync したまま build したものでは起動時に...
&color(red){また BootAnimation が変更されましたので、新し...
+~pmem 不使用設定~
(参考 http://groups.google.co.jp/group/android-embedded-...
特定のアプリケーションの動作のため大きな連続メモリ領域の...
gumstix 上で Android がうまく動作しなかったので、
~/mydroid/system/core/init/devices.c
を以下のように変更し、無効にします。
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...
+~Boot animation 表示位置修正~
起動時に表示される Android のロゴと Android Robot 点滅ア...
(参考 https://review.source.android.com/Gerrit#change,155...
~
・ソースコードの修正~
~/mydroid/frameworks/base/libs/surfaceflinger/BootAnimat...
を以下のように修正します。
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
・画像ファイルの入れ替え~
BootAnimation.cpp の中で呼び出して表示している画像ファイル
~/mydroid/frameworks/base/core/res/assets/images/android...
を元に gumstix の LCD に合わせた画像ファイル android_480x...
&ref(android_480x272.png);~
+~キーイベントチェックの変更 ~
(参考 http://ozetchi.cocolog-nifty.com/amerika/2009/02/po...
~mydroid/frameworks/base/services/java/com/android/serve...
のキー入力送信を待つ thread 内のチェックを外し必ず入力を...
(電源管理との関係で入力が拾えなくなるのを防ぐため)~
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) {
**build [#t986a662]
上記の修正を加えたら、mydroid ディレクトリに移動し build ...
$ cd ~/mydroid
$ make
[[Software/Android/bc9/userland(2/2)]]
-----------------
RIGHT:by 大塚聡史
終了行:
[[Software/Android]]~
[[Software/Android/bc9]]~
[[Software/Android/bc9/userland(2/2)]]~
#contents
*Android userland の作成1 [#w185e6d6]
オープンソース版 Android のソースコードを入手し、自分で b...
-[[Get source ‎(Android Open Source Project):http:/...
build に必要なアプリケーションやパッケージは上記を参照し...
**source の入手 [#jb910f43]
+作業用ディレクトリを作成し、
$ mkdir mydroid
$ cd mydroid
+repo 初期化。今回は master branch を使用します。(2009年3...
$ repo init -u git://android.git.kernel.org/platform/man...
+ソースコードを checkout。
$ repo sync
以下のファイル・ディレクトリがあることを確認して下さい。
$ ls
Makefile build external kernel system
bionic dalvik frameworks packages
bootable development hardware prebuilt
**gumstix用修正 [#y405877f]
gumstix 上で動作させるため、build の前にソースコードに若...
(必須ではないかも知れませんが、当方ではこの設定でうまく...
&color(red){2009年4月の cupcake ブランチからの merge 作業...
(参考 http://androidzaurus.seesaa.net/article/116995835.h...
&color(red){2009年5月1日追記 4月30日時点で repo sync し...
&color(red){repo sync したまま build したものでは起動時に...
&color(red){また BootAnimation が変更されましたので、新し...
+~pmem 不使用設定~
(参考 http://groups.google.co.jp/group/android-embedded-...
特定のアプリケーションの動作のため大きな連続メモリ領域の...
gumstix 上で Android がうまく動作しなかったので、
~/mydroid/system/core/init/devices.c
を以下のように変更し、無効にします。
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...
+~Boot animation 表示位置修正~
起動時に表示される Android のロゴと Android Robot 点滅ア...
(参考 https://review.source.android.com/Gerrit#change,155...
~
・ソースコードの修正~
~/mydroid/frameworks/base/libs/surfaceflinger/BootAnimat...
を以下のように修正します。
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
・画像ファイルの入れ替え~
BootAnimation.cpp の中で呼び出して表示している画像ファイル
~/mydroid/frameworks/base/core/res/assets/images/android...
を元に gumstix の LCD に合わせた画像ファイル android_480x...
&ref(android_480x272.png);~
+~キーイベントチェックの変更 ~
(参考 http://ozetchi.cocolog-nifty.com/amerika/2009/02/po...
~mydroid/frameworks/base/services/java/com/android/serve...
のキー入力送信を待つ thread 内のチェックを外し必ず入力を...
(電源管理との関係で入力が拾えなくなるのを防ぐため)~
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) {
**build [#t986a662]
上記の修正を加えたら、mydroid ディレクトリに移動し build ...
$ cd ~/mydroid
$ make
[[Software/Android/bc9/userland(2/2)]]
-----------------
RIGHT:by 大塚聡史
ページ名:
BC::labsへの質問は、bc9-dev @ googlegroups.com までお願い致します。