【正文】
碼 開(kāi)源、內(nèi)核功能 強(qiáng)大、 安全性高、支持的硬件平臺(tái)多等特點(diǎn) , linux 在嵌入式系統(tǒng) 和服務(wù)器上 中得到了 極 其 廣泛的應(yīng)用 ,Linux 也是當(dāng)前最熱門(mén)的嵌入式操作系統(tǒng),嵌入式市場(chǎng)占有率最高 。 本畢業(yè)設(shè)計(jì)選用 FL2440 平臺(tái) , 以完成一個(gè) 嵌入式 圖像采集 系統(tǒng) 為目標(biāo),該平臺(tái)使用三星 S3C2440A 片上系統(tǒng) 為 底板 ,選用 版本 內(nèi)核 ,涉及的工作主要是 linux USB 驅(qū)動(dòng) 移植,數(shù)據(jù)采集程序,用于發(fā)送視頻的通信服務(wù)器端和 數(shù)據(jù)接收的客戶端編寫(xiě) 。 關(guān)鍵詞 :ARM9 Linux 嵌入式 視頻監(jiān)控 USB 驅(qū)動(dòng) V4L 北京聯(lián)合大學(xué) 畢業(yè)設(shè)計(jì) IV Abstract Linux is an open source operating system, and with the character of open source code, powerful kernel, safe, supporting more hardware platforms, Linux get a very wide range of applications in embedded systems and is currently the most popular embedded operating systems,and has the highest market share. In recent years, with the android rising, mercial linux market is growing, Many large panies to develop a new operating system on the basis of the linux kernel and try to use it in wider areas. Linux system porting and driver development is the primary work to apply Linux kernel to a particular embedded image acquisition system. When this part of the work is pleted,the kernel will shield the plexity and diversity of the hardware platform for the upper layer application development, greatly increase the efficiency of product development. This graduation design use FL2440 platform, in order to plete the embedded video monitoring system as the goal, the platform using the Samsung S3C2440A chip selecting version of the kernel, the work involved in the linux USB drive transplant, the data acquisition program used to send the video munication server side and client data receiving programming. The main content of the graduate design thesis as follows: 1. Study linux kernel usb driver model, given the structures of embedded Linux development environment and the preparation of the linux driver code. linux serverside data collection program interface (v4L,) and tcp / ip protocol interface, write the top of the data collection procedures and tcp / ipbased image transmission program (server side). the client on Ubuntu Linux PC with SDL library to display images. Key words: ARM9 Linux Embedded Video Monitor USB Driver 北京聯(lián)合大學(xué) 畢業(yè)設(shè)計(jì) V 目 錄 摘 要 ..........................................................................................................................Ⅲ Abstract........................................................................................................................Ⅳ 引 言 ....................................................................................................................... 1 1 概述 ........................................................................................................................... 2 課題任務(wù)與目的 ............................................................................................ 2 課題任務(wù) .............................................................................................. 2 課題目的 .............................................................................................. 2 2 總體方案設(shè)計(jì) ........................................................................................................... 3 系統(tǒng)的總體方案設(shè)計(jì) ..................................................................................... 3 硬件設(shè)計(jì) ......................................................................................................... 3 軟件設(shè)計(jì) ......................................................................................................... 4 3 嵌入式 ArmLinux 交叉開(kāi)發(fā)環(huán)境的配置 .................................................................. 7 交叉開(kāi)發(fā)環(huán)境概述 ........................................................................................ 7 GNU 工具鏈 ..................................................................................................... 7 交叉編譯工具鏈 ................................................................................. 7 交叉編譯相關(guān)工具 ............................................................................. 7 交叉編譯的構(gòu)建 ................................................................................. 8 系統(tǒng)硬件平臺(tái)配置 ........................................................................................ 9 ARM9 處理器介紹 .............................................................................. 9 USB 攝像頭原理 ............................................................................... 11 4 Linux USB 驅(qū)動(dòng)程序 ................................................................................................. 14 Linux 驅(qū)動(dòng)程序 .............................................................................................. 14 設(shè)備驅(qū)動(dòng)的簡(jiǎn)介 ................................................................................ 14 設(shè)備驅(qū)動(dòng)程序結(jié)構(gòu) ............................................................................ 15 linux 設(shè)備模型 ................................................................................... 18 Linux USB 驅(qū)動(dòng) .............................................................................................. 22 usb 協(xié)議 .............................................................................................. 22 內(nèi)核中的 USB 框架 ......................................................................... 25 usb 驅(qū)動(dòng)程序設(shè)計(jì) .............................................................................. 26 內(nèi)核、文件系統(tǒng)及驅(qū)動(dòng)移植 ...................................................................... 28 北京聯(lián)合大學(xué) 畢業(yè)設(shè)計(jì) VI USB 攝像頭設(shè)備驅(qū)動(dòng)移植 ............................................................ 28 Linux 文件系統(tǒng)移植 ...................................................................... 30 5 嵌入式圖像采集系統(tǒng)的服務(wù)器端 ......................................................................... 31 Linux V4L 視頻采集 ....................................................................................... 31 Linux V4L 視頻采集編程接口分析 ................................................. 31 服務(wù)器端視頻采