上次介紹到Android emulator的啟動,至於emulator的玩法,
因為不屬於我的重點工作,在此不再贅述。(重點在porting, porting啊)
不過,之後還會再借emulator提取某些資料,到時再回來看。
先介紹Android porting的目標開發板:
稍微列舉一下AT91CAP9-STK的SPEC (http://www.atmel.com/dyn/resources/prod_documents/doc6353.pdf)
■ AT91CAP9S ARM926EJ-S™-based microcontroller system-on-chip
■ 64M Bytes of SDRAM application memory
■ 512M Bytes of NAND Flash
■ DataFlash® with up to 8M Bytes
■ External interfaces for:
■ 10/100 Base-T Ethernet
■ USB Host and Full Speed/High Speed Device
■ 1/4 VGA LCD Panel with Touch Screen
■ SD Card
■ 4 analog inputs
■ audio headphones
■ Altera® Stratix®2 EP2S15F484 FPGA and its associated EPCS16 serial configuration memory. The
FPGA provides 15600 four-input Lookup Table (LUT) equivalents, corresponding to approximately
124800 gates in the CAP MP Block
■ 64 general-purpose I/O connections from the AT91CAP9S, and 2 banks of 64 I/Os from the FPGA,
for application-specific external interfaces
■ ICE-JTAG interface for CAP9 JTAG programming, and a USB-Blaster-JTAG interface for Stratix2
JTAG programming. These facilitate system debug
■ Atmel’s AT73C224 and AT73C239 ICs for power supply and battery management
基本上是符合執行Android的最低需求,除了RAM之外... (Android - Device Requirements)
"RAM不夠"這件事,最近才發現的...
至於AT91CAP9A-DK,主要的spec.都和AT91CAP9-STK相同,主要差別在:
1. AT91CAP9A-DK的memory (NAND, SDRAM, EEPROM) 是獨立在一個memory module上,
經由EBI SO-DIMM 144插槽與CPU (AT91CAP9) 連接。
(SO-DIMM 144!? 插PC-100的SDRAM不知道能不能用...)
2. 更多的週邊,包含更多功能的PIN腳和更大的FPGA晶片
用AT91CAP9-DK的原因,是因為計畫中的其它部份會使用到週邊。
註: 為方便起見,之後以STK代表AT91CAP9-STK,DK代表AT91CAP9A-DK
接下來,因為STK板先拿到,而且DK板使用上仍有問題...
簡單講就是燒進去,然後不會動,這樣。等待ATMEL原廠回應中。
所以之後都以STK為主,先把大而無當的DK丟掉收起來吧。
ATMEL原廠對於AT91CAP9系列的支援有:
1. AT91 bootstrap
2. U-boot
3. Linux kernel (2.6.27)
4. Angstrom, a linux distribution for embedded system
(1~3包含source code,可視需求自行compile)
由1到4是個開機的完整流程,只要把這些程式燒錄到正確的記憶體位置,
就可以演示一個簡單的embedded system。
ATMEL原廠下載 (AT91CAP9-STK Linux Software Package)
ATMEL也提供燒錄工具 (SAM-BA, a.k.a. AT91-ISP),
可以將程式燒錄到板子上的任何ROM (NAND, NOR, ...) 上的指定位址。
為了方便使用,ATMEL也預先寫好script for STK,
只要安裝好SAM-BA再執行script即可。
CDC driver下載 (if necessary)
燒錄的方法簡述如下:(以Windows為例,Linux下需配合Linux CDC driver)
1. 下載並安裝SAM-BA、CDC driver,解壓縮AT91CAP9-STK Linux Software Package
2. 進入linux-at91cap9stk\linux-at91cap9stk-binaries\ 資料夾
3. STK板接上電源和USB線與電腦連接
4. 拔除板上的J66 jumper (藍色那個位置,就在CAP9 chip旁),之後按下S4 (EN_PMC) 啟動
5. 此時Windows會找到新裝置,如已安裝CDC driver,讓Windows自動尋找driver即可
6. 插回J66 jumper
7. 執行at91cap9stk-x11-nd.bat (or at91cap9stk-console-nd.bat, 此為無GUI版本)
8. 等待數分鐘,直到"logfile.log"跳出,燒錄即結束
9. 拔除電源再接回,然後按下S4 (EN_PMC) 開始開機程序
Boot成功後就可以玩了,
雖然不是Android,至少先感受一下觸控功能之類的。
再來只要把Angstrom換成Android就行了嘛。
用講的還真簡單。
(...待續)
留言列表