Android Portable Media Player Rc2

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Android Portable Media Player Rc2 as PDF for free.

More details

  • Words: 706
  • Pages: 36
期末報告

班級 組別 參與同學

: :

TI701 第六組 98971001 98971012 98971016 98971025 98971029

游昭憲 于榮輝 陳桂枝 曾淳蔚 章修齊

Android 最新數字資料  市場研究機構 Strategy Analytics 在 2009 年 5 月公佈的資

料顯示,在行動通訊服務業者、手機供應商與開發者的大力 支持之下, 2009 年採用 Android 作業系統的手機數量將有 高達 900% 的成長率  截至 2009 年 5 月, Google 內部資料顯示, Android Market 已有超過 4,900 個應用軟體 ( 包括免費和付費 ) ; Android 的使用者每位平均下載 40 個以上應用軟體  根據 Net Applications 2009 年 3 月的調查資料顯示,不 到 6 個月的時間,行動裝置上網瀏覽器市場佔有率排名, Android 目前位居第二,僅次於 iPhone ,領先 Microsoft 、 Symbian 和 Blackberry  第一支 Android 平台手機 T-Mobile G1 已在 7 個國家 ( 包 括美國 ) 推出,銷售量已突破 100 萬支。

動機與目標  市場需求、開發環境  降低產品販售的成本  遵循標準模式,加速軟體開發  內建多媒體資料庫

背景研究  基於 Linux 的軟體平台和作業系統  Google 開發 -> 開放手機聯盟  完整且開放的軟體研發  Intel : Moblin <->

Android

Google :

功能描述  建置一個 android 的作業環境  支援觸控螢幕控制  支援 wireless 網路 . 乙太網路  支援 Audio in/ Audio out  支援 Video in/Video out

(Performance depends on the S3C2440A processor speed)

Android 架構  應用層 (Applications)  應用層框架 (Application

Framework)

統一的開發應用程式標準介面,應用程式需要透過這層才能向下溝通。

 函式庫 (Libraries)

Android 平台的函式庫以 C/C++ 撰寫,負責處理需要高效率的作業,以及與硬體介 面的溝通。

 Android Runtimes

參考 Java 虛擬機器設計的 Dalvik 虛擬機器,速度較 JVM 快

 Linux 核心 (Linux Kernal) Google 修改過的 linux kernel 。

kernel 移植 Android linux kernel

diff

.patch

原始 Linux kernel

目標版的 linux kernel

Driver 移植

patch 目標版的 linux kernel

Android linux kernel

kernel 移植的前置作業  1. Download Linux 2.6.25 for Android

1.0 SDK, Release 1

http://android.googlecode.com/files/linux-2.6.25-an

 2. Download cross compiler Sourcery

G++ Lite 2008q3-66 for ARM EABI

http://www.codesourcery.com/sgpp/lite/arm/portal/

uda1341 soundcard porting 

將 bitfield.h 放到 include/asm-arm/plat-s3c24xx/ 目錄 下



由於 Linux 2.6.25 for Android 1.0 SDK 並無飛利浦 uda1341 晶片

的 driver ,故須將寫好的 s3c_uda1341.c 放入 sound/oss 目錄下 

在 sound/oss 目錄下 Makefile 加入 Obj-$(CONFIG_S3C2410_UDA1341)+= s3c_uda1341.o



在 sound/oss 目錄下 kconfig 添加 config S3C2410_UDA1341 tristate "S3C2410 UDA1341 driver (S3C2440)" depends on SOUND_PRIME && SOUND && ARCH_S3C2410 help The UDA1341 can be found in Samsung's S3C24XX platforms. If you have a board based on one of these. Say Y or M here. If unsure, say N.

Touch Screen Porting  從較新版 kernel 複製 include/asm/arch-s3c2410/ts.h 和 drivers/input/touchscreen/s3c2410_ts.c

 修改 Makefile 和 Kconfig

網路卡 DM9000 Porting  Copy dm9000x.c 至 drivers/net 下  修改 drivers/net/Makefile  修改 arch/arm/mach-s3c2440/mach-

s3c2440.c  修改 Makefile 和 Kconfig

移植過程  gedit $HOME/.bashrc

加入 PATH=$PATH:/CodeSourcery/arm2008q3/bin  source $HOME/.bashrc  進入 kernel.git 目錄 修改 Makefile ARCH ?= arm CROSS_COMPILE ?=arm-none-linuxgnueabi-

移植過程  設置 mini2440 的 config

$ make menuconfig

 製作 kernel image 檔

$ make zImage

使用 mini2440 開啟 android SuperViVi 轉移控制權 For mini2440 的 Android linux kernel

NFS 掛載

Android filesystem

Android Porting  在 NAND Flash 底下開機  按任意鍵進入 supervivi 選單 ( 如下圖 )

Android Porting  載入 kernel 的 zImage 檔  由於 file system 檔案過大,所以利用

NFS 掛載檔案

Android Porting

 linux_cmd_line 更改為 console=ttySAC0 root=nfs nfsroot=192.168.1.100:/nfs_root ip=192.168.1.70 init=/init

Android Porting  修改 Server 端 /etc/exports 檔案  加入 /nfs

*(rw,sync,no_root_squash)  設定 Server 端 IP 位址  IP :  Subnet mask :  Gateway :

192.168.1.100 255.255.255.0 255.255.255.255

 在根目錄下建立 nfsroot 資料夾,並放入

filesystem  最後輸入 exports -r 將 nfs 發佈出去

Android Porting 結果  重新啟動 arm 板後如下圖

模擬開發環境  Android SDK  Windows  Linux  Mac OS X (intel)

 Eclipse  Java JDK  Android ADT

Android SDK

模擬器類型

建立模擬器  android create avd --target 2 --name

“ 模擬器名稱”

adb  adb shell  ls 、 cd 、 mkdir…

 adb install “XXX.apk”  adb uninstall  /data/app

 adb push “ 檔案” “路徑”

sdcard  mksdcard “XXXMB” “ 檔名”  emulator –avd “ 模擬器名稱” –

sdcard “sdcard 檔名”  /sdcard  adb push “ 檔案” /sdcard

格式  Movie  H.264  H.263

 Music  MP3  WAV  AAC

emulator - skin HVGA-L

遭遇問題  TouchScreen 定位上下顛倒 進入圖形化介面後,觸控功能不正確

 解決方法:

修改 include/asm/arch-s3c2410/ts.h 和 drivers/input/touchscreen/s3c2410_ts.c

遭遇問題  遇到 Kernel panic - not syncing:

Attempted to kill init

 解決方法:  使用 EABI 版的 cross-compiler  (EABI:embedded-application binary interface) 

參考網站: http://darwin-dev.blogspot.com/2009_06_01_archive.html

遭遇問題  MachineID 不匹配 bootloader(supervivi) 傳入的 Machine Id 是 782 和 kernel 設定的 S3C2440(Machine ID = 362 ) 不一樣

 解決方法: 修改 kernel 的 arch/arm/tools/mach-types 將 s3c2440 ARCH_S3C2440 S3C2440 362 改成 s3c2440 ARCH_S3C2440 S3C2440 782

遭遇問題  應用程式無法播音樂  暫時解決方案 使用 linux 命令列將 wav 檔用 cat 指令直接輸出給聲 音裝置

專題題目

Android Portable Media Player 班級 TI701 組別 第六組 組員 游昭憲

于榮輝

陳桂枝

曾淳蔚

章修齊

Related Documents