Wednesday, June 8, 2011

How to build android-x86 on 32bit PC (8)

This time I tried using ccache, but it may not help much.
root@kinneko-T91MT:/media/x86backup/gb86# prebuilt/linux-x86/ccache/ccache -s
cache directory                     /root/.ccache
cache hit                            181
cache miss                          8325
called for link                      294
not a C/C++ file                     255
unsupported compiler option           41
files in cache                     13823
cache size                         878.8 Mbytes
max cache size                     976.6 Mbytes

How to build android-x86 on 32bit PC (7)

The preparations were complete.
Just only do build.
I selected target to 'tegav2'.
In android-x86, the setting of viewpad10 had not been included yet.
root@kinneko-T91MT:/media/x86backup/gb86# source build/envsetup.sh
WARNING: Only bash is supported, use of other shell would lead to erroneous results
including device/asus/eeepc/vendorsetup.sh
including device/asus/laptop/vendorsetup.sh
including device/dell/sparta/vendorsetup.sh
including device/tegatech/tegav2/vendorsetup.sh
including device/vm/vm/vendorsetup.sh
root@kinneko-T91MT:/media/x86backup/gb86# lunch tegav2-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=tegav2
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86-atom
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRJ22
============================================
root@kinneko-T91MT:/media/x86backup/gb86# export USE_CCACHE=1
root@kinneko-T91MT:/media/x86backup/gb86# make clean
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=tegav2
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86-atom
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRJ22
============================================
Checking build tools versions...
Entire build directory removed.
root@kinneko-T91MT:/media/x86backup/gb86# time make usb_img -j4 TARGET_PRODUCT=tegav2 2>&1 | tee make0608tega.log
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=tegav2
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86-atom
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRJ22
============================================
Checking build tools versions...
(snip)
----- Making usb image ------
I/diskconfig( 1335): Requesting operation on a regular file, not block device.
I/config_mbr( 1335): Configuring pentry. status=0x80 type=0x83 start_lba=2048 len_lba=321496
I/config_mbr( 1335): Configuring pentry. status=0x0 type=0x0 start_lba=0 len_lba=0
I/config_mbr( 1335): Configuring pentry. status=0x0 type=0x0 start_lba=0 len_lba=0
I/config_mbr( 1335): Configuring pentry. status=0x0 type=0x0 start_lba=0 len_lba=0
I/diskutils( 1335): Writing RAW image 'out/target/product/tegav2/usb_tmp.img' to 'out/target/product/tegav2/tegav2_usb.img' (offset=1048576)
I/diskutils( 1335): Wrote 164605952 bytes to out/target/product/tegav2/tegav2_usb.img @ 1048576
Updated usb_boot length to be 160748KB
Copying images to specified partition offsets
File edit complete. Wrote 1 images.
real 424m15.010s
user 701m0.349s
sys 50m36.150s
it took half day... orz

How to build android-x86 on 32bit PC (6)

I tried another way, called 'cherry-pic'.
root@kinneko-T91MT:/media/x86backup/gb86/build# git fetch git://android.git.kernel.org/platform/build refs/changes/34/23134/1 && git cherry-pick FETCH_HEAD
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 5 (delta 4), reused 5 (delta 4)
Unpacking objects: 100% (5/5), done.
From git://android.git.kernel.org/platform/build
 * branch            refs/changes/34/23134/1 -> FETCH_HEAD
Finished one cherry-pick.
[detached HEAD d26be4b] Relax the constraint of 64bit build environment.
 Author: Ying Wang <wangying@android.com>
 2 files changed, 6 insertions(+), 11 deletions(-)

root@kinneko-T91MT:/media/x86backup/gb86/build# cd ../external/clearsilver/
root@kinneko-T91MT:/media/x86backup/gb86/external/clearsilver# git fetch git://android.git.kernel.org/platform/external/clearsilver refs/changes/35/23135/1 && git cherry-pick FETCH_HEAD
From git://android.git.kernel.org/platform/external/clearsilver
 * branch            refs/changes/35/23135/1 -> FETCH_HEAD
Finished one cherry-pick.
[detached HEAD b882f99] Build 64bit clearsilver if jdk is 64bit version.
 Author: Ying Wang <wangying@android.com>
 4 files changed, 8 insertions(+), 4 deletions(-)

root@kinneko-T91MT:/media/x86backup/gb86/external/clearsilver# cd ../../bootable/recovery/
root@kinneko-T91MT:/media/x86backup/gb86/bootable/recovery# git fetch git://android.git.kernel.org/platform/bootable/recovery refs/changes/36/23136/1 && git cherry-pick FETCH_HEAD
From git://android.git.kernel.org/platform/bootable/recovery
 * branch            refs/changes/36/23136/1 -> FETCH_HEAD
