簡易檢索 / 詳目顯示

研究生: 劉高夆
Gao-Fong Liou
論文名稱: 嵌入式多媒體平台的Android移植與其平台下Java與C應用之效能比較
The porting of Android to an Embedded Multimedia platform and the performance comparison of Java and C applications
指導教授: 許孟超
Mon-Chau Shie
口試委員: 阮聖彰
Shanq-Jang Ruan
林昌鴻
Chang Hong Lin
吳晉賢
Chin-Hsien Wu
學位類別: 碩士
Master
系所名稱: 電資學院 - 電子工程系
Department of Electronic and Computer Engineering
論文出版年: 2013
畢業學年度: 101
語文別: 中文
論文頁數: 90
中文關鍵詞: Android移植嵌入式系統BeagleboardJavaJNI
外文關鍵詞: Beagleboard
相關次數: 點閱:230下載:5
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

隨著智慧型手機及平板電腦的崛起,讓現在的消費者對於消費性電子產品有更進一步的需求以及期待,除了開發商提供友善的圖形化使用者介面之外,應用程式的執行效能更是得到使用者的關注,且現在智慧型手機的蓬勃發展,在多元化的功能需求底下,圖形化介面與多媒體應用是現在使用者的重心,應用程式的效能更受到重視,因此開發者應該重新審視,如何將多媒體軟體開發在有限的資源中呈現最高的效能,這是更重要的一環。
目前市占率最高且為開放式的作業系統,本論文以Java為基礎建構而成的Android系統為主,網路上資源雖然豐富,但是沒有完整的移植過程,讓移植Android系統變的複雜且困難,而本論文使用ARM Cortex-A8為核心的BeagleBoard-xM移植Android系統,此開發版價格低且豐富的多媒體周邊裝置,非常適合執行圖形化介面系統在此平台上,並在這提供詳細的移植流程,重要的周邊裝置的檔案設定修改,使移植Android的過程直接完整,供有興趣的人參考。
本文除了探討如何自行移植Android系統至嵌入式平台Beagleboard-xm外,因為圖形化介面與多媒體應用的效能受到重視,為了要有圖形化介面,以Java建構的Android系統為主,且本論文使用JPEG壓縮影像中使用的DCT(Discrete Cosine transform)以及處理音樂資料使用的FFT(Fast Fourier Transform)兩個應用來做效能比較, JNI結合C的程式在兩個應用中以重啟方式測試,分別提升了63%及47%的速度;而兩個應用程式於背景執行的狀況,Java雖有加速效果,但依然比不過JNI結合C的部分提升,因此運用C函式庫來呼叫嵌入式平台的硬體驅動或是多媒體應用,能提升整體系統執行效能。


As the trend for risen of smartphones and tablets, which makes the consumers nowadays require further and expect more on the consumer electronics. Beside GUI (Graphical User Interface), efficiency of program is getting concerned from users. Beneath the diverse functional requirement, GUI and multimedia application are end user's focus. Thus, the application performance is much more emphasized. So the program developers should take it seriously. It’s very important that how to develop a highest efficient program in a limited resources condition.
Our thesis is based on an Android system which is constructed by Java. Android is the most popular open source operation system on mobile, but companies do not release their porting guide generally. On the other hand, academia has many hardware resources, yet lacking experiences of porting Android system. There're so many resources on the internet, but contents is uneven. Some of them do not have specific procedures, which makes porting Android system more complicated and difficult. The thesis chose ARM based Cortex-A8 BeagleBoard-XM as kernel development kit for porting Android. Main reasons are the cost and rich peripherals for multimedia, which makes it appropriate to execute GUI on the platform. In addition, information of environment porting, procedures, issues, and solutions are provided in detail. Especially, configure peripherals settings in kernel, which results in the success of peripheral activity by kernel. I believe this's the prerequisite for people who tries to learn porting platform.
The thesis is based on porting Android on the Beagleboard-XM Embedded platform and analyze more clearly by below procedures. Based on Android system be constructed by Java. The most often used in JPEG image compression, DCT (Discrete Cosine transform) operation used to compress JPEG images, and FFT (Fast Fourier Transform) operation used to process audio data for the performance comparing. In DCT aspect, program in conjunction of JNI and C start to execute each time, DCT (Discrete Cosine transform) operation used to compress JPEG images could obtain 63% speed faster compared to execution by Java coding, when the conjunction of JNI and C start to execute each time. As the consecutive execution, though Java could maintain the same speed, the conjunction of JNI and C which still boost 25% speed. The FFT(Fast Fourier Transform) operation used to process audio data could boost 47% and 2% speed as well, when starting to execute and consecutive execution. Even the hardware drivers and multimedia libraries of embedded platforms are usually coded in C language. Therefore, Java adopts JNI (Java Native Interface) which calls the C library for program development, in order to improve the system execution performance.

