View source for Android/zh tw
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Android/zh tw.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Android/zh tw.
Languages: |
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català |
Android is one of the many distributions that currently work on the Openmoko phones. You can compare a distribution with an Operating System on normal computers. It gives the phone all the software needed for operating. For more information about the different flavors, see distributions.
本網頁撰寫的目地在於將Android OS 移植到 Neo 1973 及 Neo FreeRunner 手機上。Android OS 於2008年10月21日公開的發佈 。 下列的資訊,可以提供您暸解在 Neo 1973及 FreeRunner 移植工作 目前的運作情形 及現狀。
詳盡的在FreeRunner上安裝Android (使用 Sean McNeil的kernel及rootfs 套件,及 Qi bootloader) ,何以在http://www.copiesofcopies.org/webl/?p=34此網址找到。
就如同 Ben Leslie 在 blog 中所提到的,在 source code釋出之前,Android 被設計為使用ARMv5TE 架構instruction set architecture (ISA),允許 DSP 擴充的指令。 相較於 ARMv5TE ISA, the Neo1973 及 FreeRunner 電話聽筒都著重在arm920t core,並可以應用到 ARMv4T ISA。
在源碼開放之前,kernel trap handlers 被用來 '模擬' ARMv5TE ISA。雖然這個結果在不同的案例下運作,trapping 是較花成本及效能的一種結果。甚至於,在沒有明確的暸解哪個狀況是被不同的指令所設定的情兄下,如Thumb Mode execution,這個結果成為沒有定論。
隨著 Android釋出 source code,Open Source社群不再受限於使用binary-only 產品。The Open Handset Alliance (OHA)已經讓他們的source code 成為能讓大家致富及受益的產品。
目前,porting 以不同的循環模式運做。Patches需要透過 official Android channels提交。
Koolu,Freerunner 的經銷商, 在http://git.koolu.com釋出了他們搭載FreeRunner的源碼。參考 #Building the Koolu Android Source下的說明可以暸解到如何製作供給Freerunner使用的Android image。
為了要追蹤Android source tree的哪個部份包含了特定的 ARMv5 程式,我製作了包含patches狀態的表格。這個表格可以在 http://spreadsheets.google.com/pub?key=pzDEXnU19gkeTjpD28t-7fw 找到。User:Bricode
Sean McNeil 指出他可以在FreeRunner上執行包含通話功能的 Android。
Ben Leslie 也在android-porting list上指出他可以在Neo 1973 show出他的Android logo。
你可以使用以下的script:
#!/bin/sh currentdir=`pwd` ANDROID_OUT=out ANDROID_DEVICE=freerunner EXPORT_ROOT=$currentdir/build_jffs2_tmp Usage() { echo "Usage: $0 release|debug jffs2filename" } BuildImage() { if [ -d $1 ] then echo "[INFO] Copying from... $1" sudo rm -rf $EXPORT_ROOT mkdir $EXPORT_ROOT mkdir $EXPORT_ROOT/root # Copy the image... cd $1 tar cf - root | (cd $EXPORT_ROOT; sudo tar xf -) tar cf - system | (cd $EXPORT_ROOT/root; sudo tar xf -) # Change owner and permissions... cd $EXPORT_ROOT sudo chown -R root:root root sudo chmod -R 777 root cd $currentdir # Make the JFFS2 file mkfs.jffs2 --pad=0x700000 -o $2 -e 0x20000 -n -d$EXPORT_ROOT/root/ echo "[INFO] Image written to $2" sudo rm -rf $EXPORT_ROOT else echo "$1 does not exist!" fi } if [ $# != 2 ] then Usage else case $1 in release) BuildImage $ANDROID_OUT/target/product/$ANDROID_DEVICE $2 ;; debug) BuildImage $ANDROID_OUT/debug/target/product/$ANDROID_DEVICE $2 ;; *) Usage esac fi
目前並沒有與建置 Freerunner/Android kernel相關的說明文件。Sean McNeil 目前已經在 http://people.openmoko.org/sean_mcneil/ 這個位置釋出Kernel。大部份的patche 需要與andy-tracking kernel branch 配合執行,而此Kernel終將成為最穩定的kernel版本。 一旦所有的 patche都放到 kernel後,即可在stock kernel上執行 Android 。
It is possible to get Windows to at least recognize the Android "Ethernet Gadget" and charge the FreeRunner using the Android USB Windows driver (http://dl.google.com/android/android_usb_windows.zip) by modifying the android_usb.inf file in that package before attempting to install the driver. The following modifications are required:
Add the following to the [Google.NTx86] section of the android_usb.inf file:
; Neo FreeRunner %USB\VID_1457&PID_5117.DeviceDescRelease%=androidusb.Dev, USB\VID_1457&PID_5117 %USB\VID_1457&PID_5117&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_1457&PID_5117&MI_01
and add the following to the to the [Strings] section of the android_usb.inf file:
USB\VID_1457&PID_5117.DeviceDescRelease="Neo FreeRunner" USB\VID_1457&PID_5117&MI_01.DeviceDescRelease="Neo FreeRunner Composite ADB Interface"
The Windows version of adb does not appear to recognize the connected device yet but at least the FreeRunner charges and the device driver indicates that "This device is working properly."
你可以藉由下面的操作指引下載及建立Android source,請參考 http://source.android.com/download並且依照你的架構參考操作指引。
最好的方法是透過 wiki systems、公開的 mailing list、討論群組及公開的系統來發表你的作品。
對於你的工作,永遠加入自己的credit,但請不要使用註解的方式,因為有些程式在沒有註解的情況下已經不易閱讀困難,這個方式將增加困難度。最好的情況是,建立patch,並且在表頭放入你的個人連絡資訊。但協同運作的系統,如git可能已經幫你完成這個工作了。
若你建立了新的東西,並且能夠指定它的授權,請考慮授權相容性上的問題。
For each ARMv5TE instruction, one could potentially
This is a list of opcodes, extracted from the Android source, that are unsupported for ARMv4T compliant processors (specifically the arm920t). The opcodes represent instructions available for ARMv5, ARMv5T, and ARMv5TE architectures, which are not present in the ARMv4T ISA. The list was obtained by exhaustively editing the recompiling the Android source code until it compiled without error.
Please keep in mind, that in some cases, translating these instructions into a sequence of ARMv4T instructions will be impossible and / or result in nondeterministic execution because of
|
Using the above list of opcodes, one can scan the Android source code for ARMv4T-incompatible instruction sequences.
Code:
#!/bin/sh # $1 is the android directory if [ $# -ne 1 ]; then exit -1 fi cd "${1}" opcodes="blx clz ldrd pld smlabb smlabt smlatt smlal smlawb smlawt smulbb smulbt smultt smulwb smulwt qadd qdadd qdsub qsub strd" for op in ${opcodes}; do echo "* ${op} =====================================" if [ ! -e .files.${op} ]; then files="$(grep -R -i "${op} " * 2>/dev/null)" files="$(echo $files | grep -v "^Binary file" | sed -e 's/:.*//')" files="$(echo $files| grep -v "CREDIT\|README\|^\(kernel/\|.git/\)\|\(\.txt\)$" | sort -u)" echo "${files}" > .files.${op} else files="$(cat .files.${op})" fi for fil in ${files}; do lines="$(grep -n -i "${op} " ${fil} | sed -e 's/:.*//g' )" lines="$(echo $lines | sed -e 's/ /,/g')" echo "** ${fil}: lines {${lines}}" done done |
The list of files below may or may not be complete. There might also be some assembly code that is generated with a python script (verification?).
|
The file
system/core/libpixelflinger/codeflinger/ARMAssembler.cpp
will need special attention. It's responsible for dynamic generation of DSP code.
(Please Update Me)