1 / 24

Media Streaming with UPnP and MPEG-7 in Embedded Linux System

Media Streaming with UPnP and MPEG-7 in Embedded Linux System. Hsu Shih-Chang DCNLAB @ CSIE, NCKU. Outline. Target board Building Embedded OS Problems. Target board. StrongARM. Target board (contd.). DMA-ARM9 2410. Target board (contd.). Target board (contd.). Building Embedded OS.

regina
Download Presentation

Media Streaming with UPnP and MPEG-7 in Embedded Linux System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Media Streaming with UPnP and MPEG-7 in Embedded Linux System Hsu Shih-Chang DCNLAB @ CSIE, NCKU

  2. Outline • Target board • Building Embedded OS • Problems

  3. Target board • StrongARM

  4. Target board(contd.) • DMA-ARM9 2410

  5. Target board(contd.)

  6. Target board(contd.)

  7. Building Embedded OS • Building Flow Cross-Development Environment The Basic Operations on Strong ARM Kernel Application File System Network

  8. Cross-Development Environment • 一般來說,開發嵌入式系統的環境都會分為Host端以及Target端,而所謂的Host端就是我們所使用的PC,而Target端就是我們所要開發版。為了能夠在Host端編譯出能在Target端執行的指令,因此我們就會用所謂的Cross-Compiler來編譯我們的程式。 version : cross-2.95.3.tar.bz2

  9. Kernel • 一個Kernel就是一個最簡單的OS,主要是用來控制硬體系統的,換句話說,如果你的kernel並沒有支援某項硬體設備,那麼該硬體也就無法在這樣的核心底下工作了。 version : linux-2.4.0-test11.tar.gz patch-2.4.0-test11-rmk1.tar.gz diff-2.4.0-test11-rmk1-np3.gz patch-2.4.0-test11-rmk1-np3 (Provide by MasterIA)

  10. File System • 當Kernel 建構完畢後,我們還需要一些常用的工具程式,例如ls、mount…等等的工具。然而,我們現在所發展的是嵌入式系統,所以需要兼具便利與低容量的使用,其中BusyBox便是個不錯的選擇。 • 而,Busybox 為何能夠佔有如此小的容量,卻能提供為數不少的常用工具呢?這訣竅在於 busybox 在編譯後,雖然整體只是一個執行檔,卻可以透過 symbolic link 的方式,將常用指令 (Busybox 的術語是 “applet”) 「連」到 busybox 這個執行檔上。 version: busybox-1.00.tar.gz

  11. File System(contd.) • /bin

  12. File System(contd.)

  13. File System(contd.)

  14. File System(contd.) • 有了busybox的常用工具後,要完成一個基本的File System還需要下列步驟: ※先建立一個空的filesystem映像檔。 dd if=/dev/zero of=initrd.img bs=1k count=8192 ※在該檔案上作一的ext2的filesystem。 /sbin/mkfs.ext2 –F –v –m0 initrd.img ※建立相關的目錄結構。 mkdir etc/ proc/ dev/ var/ mnt/ tmp/ lib/ ※進入dev目錄,建立驅動程式的主要機碼與次要機碼 cd dev mknod

  15. Network • CF有線網路之驅動 version: pcmcia-cs-3.2.7.tar.gz Step : cd pcmcia-cs-3.2.7 make config make 修改檔案 (config.opts、config、network.opts ) 複製route檔到我們剛剛開啟的 ../FileSystem/sbin/ 複製相關的lib檔到ram_image/lib下 (可用arm-linux-strip降低lib大小) /etc/rc.d/rc.pcmcia start

  16. Network(contd.) • CF無線網路之驅動 version: pcmcia-cs-3.2.7.tar.gz linux-wlan-ng-0.2.0.tar.gz Step : 必須先對pcmcia-cs-3.2.7.tar.gz configure 再對linux-wlan-ng-0.2.0.tar.gz做configure make all install 擷取所需的檔案至 filesystem 修改module定義 及 啟動驅動程式的script檔 在版子上即可載入無線網卡的module (ex: insmod [/prefix]/p80211.o) /etc/rc.d/init.d/pcmcia stop /etc/rc.d/init.d/pcmcia start

  17. Application • UPnP SDK version: Apache Xerces-c++-2.5.0 CyberLink C++ UPnP SDK-1.5 step : 設定環境變數 (export ) configure (設定for x86或是for arm)

  18. Application(contd.) • QT 在make QTE for arm之前,必須先make QTE for x86 因為我們需要make完後檔案夾裡面的uic檔案,才能將QTE成功的make for arm version: qt-embedded-3.3.4 Make qte for x86 進入資料夾並設定環境變數 編譯 Make qte for arm 進入資料夾並設定環境變數 (與for x86指令不同) 將qte for x86裡的bin/uic 覆蓋掉這個資料夾的bin/uic 編譯 編譯成功後便可將資料夾底下的lib放置在目標板上

  19. The Basic Operations on Strong ARM • Tools: puppy.tar.gz (包含bin2rom,ethload) Step: 設定minicom (minicom -s) 將檔案轉換為可以download到StrongARM版子的格式(./bin2rom) 執行TFTP Server(./ethload) 即可將我們的檔案燒至Flash or Ram

  20. Problems-MTD • 使用ext2格式的file system時,會有8MB大小的限制。 解決方式: 使用cramfs這種格式來建立file system,並使用MTD來將此格式的file system 燒到版子上。 Step: 1.進入版子的環境後,利用nfs將xxx.cramfs 燒到版子上 cat /mnt/nfs/xxx.cramfs > /dev/mtdblock/2 2.燒完kernel後,在minicom內直接選6執行,此時便會將先前燒到 flash 的root.cramfs當作版子上的file system。

  21. Problems- Write and Read FS • 當我們執行我們的client時,會發現無法看圖片及視訊影像。 • 問題來源: 要看圖片時會將圖片先下載至我們的File System中,而看視訊時亦是先將capture.sdp這個檔案先下載下來再進行播放。因此,我們的問題在於無法將檔案下載至執行檔所在目錄。這是因為我們執行dcnplayer的目錄是mount mtdblock的目錄,而我們放在mtdblock內的檔案是cramfs的格式,故無法將檔案寫入,因此無法下載檔案。 Ex : mount /dev/mtdblock/2 /mnt 將MTD mount到 /mnt下,因為MTD為唯讀,因此 /mnt這個目錄 也是唯讀。

  22. Problems- Write and Read FS (contd.) • 解決方法: 我們將dcnplayer在我們的ext2格式的File System內建一個連結, 如下: ln –s /mnt/dcnplayer /home/dcnplayer cd /home ./dcnplayer -qws 如此一來,我們就可以將我們所需的檔案下載至home的目錄下,這樣就不會出現錯誤了。

  23. Problem- Voice • 播放影片時沒有聲音。 解決方法: 要播放有關音效的檔案,必須建構相關的設備檔,如 audio0等,而其相關的major number 及 minor number 經由參閱廠商所附的File System內的dev目 錄而得。

  24. Problem- Touch Panel • 無法使用觸控板。 解決方法: 要使用Strong Arm的touch panel,需要新增 h3600_ts與h3600_key這兩個設備檔: mknod h3600_ts c 11 0 mknod h3600_key c 11 0

More Related