-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAndroid%2Fzh_tw.mw
714 lines (615 loc) · 32.7 KB
/
Android%2Fzh_tw.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
{{Languages|Android}}
{{Distributions|Android}}
= Updates =
* 20081202 [http://www.koolu.com Koolu.com] 在[http://git.koolu.org/ Koolu GIT] [http://git.koolu.org/ Koolu GIT] ([http://koolu.com/Press-Release/ Press Release]已釋出給FreeRunner使用的 Android 源碼。
* 20081120 [http://www.koolu.com Koolu.com] 推動銷售搭載 Android的Openmoko Freerunner 。如提供現有的FreeRunner 下載可搭載的Android。直到 December 2008。
* 20081104 第一個可以在FreeRunner上執行的 Android-image已經成功的被 Sean McNeil編譯出來! - sms 及通話可以使用,wifi 及藍芽則否。[http://onlinedev.blogspot.com/2008/11/porting-android-phase-3-done.html ''news-source'']
* 20081029 [[User:Cfriedt]] [http://benno.id.au Benno] 修改了Android's build system,因此可以放置JFFS2 image,而不是YAFFS。 不像是JFFS2,只可以[http://wiki.openmoko.org/wiki/Userspace_root_image mount 到唯讀的情況下],要掛載 YAFFS映像檔在它被寫入 flash 後才有可能使用。(it complains about the block device being of type '1' and not 'NAND'). JFFS2 仍然有標準的 Openmoko image 格式的優點 (請參考 [[Flashing the Neo FreeRunner|燒製映像檔到FreeRunner]] 或 [[Flashing the Neo 1973|燒製映像檔到Neo 1973]])。
* 20081023 [[User:Bricode]] 追蹤包含ARMv5規格的 Android source tree狀態,我建立了一個表格表示它會包含什麼內容,及patche檔的狀態。它可以在 http://spreadsheets.google.com/pub?key=pzDEXnU19gkeTjpD28t-7fw 這個網址找到。
* 20081022 [[User:Cfriedt]] 可以在移除了v5TE指令下 ,沒有錯誤的'trivially' 為ARMv4T編譯 Android source code。雖然它不預期它可以被執行,至少我針對 build/core/combo/arm-linux.mk做了一些小小的取代。關於此點,我可以繼續像執行v4T指令順序般的,重新執行 v5TE 指令。(或者,重新執行整個 hand-optimized v4T 指令組合)。
* 20081021 [[User:Cfriedt]] Android -> FreeRunner ,在我的[http://perpetual-notion.blogspot.com/search/label/android 部落格]上有討論。
* 20081021 Google 釋出Apache free 及 open-source手機下,大部份的[http://source.android.com/download source code] 、 [http://source.android.com/license license], 部份被涵蓋在現有的授權(licenses)下,如 Linux kernel 是屬於 GPLv2授權。
* 200810?? [http://www.koolu.com Koolu.com] 宣佈他們將會 '''銷售搭載Android的Openmoko Freerunner ''',這個計劃會在2008年11月開始,並且提供現有的FreeRunner用戶 '''免費下載可搭載在Freerunner上的Android''' 。 知名的 open-source 愛好者[http://koolu.com/The-Koolu-Team/maddog.html Jon "maddog" Hall] 是Koolu的CTO及代表。
= 簡介 =
本網頁撰寫的目地在於將[http://www.android.com Android OS] 移植到 [[Neo 1973]] 及 [[Neo FreeRunner]] 手機上。Android OS 於2008年10月21日[http://source.android.com/posts/opensource 公開的發佈] 。
下列的資訊,可以提供您暸解在 [[Neo1973 Hardware|Neo 1973]]及 [[Neo_FreeRunner_GTA02_Hardware|FreeRunner]] [http://benno.id.au/blog/2007/11/21/android-neo1973 移植工作] [http://perpetual-notion.blogspot.com/search/label/android 目前的運作情形]
[http://groups.google.com/group/android-porting 及現狀]。
== 目標 ==
# 有系統化的在Android codebase下使用提供給 ARMv4T 的patch檔。
# 提供在Android codebase在下Neo1973 與 Neo FreeRunner hardware-dependent patches 檔, 這項任務已經被 Openmoko 工程師完成,在不強迫變更 Android-specific upstream下。
# 在[[Distributions]]網頁中,提供有用的Android 檔案系統及kernel。
== 使用現有的二進位檔安裝 ==
詳盡的在FreeRunner上安裝Android (使用 Sean McNeil的kernel及rootfs 套件,及 Qi bootloader) ,何以在[http://www.copiesofcopies.org/webl/?p=34 http://www.copiesofcopies.org/webl/?p=34]此網址找到。
== 早期目標 ==
就如同 [http://benno.id.au Ben Leslie] 在 [http://benno.id.au/blog/2007/11/21/android-neo1973 blog] 中所提到的,在 source code釋出之前,[http://www.android.com Android] 被設計為使用ARMv5TE 架構[http://en.wikipedia.org/wiki/Instruction_set_architecture instruction set architecture] (ISA),允許 [http://en.wikipedia.org/wiki/ARM_architecture#DSP_Enhancement_Instructions DSP 擴充的指令]。 相較於 ARMv5TE ISA, the Neo1973 及 FreeRunner 電話聽筒都著重在arm920t core,並可以應用到 ARMv4T ISA。
在源碼開放之前,kernel trap handlers 被用來 '模擬' ARMv5TE ISA。雖然這個結果在不同的案例下運作,trapping 是較花成本及效能的一種結果。甚至於,在沒有明確的暸解哪個狀況是被不同的指令所設定的情兄下,如Thumb Mode execution,這個結果成為沒有定論。
== 目前的狀態 ==
隨著 Android釋出 [http://source.android.com source code],Open Source社群不再受限於使用binary-only 產品。The Open Handset Alliance (OHA)已經讓他們的source code 成為能讓大家致富及受益的產品。
目前,porting 以不同的循環模式運做。Patches需要透過 [http://source.android.com/submit-patches official Android channels]提交。
[http://www.koolu.com Koolu],Freerunner 的經銷商, 在[http://git.koolu.com 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]]
[[User:Seanmcneil3|Sean McNeil]] [http://3v1n0.tuxfamily.org/tumblelog/post/368 指出]他可以在FreeRunner上執行包含通話功能的 Android。
Ben Leslie 也在android-porting list上指出他可以在Neo 1973 show出他的Android logo。
=== 建立Koolu Android Source ===
# 參考[http://source.android.com/download#TOC-Setting-up-your-machine Setting up your machine] 中的Google build 說明,進行設定。
# 安裝 <tt>repo</tt> 並下載源碼,你可以在 http://trac.koolu.org/找到它的文件。
# 在完成build後,你可以藉由[http://lists.openmoko.org/pipermail/community/2008-December/036982.html 的訊息]編輯及執行McNeil的 scripts,將root file system 放在一起。第一個 script (cp_android_OS) 用來複製最新的built files到 staging area。 第二個(mkjffs2) 則從staging area會製作一個jffs2 image。請確定在二個檔案中編輯你的路徑。或者,你可以使用[[#Building a jffs2 image|以下的]]script
# 上面執行的結果是<tt>androidfs.jffs2</tt>的檔案,它可以被燒進你的Freerunner。
==== 製作jffs2 image ====
你可以使用以下的script:
<pre>
#!/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
</pre>
目前並沒有與建置 Freerunner/Android kernel相關的說明文件。[[User:Seanmcneil3|Sean McNeil]] 目前已經在 http://people.openmoko.org/sean_mcneil/ 這個位置釋出Kernel。大部份的patche 需要與<tt>andy-tracking</tt> kernel branch 配合執行,而此Kernel終將成為最穩定的kernel版本。 一旦所有的 patche都放到 kernel後,即可在stock kernel上執行 Android 。
=== 與 Windows 連結性 ===
讓 Windows 能組織 Android "網路零件(Ethernet Gadget)" ,並且使用Android USB Windows driver (http://dl.google.com/android/android_usb_windows.zip) 充電,在你安裝驅動程式前,你可以透過修改套件中的android_usb.inf 檔案,來完成這項工作。你必須做出下面的修改動作:
將下面[Google.NTx86] 的內容加到android_usb.inf 檔案中:
<pre>
; 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
</pre>
並且在android_usb.inf檔案的 [Strings] 區塊下加入以下的內容:
<pre>
USB\VID_1457&PID_5117.DeviceDescRelease="Neo FreeRunner"
USB\VID_1457&PID_5117&MI_01.DeviceDescRelease="Neo FreeRunner Composite ADB Interface"
</pre>
adb的Windows版本並不會出現,並且連接到裝置上,但至少FreeRunner會開始充電,裝置驅動程式會出現"This device is working properly(此裝置的功能運作正常)"的訊息。
= 取得幫助 =
== Getting Started ==
你可以藉由下面的操作指引下載及建立Android source,請參考 [http://source.android.com/download http://source.android.com/download]並且依照你的架構參考操作指引。
== 發佈你的作品 ==
最好的方法是透過 wiki systems、公開的 mailing list、討論群組及公開的系統來發表你的作品。
對於你的工作,永遠加入自己的credit,但請不要使用註解的方式,因為有些程式在沒有註解的情況下已經不易閱讀困難,這個方式將增加困難度。最好的情況是,建立patch,並且在表頭放入你的個人連絡資訊。但協同運作的系統,如git可能已經幫你完成這個工作了。
若你建立了新的東西,並且能夠指定它的授權,請考慮授權相容性上的問題。
== Porting 策略 ==
* 分析它對現有的build system的影響力
** buid/core/combo/arm-linux.mk
*** -D__ARCH_ARM_4__ -D__ARCH_ARM_4T__
*** -march=armv4t -mcpu=arm920t
** 修補不同的靜態參考資料到 'armv5'
* 隔離 ARMv5TE ISA 相依的程式碼
** e.g. grep -n -R -i "${armv5te_isa_pattern}" ~/android
* 摘要
** ( C/C++ )
*** 使用 inlined functions / #ifdef 狀態式來完成移植性的功能
*** 針對 inlined assembler calls,目前使用一般的 C 程式也是可以被接受的,之後,我們再用手動的方式來進行最佳化的工作。
** ( ASM )
*** 處理器的狀態是根據 ISA / architecture,如 #ifdef __ARCH_ARM_5__ ... #endif #ifdef __ARCH_ARM_4__ ... #endif
*** 強烈的建議處理器狀態應該不要套疊在一起(如讓他們彼此獨佔)
*** Some people have suggested that we should not do #ifdef's based on ARCH or ISA, but rather based on an AndroidConfig.h which would define macros like PLD(...) #ifdef HAVE_ARM_PLD pld #else ... #endif .
針對ARMv5TE 指令(instruction),可能潛藏著:
* 使用一般的registers(登錄子),而不是使用 DSP 呼叫 (如 eabi / softfloat)
* 若它是 a) 無法判別的 或者 b) 速度緩慢,則這個區段的程式則必須要分析,針對ARMv4T isa,必須使用hand-optimized 的方法
== 不支援的指令 ==
以下是opcodes列表,它是自Android Source解壓縮出來的,它不支援ARMv4T 相容的處理器 (尤其是 arm920t)。 opcodes 代表ARMv5、ARMv5T及ARMv5TE 架構下可以使用的指令。它無法在 ARMv4T ISA下執行。這個列表耗費了許多時間編輯,直到編譯無誤的狀態下,才會列出。
請牢記一件事,在一些狀況下,將這些指令順序的傳送到ARMv4T 指令下是不可能的,或者是會出現無預期的結果:
* 必須要有額外的context。
* opcodes變更登錄子的狀態,可能無法表現在 arm920t 核心上
=== Opcodes ===
{{scroll box|height=480px|text=
<TABLE BORDER="1">
<TR>
<TH>Opcode</TH>
<TH>Desription</TH>
<TH>[[http://www.arm.com/miscPDFs/14128.pdf PDF]] Page Number</TH>
<TH>C</TH>
<TH>ASM</TH>
</TR>
<TR>
<TH VALIGN="TOP">BLX(1)</TH>
<TD>Branch, Link, and Exchange</TD>
<TD>166</TD>
<TD>N/A (Unused in Android)</TD>
<TD>N/A (Unused in Android)</TD>
</TR>
<TR>
<TH VALIGN="TOP">BLX(2)</TH>
<TD>Branch, Link, and Exchange</TD>
<TD>168</TD>
<TD>
[[User:Cfriedt]] 20081028
Remove from inline assembly with something like
<pre>
#ifdef HAVE_BLX
... (inline asm) ...
#else
... (inline asm with equivalent blx code, as shown to the right) ...
#endif
</pre>
</TD>
<TD>
[[User:Cfriedt]] 20081028
Substitute with a macro reference such as
<pre>
#ifdef HAVE_BLX
#define BLX(a) \
blx a
#else
#define BLX(a) \
mov pc,lr \
bx a
#endif
</pre>
</TD>
</TR>
<TR>
<TH VALIGN="TOP">CLZ</TH>
<TD>Count Leading Zeros</TD>
<TD>175</TD>
<TD>
[[User:Cfriedt]] 20081028
Remove from inline assembly with something like
<pre>
#ifdef HAVE_CLZ
... (inline asm) ...
#else
... (inline asm with equivalent clz code, as shown to the right) ...
#endif
</pre>
</TD>
<TD>
[[User:Cfriedt]] 20081029
<pre>
#ifdef HAVE_CLZ
#define CLZ(Rd,Rm) \
clz Rd,Rm
#else
#define CLZ(Rd,Rm) \
...
#endif
...
CLZ(Rd,Rm)
</pre>
</TD>
</TR>
<TR>
<TH VALIGN="TOP">LDRD</TH>
<TD>Load Registers Doubleword</TD>
<TD>200</TD>
<TD>
[[User:Cfriedt]] 20081028
Substitute different inline assembly code with something like
<pre>
#ifdef HAVE_LDRD
... (inline asm) ...
#else
... (inline asm with ldrd substituted) ...
#endif
</pre>
</TD>
<TD>
[[User:Cfriedt]] 20081028
Substitute with a macro reference such as
<pre>
#ifdef HAVE_LDRD
#define LDRD(a,b) \
ldrd a,b
#else
#define LDRD(a,b) \
...
#endif
</pre>
</TD>
</TR>
<TR>
<TH VALIGN="TOP">PLD</TH>
<TD>Preload Data</TD>
<TD>240</TD>
<TD>
[[User:Cfriedt]] 20081028
Remove from inline assembly with something like
<pre>
#ifdef HAVE_PLD
... (inline asm) ...
#else
... (inline asm with pld removed) ...
#endif
</pre>
</TD>
<TD>
[[User:Cfriedt]] 20081028
Remove or substitute with a macro reference such as
<pre>
#ifdef HAVE_PLD
#define PLD(a,b) \
pld a,b
#else
#define PLD(a,b)
#endif
...
PLD(r0,#0)
</pre>
</TD>
</TR>
<TR>
<TH VALIGN="TOP">SMLA<x><y></TH>
<TD>Signed Multiply-Accumulate</TD>
<TD>291</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">SMLAL<x><y></TH>
<TD>Signed Multiply Accumulate Long</TD>
<TD>298</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">SMLAW<y></TH>
<TD>Signed Multiply-Accumulate Word</TD>
<TD>302</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">SMUL<x><y></TH>
<TD>Signed Multiply</TD>
<TD>316</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">SMULW<y></TH>
<TD>Signed Multiply Word</TD>
<TD>320</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">QADD</TH>
<TD>Saturating Add</TD>
<TD>242</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">QDADD</TH>
<TD>Saturating Double and Add</TD>
<TD>249</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">QDSUB</TH>
<TD>Saturating Double and Subtract</TD>
<TD>251</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">QSUB</TH>
<TD>Saturating Subtract</TD>
<TD>253</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TH VALIGN="TOP">STRD</TH>
<TD>Store Registers Doubleword</TD>
<TD>349</TD>
<TD>
[[User:Cfriedt]] 20081028
Substitute different inline assembly code with something like
<pre>
#ifdef HAVE_STRD
... (inline asm) ...
#else
... (inline asm without strd) ...
#endif
</pre>
</TD>
<TD>
[[User:Cfriedt]] 20081028
Substitute with a macro reference such as
<pre>
#ifdef HAVE_STRD
#define STRD(a,b) \
strd a,b
#else
#define STRD(a,b) \
...
#endif
</pre>
</TD>
</TR>
</TABLE>
}}
=== 掃瞄使用ARMv5TE ISA的檔案 ===
使用下列的opcodes,可以掃瞄到與ARMv4T與不相容的 Android source code指令順序。
'''Code:'''
{{scroll box|height=240px|text=
<pre>
#!/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
</pre>
}}
=== 在Android下使用 ARMv5TE ISA 的原始檔案 ===
以下的檔案可能是完整的,也可能是不完整的。也可能有些程式內容是透過 python script產生的.
{{scroll box|height=150px|text=
* blx =====================================
** bionic/libc/tools/gensyscalls.py: lines {168,186}
** bootloader/legacy/nandwrite/init.S: lines {77}
** bootloader/legacy/usbloader/init.S: lines {95}
** dalvik/vm/arch/arm/CallEABI.S: lines {239}
** dalvik/vm/arch/arm/CallOldABI.S: lines {145}
** development/emulator/qtools/thumbdis.cpp: lines {187,265}
** external/qemu/target-arm/translate.c: lines {1151,1971,2444}
** external/qemu/trace.c: lines {774,1353,1358}
** system/core/libpixelflinger/codeflinger/disassem.c: lines {416}
* clz =====================================
** development/emulator/qtools/armdis.cpp: lines {654}
** external/opencore/codecs_v2/audio/aac/dec/src/pv_normalize.h: lines {67,84}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h: lines {137}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.h: lines {78,95}
** external/opencore/codecs_v2/audio/mp3/dec/src/pvmp3_normalize.h: lines {67,84}
** external/opencore/codecs_v2/video/avc_h264/dec/src/vlc.cpp: lines {23}
** external/opencore/codecs_v2/video/m4v_h263/enc/src/vlc_encode_inline.h: lines {125,162,168,204,218}
** external/qemu/target-arm/translate.c: lines {1247}
** external/skia/libcorecg/Sk64.cpp: lines {340,341,343}
** external/skia/libcorecg/SkMatrix.cpp: lines {500,501}
** external/skia/libsgl/effects/SkColorMatrixFilter.cpp: lines {135}
** external/skia/libsgl/sgl/SkBitmap.cpp: lines {945,946,947}
** external/skia/libsgl/sgl/SkBitmapShader.cpp: lines {32,33,34}
** external/skia/libsgl/sgl/SkGraphics.cpp: lines {429,437}
* ldrd =====================================
** dalvik/vm/mterp/armv5/OP_AGET_WIDE.S: lines {28}
** dalvik/vm/mterp/armv5/OP_IGET_WIDE.S: lines {37}
** dalvik/vm/mterp/armv5/OP_IGET_WIDE_QUICK.S: lines {10}
** dalvik/vm/mterp/armv5/OP_SGET_WIDE.S: lines {17}
** dalvik/vm/mterp/out/InterpAsm-armv5.S: lines {2653,7464,8318,8390}
** system/core/libpixelflinger/rotate90CW_4x4_16v6.S: lines {40,41,42,43}
* pld =====================================
** bionic/libc/arch-arm/bionic/memcmp.S: lines {37,44,45,56,57,107,108,195,196}
** bionic/libc/arch-arm/bionic/memcmp16.S: lines {37,44,45,67,68,116,117,198,199}
** bionic/libc/arch-arm/bionic/memcpy.S: lines {55,56,57,145,266,293,320}
** bionic/libc/arch-arm/bionic/strlen.c: lines {59,65}
** bionic/libc/kernel/arch-arm/asm/arch/irqs.h: lines {162}
** external/elfutils/src/Makefile: lines {243}
** external/elfutils/src/Makefile.am: lines {32}
** external/elfutils/src/Makefile.in: lines {243}
** external/jpeg/jidctfst.S: lines {69,235,247}
** external/qemu/target-arm/translate.c: lines {1149}
** system/core/libpixelflinger/codeflinger/ARMAssembler.cpp: lines {368}
** system/core/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp: lines {104,108,117}
** system/core/libpixelflinger/t32cb16blend.S: lines {111,112,134,143}
* smlabb =====================================
** external/jpeg/jidctfst.S: lines {110,115,155,156}
** external/neven/Embedded/common/src/b_BasicEm/Math.c: lines {584,589}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {147,166}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {120,129}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {514,533}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {418,429}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {202}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {250}
** external/opencore/codecs_v2/video/m4v_h263/enc/src/dct_inline.h: lines {119,155,167,278,326,341}
** external/opencore/codecs_v2/video/m4v_h263/enc/src/fastquant_inline.h: lines {178,225,437,517}
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {405,436}
* smlabt =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {184}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {138}
** external/opencore/codecs_v2/video/m4v_h263/enc/src/dct_inline.h: lines {131,143,294,310}
* smlatt =====================================
** external/neven/Embedded/common/src/b_BasicEm/Math.c: lines {585,590}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {157}
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {441}
* smlal =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v4.h: lines {179,223,236,257,267}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v4_gcc.h: lines {264,341}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {178,188,198}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_dct_9.s: lines {84,90,96,101,109,114,116,118,121,132,138,150,163,165,167,174,176,178}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_dct_9_gcc.s: lines {73,79,86,90,98,103,105,107,110,121,127,139,152,154,156,163,165,167}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_mdct_18.asm: lines {143,162,178,188,192,199,207,217,225,231,237,241,244}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_mdct_18.s: lines {145,164,180,190,194,201,209,219,227,233,239,243,246}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_mdct_18_gcc.s: lines {143,162,178,188,192,199,207,217,225,231,237,241,244}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_polyphase_filter_window.asm: lines {62,63,66,72,76,77,81,82,85,90,94,97,99,100,103,108,113,114,118,119,122,129,136,137,176,179,183,187,190,193}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_polyphase_filter_window.s: lines {67,68,71,77,81,82,86,87,90,95,99,102,104,105,108,113,118,119,123,124,127,134,141,142,181,184,188,192,195,198}
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_polyphase_filter_window_gcc.s: lines {65,66,69,75,79,80,84,85,88,93,97,100,102,103,106,111,116,117,121,122,125,132,139,140,179,182,186,190,193,196}
** external/opencore/codecs_v2/audio/mp3/dec/src/pv_mp3dec_fxd_op_arm.h: lines {148}
** external/qemu/trace.c: lines {813}
** frameworks/base/opengl/libagl/iterators.S: lines {66,67}
** frameworks/base/opengl/libagl/matrix.h: lines {67,68,96,126,127,282,283,314,315,316}
* smlawb =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {203,259}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {166,416}
** frameworks/base/libs/audioflinger/AudioResamplerSinc.cpp: lines {93,109}
** frameworks/base/opengl/libagl/matrix.h: lines {163,203}
* smlawt =====================================
** frameworks/base/libs/audioflinger/AudioResamplerSinc.cpp: lines {114}
** frameworks/base/opengl/libagl/matrix.h: lines {162,202,243,244}
* smulbb =====================================
** external/jpeg/jidctfst.S: lines {109,114,151,153}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {79}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {71,81}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {207,251,297,348,361,375,427,440,487}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {199,234,274,314,316,326,367,369,404}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mac.h: lines {121,137}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_msu.h: lines {123,142}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mult.h: lines {122,140}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32.h: lines {132,134,138,164,177,191}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h: lines {127,129,150,163}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mult.h: lines {121,141}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {115,139,151,163,189,190,212}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {112,113,164,183,201,218,265}
** external/opencore/codecs_v2/video/m4v_h263/enc/src/fastquant_inline.h: lines {250,457,531}
** external/skia/include/corecg/SkMath.h: lines {170}
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {420,462}
** system/core/libpixelflinger/t32cb16blend.S: lines {39,66,74,82}
* smulbt =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {115}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {109}
** system/core/libpixelflinger/codeflinger/texturing.cpp: lines {1091}
** system/core/libpixelflinger/t32cb16blend.S: lines {47,55}
* smultt =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {131}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {100}
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {467}
** frameworks/base/libs/audioflinger/AudioResamplerSinc.cpp: lines {73}
* smulwb =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {221}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {373}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {222}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {283}
** external/opencore/codecs_v2/audio/sbc/enc/src/sbcenc_filter.h: lines {33}
** frameworks/base/opengl/libagl/matrix.h: lines {161,201,242}
* smulwt =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {202,240}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {385,415}
* qadd =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {64}
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {60}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {130,256}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {128,235}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_add.h: lines {122,137}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mult.h: lines {123,145}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {71,102,152,176,192}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {91,115,148,202,234}
** external/openssl/crypto/bn/bn_prime.c: lines {454,455}
* qdadd =====================================
** external/opencore/codecs_v2/audio/aac/dec/src/calc_sbr_synfilterbank.cpp: lines {116,162}
** external/opencore/codecs_v2/audio/aac/dec/src/trans4m_freq_2_time_fxp.cpp: lines {472,494}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {212,356,370,385,435,449}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {200,315,321,331,368,371}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mac.h: lines {122,142}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32.h: lines {133,136,140,172,186,201}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h: lines {128,131,158,172}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {116}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {184}
* qdsub =====================================
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {302}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {275}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_msu.h: lines {124,147}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {140}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {165}
* qsub =====================================
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {167}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {162}
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_sub.h: lines {121,138}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {88,127}
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {70,133}
* strd =====================================
** dalvik/vm/mterp/armv5/OP_APUT_WIDE.S: lines {31}
** dalvik/vm/mterp/armv5/OP_IPUT_WIDE.S: lines {39}
** dalvik/vm/mterp/armv5/OP_IPUT_WIDE_QUICK.S: lines {14}
** dalvik/vm/mterp/armv5/OP_SPUT_WIDE.S: lines {21}
** dalvik/vm/mterp/out/InterpAsm-armv5.S: lines {2834,7530,8331,8542}
** dalvik/vm/oo/Object.h: lines {589}
** external/opencore/fileformats/avi/parser/include/pv_avifile_streamlist.h: lines {179}
** external/opencore/fileformats/avi/parser/src/pv_avifile_streamlist.cpp: lines {153}
** system/core/libpixelflinger/rotate90CW_4x4_16v6.S: lines {47,52,56,60}
}}
=== 討論 ===
=== 附註 ===
檔案
<pre>
system/core/libpixelflinger/codeflinger/ARMAssembler.cpp
</pre>
必須要特別的注意。它負責動態產生DSP程式。
== 建議 ==
* [[User:Cfriedt]] 20081024 我不確定它的可行性多高,因為[http://wiki.openmoko.org/wiki/Neo_FreeRunner_Hardware_Issues#SMedia_3362_Documentation_.26_OpenGL_ES_Drivers SMedia 3362 被NDA保護]。 然而,arm920t 缺乏浮點單元 / DSP core,它可能使用 SMedia chip 產生特定目地的方法?這對Android 平台來講很有用,至少像是audio及 video codecs。 撇開OpenGL ES 驅動程式,歡迎提供針對SMedia 的 Openmoko文件。
= 重要連結 =
(歡迎大家在這裡加入重要連結)
== 文件 ==
* [http://source.android.com/documentation Android Documentation]
* [http://www.arm.com/documentation/ ARM Documentation], (keywords: armv4t, armv5t, armv5te, arm920t, arm926ej-s)
* [http://www.arm.com/miscPDFs/9658.pdf ARM Assembly Language Programming]
* [http://www.cse.unsw.edu.au/~cs3221/labs/assembler-intro.pdf An Introduction to the GNU Assembler]
* [http://www.heyrick.co.uk/assembler/apcsintro.html ARM Procedure Call Standard], [http://en.wikipedia.org/wiki/Calling_convention#ARM ARM Calling Conventions]
== 指令設定參考 ==
* [http://www.arm.com/miscPDFs/14128.pdf ARM Architecture Reference Manual],最後的ISA文件
* [http://www.simplemachines.it/doc/QRC0001H_rvct_v2.1_arm.pdf 設定Quick Reference Card的ARM 指令]
* [http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf 設定Quick Reference Card 的ARM及Thumb -2 指令]
* [http://infocenter.arm.com/help/topic/com.arm.doc.dvi0025b/DVI0025.pdf ARMv4T] (請參考1.4.13小節)
* [http://infocenter.arm.com/help/topic/com.arm.doc.dvi0014a/DVI0014A_ARM10T_PO.pdf ARMv5T] (請參考 4.16小節)
* [http://www.arm.com/pdfs/ARM-DSP.pdf ARM DSP 延伸指令集]
* [http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042c/IHI0042C_aapcs.pdf ARM架構下的Procedure Call Standard ]
== 硬體參考 ==
* [[Neo1973 Hardware]]
* [[Neo FreeRunner GTA02 Hardware]]
== 社群討論 ==
* [http://source.android.com/discuss Android Public Mailing Lists]
** Specifically, [http://groups.google.com/group/android-porting android-porting]
* [http://lists.openmoko.org/mailman/listinfo OpenMoko Mailing Lists]
** Specifically, [http://lists.openmoko.org/mailman/listinfo/openmoko-kernel openmoko-kernel]
* [http://forum.koolu.org/viewforum.php?f=10 Android on FreeRunner] at KoolU.com
* [[Openmoko Local Groups]]
* [[Openmoko:Community_Portal]]
= 請參考 =
* [[Debug_Board]]
= 其它連結 =
== Youtube video /Android on FreeRunner ==
[http://tw.youtube.com/watch?v=m4NbsLmF9j0 Video 1]
[http://tw.youtube.com/watch?v=r6Op-7tNTiw Video 2]
[[Category:Android]]