Finished one cherry-pick.
[detached HEAD ad1c9e2] Mute unharmful build warning at the top of the build log:
 Author: Ying Wang <wangying@android.com>
 1 files changed, 1 insertions(+), 1 deletions(-)

root@kinneko-T91MT:/media/x86backup/gb86/bootable/recovery# cd ../../frameworks/base/
root@kinneko-T91MT:/media/x86backup/gb86/frameworks/base# git fetch git://android.git.kernel.org/platform/frameworks/base refs/changes/37/23137/1 && git cherry-pick FETCH_HEAD
remote: Counting objects: 167, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 100 (delta 51), reused 77 (delta 31)
Receiving objects: 100% (100/100), 48.41 KiB, done.
Resolving deltas: 100% (51/51), completed with 33 local objects.
From git://android.git.kernel.org/platform/frameworks/base
 * branch            refs/changes/37/23137/1 -> FETCH_HEAD
Finished one cherry-pick.
[detached HEAD f0710be] Fix the html dir.
 Author: Ying Wang <wangying@android.com>
 1 files changed, 1 insertions(+), 1 deletions(-)
This will probably all right.

How to build android-x86 on 32bit PC (5)

32bit patches can download 'repo download' command.
~/bin/repo download platform/build 23134/1
~/bin/repo download platform/external/clearsilver 23135/1
~/bin/repo download platform/bootable/recovery 23136/1
~/bin/repo download platform/frameworks/base 23137/1
But, something was wrong.
root@kinneko-T91MT:/media/x86backup/gb86# ~/bin/repo download platform/build 23134/1
fatal: Couldn't find remote ref refs/changes/34/23134/1
[platform/build] change 23134/1 not found
I was not able to use 'repo download'.

How to build android-x86 on 32bit PC (4)

You get 'repo' and do 'init', 'sync'.
This is the same as a general procedure in ARM.
The difference is specification of Manifest and the branch that does init.
These, android-x86 is dedicated.
$ sudo su -
# mkdir ~/bin
# curl http://android.git.kernel.org/repo > ~/bin/repo
# chmod a+x ~/bin/repo
# mkdir ~/gb86
# cd ~/gb86
# ~/bin/repo init -u git://git.android-x86.org/manifest.git -b gingerbread-x86
# ~/bin/repo sync -j4
-j4 means run 4 threads.
'sync' is so very slow, done in multiple threads is more efficient.

How to build android-x86 on 32bit PC (3)

About how to setup build environment,
I wrote it my Japanese blog :

「Ubuntu 10.10にてFroyoビルド環境を作成してビルドするの手順」
http://d.hatena.ne.jp/kinneko/20110416/p13

If you want to use Debian/GNU Linux,
this post will be helpful.

「squeezeにてGingerbreadビルド環境を作成してビルドするの手順 」
http://d.hatena.ne.jp/kinneko/20110527/p7

Sorry, it's only Japanese.

How to build android-x86 on 32bit PC (2)

Ying Wang released some patches about this 32bit problem.
Great!

I wrote it my Japanese blog : 
「32bitでもgbをビルドできるようにするパッチを導入する。」

Patches are here.
Change Id8be221d: Relax the constraint of 64bit build environment.
Change I852312db: Build 64bit clearsilver if jdk is 64bit version.
Change I393313e9: Fix the html dir.
Change I269b1703: Mute unharmful build warning at the top of the build log:

I'll try them.

How to build android-x86 on 32bit PC (1)

I borrowed  'CZC P10T' Atom tablet from one of my friend.
P10T is base model of TegaV2 and Viewpad10.
I try to install Gingerbread in it.

After Gingerbread, we can't build android on 32bit PC and 32bit OS.
My build PC is very poor.
  • PC: ASUS EeePC T91MT
  • CPU: Intel Atom Z520 1.33GHz (32bit, Single core, fake HT)
  • RAM: 2GB
  • Dist: Ubuntu 10.10
but I have only this one.
Oh! I can't build Gingerbread...

Almost app may build 32bit.
Why Google change it?
I don't understand.

Nice to meet you! this is kinneko.

Nice to meet you! this is kinneko.
In Japanese, 'kin-neko' means 'Golden Cat'.
I'm a Japanese.
I have been working as an engineer about 30 years.
One of my profession is embeded linux.
I like Android.

Recently, my friend tetsu_koba, started a blog in English.
He aims for writing 100 blog by the end of this year.
Through his blog, He exchanges comments with many peoples,
and he talks about it very happily.

I decided to started a blog in English too.

Thanks.