論文摘要 Abstrac 致謝 目錄 圖索引 表索引 第一章 緒論 1.1 研究動機 1.2 研究方向與目的 1.3 文獻探討 1.4 論文架構 第二章 相關背景知識 2.1 嵌入式系統 2.2 ARM架構 2.3 嵌入式系統核心(Linux Kernel) 2.4 嵌入式系統開機載入程序(BootLoader) 2.5 嵌入式檔案系統(Filesystem) 2.6 交叉編譯器(Cross toolchain/Cross compiler) 2.7 Java語言 2.7.1 JDK (Java Development Kit) 2.7.2 JRE(Java Runtime Environment) 2.7.3 JNI(Java Native Interface) 2.7.4 JIT編譯器(Just-In-Time Compiler) 2.7 Android系統 2.7.1 JVM (Java Virtual Machine) 2.7.2 Dalvikvm (Dalvik Virtual Machine) 第三章 系統移植與程式開發 3.1 嵌入式實驗平台 – BeaglenBoard-xM 3.2 系統移植要點 3.2.1 系統核心選擇 3.2.2 編譯環境需求 3.3 系統移植步驟 3.4 系統移植問題及解決方式 3.4.1 Ubuntu系統找不到Java的Package做前置安裝動作 3.4.2 不同版本Android系統對應的Java版本不同 3.4.3 Android畫面遲遲無法進入系統 3.4.4 LTM畫面偏移 3.4.5 LTM無觸碰功能 3.5 環境架設及程式編譯 3.5.1 Eclipse環境設置 3.5.2 Cygwin工具介紹 3.5.3 JNI程式編譯過程 3.5.4 DCT(Discrete Cosine Transform) 3.5.5 FFT(Fast Fourier Transform) 第四章 實驗測試與結果 4-1 Android系統執行於BeagleBoard-xM上的狀況 4-2 軟體執行比較及探討 第五章 結論與未來展望 5-1結論 5-2未來展望 參考文獻 附錄A Android系統移植步驟 附錄B JDK手動安裝配置 附錄C 面板偏移修正(panel-generic.c) 附錄D 觸碰功能修正(board-omap3beagle.c) 附錄E 觸碰功能修正(ads7846.c) 附錄F JNI編譯C code過程

[1]comScore Reports May 2013 U.S. Smartphone Subscriber Market Share
http://www.comscore.com/Insights/Press_Releases/2013/6/comScore_Reports_May_2013_U.S._Smartphone_Subscriber_Market_Share
[2]鄧凡平,“Android系統原理深入解析”,佳魁資訊股份有限公司,台北,2012。
[3]ARM Website http://www.arm.com/
[4]Ki-Cheol Son, Jong-Yeol Lee, “The method of android application speed up by using NDK,” International Conference on Awareness Science and Technology (iCAST), pp.382-385, 2011.
[5]鍾文昌,“Android作業系統移植之研究與實現”,碩士論文,國立台北科技大學,台北,2009。
[6]Yeong-Jun Kim, Seong-Jin Cho, Kil-Jae Kim, Eun-Hye Hwang, Seung-Hyun Yoon, Jae-Wook Jeon, “Benchmarking Java Application Using JNI and Native C Application on Android,” International Conference on Control, Automation and Systems (ICCAS), pp.284-288, 2012.
[7]周慶賢,“基於Android平台之節能多媒體串流應用設計”,碩士論文,國立台灣科技大學,台北,2011。
[8]巫明侃,“基於二階二維Haar離算小波轉換的車牌偵測方式及其Google Android嵌入式系統實作”,碩士論文,國立雲林科技大學,雲林,2009。
[9]張紹勳,“資料結構與演算法Java”,旗標出版社,台北,2003。
[10]蔡桂昇,“Java程式語言於Android行動裝置平台之探討”,碩士論文,國立屏東科技大學,屏東,2009。
[11]Chien-Wei Chang, Chun-Yu Lin, Chung-Ta King, Yi-Fan Chung, Shau-Yin Tseng, “Implementation of JVM Tool Interface on Dalvik Virtual Machine,” International Symposium on VLSI Design Automation and Test (VLSI-DAT), pp.143-146, 2010.
[12]Yann-Hang Lee, Preetham Chandrian, Bo Li, “Efficient Java Native Interface for Android Based Mobile Devices,” IEEE 10th International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), pp.1202-1209, 2011.
[13]Sangchul Lee, Jae Wook Jeon, “Evaluating Performance of Android Platform Using Native C for Embedded Systems,” International Conference Control Automation and Systems (ICCAS), pp.1160-1163, 2010.
[14]黃靖閩,“Java Security API效能與JNI實現OpenSSL演算法之類別研究”,碩士論文,國立高雄第一科技大學,高雄,2009。
[15]Cheng-Min Lin, Jyh-Horng Lin, Chyi-Ren Dow, Chang-Ming Wen, “Benchmark Dalvik and Native Code for Android System,” International Conference on Innovations in Bio-inspired Computing and Applications (IBICA), pp.320-323, 2011.
[16]Android Developers Website
http://developer.android.com/index.html
[17]Embedded Linux Wiki
http://elinux.org/Android_Architecture
[18]Andrws Vieira, Daniel Debastiani, Luciano Agostini, Felipe Marques, Julio C. B. Mattos , “Performance and Energy Consumption Analysis of Embedded Applications Based on Android Platform,” Brazilian Symposium on Computing System Engineering (SBESC), pp.59-64, 2012.
[19]DongSeok Cho, DooHwan Bae, “Case Study on Installing a Porting Process for Embedded Operating System in a Small Team,” International Conference on Secure Software Integration & Reliability Improvement Companion (SSIRI-C), pp.19-25, 2011.
[20]OMAP pedia
http://omappedia.org/wiki/Main_Page
[21]Gaurav Singh, Kumar Bipin, Rohit Dhawan, “Optimizing the Boot Time of Android on Embedded System,” IEEE 15th International Symposium on Consumer Electronics (ISCE), pp.503-508, 2011.
[22]TI-Android-GingerBread-2.3.4-DevKit-2.1_DeveloperGuide.pdf
[23]Pennebaker, William B., “JPEG still image data compression standard,” Van Nostrand Reinhold, New York, 1992.
[24]FFT介紹 http://eshare.stust.edu.tw/EshareFile/2010_6/2010_6_a78298c9.pdf

QR CODE