09/25/2008

KeycodeChecker.apk for Android 1.0

Finally, Android 1.0 SDK has been released. The kernel is exactly same as Android 0.9. Just poring system image into my Zaurus, Android 1.0 works fine.

I rebuild KeycodeChecker on 1.0 SDK.
o KeycodeChecker-1.0-r1.zip

Just in case, if anyone is looking for keylayout file working on Zaurus, here is the one.
o qwerty.kl.zip

One issue currently I'm working on. Landscape view and portrait view issue. Until SDK m5, Zaurus booted up in portrait view which is hardware buffer aligned. But with Android 0.9 and 1.0, Zaurus boots in landscape view. It has huge impact to performance. I used to run my RotateView.apk to make adjustment, but the APIs RotateView uses have gone. I'm looking for alternative API but still can not find.

Cheers,
posted by 安藤恐竜 at 09:22 | Comment(7) | TrackBack(0) | 日記

09/09/2008

V8 on Angstrom Zaurus

Chrome shines! V8 rocks!

I've been using Chrome since release and love more and more. Chrome is maximized on my desktop all the time and I'm crusing the Net with shortcut keys.

Chrome on Android is rumored. And amazingly V8 the Javascript engine is already ported to ARM. I couldn't wait for Android Chrome, so tried to build V8 for Zaurus.

First of all, grab the source code.
svn checkout http://v8.googlecode.com/svn/trunk/ v8
I tried to cross compile by modifing scons scripts, but no luck. Next I tried to port scons itself to Angstrom but so many problems, then forgot about it.

Quick dirty hack. Batch build, I tried.

First dry run scons on PC to generate script file.
$ scons -nQ toolchain=gcc arch=arm library=static os=linux sample=shell > build.sh  2>&1
Copy it and add #!/bin/sh at the fist line, add executable permission and fire it.
# ./build.sh
src/macro-assembler-arm.cc:66:2: error: #error "for thumb inter-working we require architecture v5t or above"
It looks V8 is really ported to ARM. It is promissing. I modified build.sh adding;
-march=armv5te -mtune=xscale
to tell compile generate Armv5t binary. There is a little patch required to compile platform-linux.cc
diff -ur --exclude .o v8/src/platform-linux.cc v8-work/src/platform-linux.cc
--- v8/src/platform-linux.cc 2008-09-03 11:42:30.000000000 +0900
+++ v8y-work/src/platform-linux.cc 2008-09-07 11:02:35.226762251 +0900
@@ -567,8 +567,10 @@
ucontext_t* ucontext = reinterpret_cast(context);
mcontext_t& mcontext = ucontext->uc_mcontext;
#if defined (__arm__) || defined(__thumb__)
- sample.pc = mcontext.gregs[R15];
- sample.sp = mcontext.gregs[R13];
+ // sample.pc = mcontext.gregs[R15];
+ // sample.sp = mcontext.gregs[R13];
+ sample.pc = mcontext.arm_pc;
+ sample.sp = mcontext.arm_sp;
#else
sample.pc = mcontext.gregs[REG_EIP];
sample.sp = mcontext.gregs[REG_ESP];
Another and final touch to build.sh is required to avoid JS2C script. Commnet out JS2C line and copy libraries.cc from PC. I guess this libraries.cc is platform independent, so just scons on PC and pull obj/relrease/libraries.cc to Zaurus.

Finally I got libv8.a and shell program
# file shell
shell: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14,
dynamically linked (uses shared libs), not stripped

# ./shell
V8 version 0.3.0
> for (var n in function() { return this } () ) print(n)
n
escape
unescape
decodeURI
decodeURIComponent
encodeURI
encodeURIComponent
load
quit
print
version
> quit()
I tried to run benchmark script in source tree but the program dies in out of memory.
~/work/v8/benchmarks# ../shell run.js 

#
# Fatal error in CALL_HEAP_FUNCTION
# Allocation failed - process out of memory
#

Aborted

Conclusion. V8 does run on ARM. V8 on Android will be possible once source code becomes available.

Cheers,

posted by 安藤恐竜 at 17:18 | Comment(1) | TrackBack(0) | 日記

広告


この広告は60日以上更新がないブログに表示がされております。

以下のいずれかの方法で非表示にすることが可能です。

・記事の投稿、編集をおこなう
・マイブログの【設定】 > 【広告設定】 より、「60日間更新が無い場合」 の 「広告を表示しない」にチェックを入れて保存する。


×

この広告は1年以上新しい記事の投稿がないブログに表示されております。