用户名: 密码: 验证码:
嵌入式Linux系统在GPS行业终端设备中的应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
本文所介绍的内容是如何把嵌入式Linux应用于GPS行业终端设备中。
    所谓GPS行业终端,在功能上可以简单的描述为GPS+PDA+手机。也就是说这样的系统在GPS功能上含有一套完整的GPS用户接收系统,既硬件上包含GPS卫星数据接收模块,软件上包含GPS数据处理软件。而且此终端设备除了GPS功能外还包含了PDA和手机的功能,可以这样说,本项目的GPS行业终端就是一部含有GPS功能的SmartPhone产品。而本文讨论的就是在此GPS行业终端设备上应用嵌入式Linux系统来实现所需的功能。
    在嵌入式手机操作系统领域,Palm OS、Symbian、Pocket PC三大操作系统占据了市场的主要份额,而现在Linux凭借在嵌入式方面的卓越表现使其有能力加入到手机操作系统间的角逐。
    从应用开发的角度看,由于Linux的源代码是开放的,有利于独立软件开发商开发出硬件利用效率高、功能更强大的应用软件,也方便行业用户开发自己的安全、可控认证系统。特别是当PDA手机大量用作行业应用的移动终端时,使用Linux便于实施系统一体化的安全策略。Linux的种种优点预示着其必将会成为手机操作系统赛场上的一匹黑马。
    虽然嵌入式Linux操作系统拥有很多优势,但应用在GPS行业终端设备上仍是一个新的课题,面临诸多的挑战。本文就嵌入式Linux应用于GPS行业终端设备所用到的技术和可能遇到的问题进行了详细的分析,并针对技术难题提出了解决的方法。
    本文所描述的GPS行业终端是笔者参加的一个实际项目,采用的微处理器是Motorola MX1处理器。因为Motorola MX1处理器是基于ARM架构的,所以我们需要创建基于ARM的交叉开发环境,进行Linux嵌入式开发。这套ARM交叉开发环境由一套用于编译、汇编和链接内核及应用程序的组件组成。 这些组件包括:Binutils ,Gcc ,Glibc 。
    由上述组件建立的交叉编译器运行在x86处理器上,却可以编译我们需要的ARM处理器的指令。接下来,我们就可以进入整个嵌入式Linux系统的开发,而把嵌入式Linux操作系统应用到上述的行业终端设备上需要解决一些难点问题,包括解决引导加载程序,内核裁减与定制,开发驱动程序,整合GUI程序及开发所需应用程序,架构文件系统等。下面针对每个问题将作一下简单介绍。
    内核,是一个操作系统的核心,它负责管理系统的进程、内存、设备驱动程序、文件和网络系统,决定着系统的性能和稳定性。根据内核配置
    
    
    原则及GPS行业终端项目的实际需求,对内核的功能和部件进行有效的裁减,利用交叉编译环境,用arm-linux-gcc编译器编译出运行于arm环境下的嵌入式Linux内核。
    嵌入式系统中,引导加载程序(BootLoader)的意义与作用于PC上的BIOS有点类似,它对开发板上的主要部件如CPU,SDRAM,FLASH,串口等进行了初始化。引导装载程序都用于基于 ARM 设备上的 Linux,一旦将引导装载程序安装到目标的闪存中,它就会执行我们上面提到的所有初始化工作。然后,它准备接收来自主机的内核和文件系统。一旦装入了内核,引导装载程序就将控制转给内核。本文中的GPS行业终端系统采用Blob作为引导装载程序。
    嵌入式系统通常有许多设备用于与用户交互,象触摸屏、小键盘、滚动轮、传感器、RA232 接口、LCD 等等。除了这些设备外,还有许多其它专用设备,包括闪存、USB、GSM 等。内核通过所有这些设备各自的设备驱动程序来控制它们,包括 GUI 用户应用程序也通过访问这些驱动程序来访问设备。这些专用设备的驱动程序都需要我们重新开发,开发Linux设备驱动程序有一定的模式,但在实现上不同设备的驱动程序之间也有很多不同之处,而且这些驱动程序还高度依赖所选的硬件平台,特别是微处理器。
    从用户的观点来看,图形用户界面(GUI)是系统的一个最至关重要的方面,用户通过 GUI 与系统进行交互,所以 GUI 应该易于使用并且非常可靠。但它还需要是有内存意识的,以便在内存受限的微型嵌入式设备上可以无缝执行。所以,它应该是轻量级的,并且能够快速装入。鉴于本项目的实际情况,选用的GUI就是Qt/Embedded2.3.8+QTOPIA2.0.0集成环境,QTOPIA2.0.0是一个专为smartphone设备开发的桌面环境,环境中已经预先包含了大多数本项目需求中应有的大部分应用程序包括记事本、任务管理器、科学计算器、媒体播放器、图片浏览器等等。我们在GUI部分中需要做的主要集中在两方面,一是针对本系统硬件平台开发的输入设备驱动程序,对Qt/Embedded源码进行相应的修改。二是根据本项目的需求,添加现有的QTOPIA桌面环境还没有包含的所有应具备的应用程序,比如GIS程序、中文输入法程序、网页浏览程序等等。
    在完成以上几部分的开发后,所要做的工作就是架构整个文件系统,制作映像文件并把其烧录到闪存上。把根据本项目的实际情况,我们的文件系统映像分为两个部分,第一个部分采用cramfs文件系统格式来容纳root文件系统的内容,并且它是只读的,制作出一个rootfs.image;第二部分是建立在mtd驱动上层的jffs2文件系统用来保存那些需要可写的内容,制作出jffs.image。需要说明的是mtd驱动程序是专门为基于闪存
    
    
    的设备所设计的,具有很好的支持、管理和基于扇区的擦除和读写操作的接口。
    MX1芯片板上集成的闪存?
The content recommended of this paper is how to apply embedded Linux to the GPS trade terminal device.
    The so-called GPS trade terminal, can describe as GPS +PDA + cell-phone simply as for the function. That is to say that such a system contains a set of intact GPS user's acception systems functionally in GPS, hardware already include GPS satellite data receive module, software include GPS data processing software. And this terminal device also includes the function of PDA and cell- phone besides GPS function, can say so , the GPS trade terminal of this project is a SmartPhone products with GPS function . And what this paper discussed is to use embedded Linux system to realize the all function on this GPS trade terminal device .
    In the field of embedded cell-phone operating system, Palm OS , Symbian , Pocket PC are three major operating systems occupying the nearly all market, now relying on the remarkable behavior in embedded respect Linux have ability to join the contention among the cell-phone operating systems.
     From the view of application development, for the source code of Linux is open, Linux can help the independent software developer to develop application software with high efficiently utilization of hardware and better function, and help trade users develop one's own security , controlled authentication system too. Especially while a large number of PDA cell-phones is used as trade application portable terminals , using Linux can implement security tactics of system integration easily. All sorts of advantages of Linux indicate that it must become a dark horse on the operating system of the cell-phone .
    Though embedded Linux operating system has a lot of advantages , it is still a new subject to apply to the GPS trade terminal device, face a great deal of challenges. This paper has carried on detailed analysis on the technology that embedded Linux applied to the GPS trade terminal device and the question may meet , and has put forward the method to solve to the technological difficult problem .
    The GPS trade terminal described of this paper is a actual project that author participates in, the microprocessor adopted is Motorola MX1
    
    
    processor. Because Motorola MX1 processor builds up besed on ARM, so we need to establish the cross development environment based on ARM to carry on Linux embedded development. The ARM cross development environment is made up with a suit of components for compiling , assembling ,linking kernel and application program. These components include: Binutils ,Gcc ,Glibc .
    The cross compiler Set up by above-mentioned components is run at x86 processor ,but can compile commands of ARM processor. And then, we can enter development of the whole embedded Linux system , applying embedded Linux operating system to above-mentioned trade terminal device need to solve some difficult problems, including develop bootloader program, cut down and customize the kernel, develop the driver, combine GUI procedure and develop the necessary application program, build up file system ,etc.. Now we will do the simple introduction to each question.
    The kernel is a core of an operating system, it is responsible for management process, memory, device driver, file and network of the system,and determines systematic performance and stability. According to kernel configuration principle and GPS trade terminal project’s actual demand,we carry on effective reduction to kernel function and components.Using arm-linux-gcc compiler we can compile embedded Linux kernel running in arm environment.
    In the embedded system,BootLoader is a little similar to BIOS acting on on PC, it initialezes the main part on the board like CPU, SDRAM, FLASH, Serial port etc.. BootLoader is all used for Linux based on arm devices.While BootLoader is installed to flash memory, it will carry out the above-mentioned initializing works. Then, it plans to receive the kernel and file system from host computer. Once pack kernel into, BootLoader will give kernel the control right. The GPS trade terminal system in the paper adopts B
引文
[1] (美)沃尔夫(Wolf,W.)著;孙玉芳等译. 嵌入式计算系统设计原理[M].北京:机械工业出版社,2002. 351-353
    [2](美)Craig Hollabaugh著;陈雷等译. 嵌入式 Linux——硬件、软件与接口[M].电子工业出版社,2003. 20-44
    [3]王学龙.嵌入式 Linux 系统设计与应用[M].清华大学出版社,2001. 342-421
    [4] Alessandro Rubini著,Lisoleg译.Linux设备驱动程序[M],中国电力出版社,2000.
    [5](美)Alessandro Rubini,Jonathan Corbet 著;魏永明等译. LINUX 设备驱动程序(第二版)[M].中国电力出版社,2002.
    [6] 毛德操,胡希明.Linux内核源代码情景分析[M].杭州:浙江大学出版社,2001.
    [7] Daniel Solin著,袁鹏飞译.24小时学通Qt编程[M];人民邮电出版社,2000.11
    [8] 吕京建、肖海桥,面向二十一世纪的嵌入式系统综述,http://www.bol-system.com/
    [9] 吕京建、肖海桥,嵌入式处理器分类与现状,http://www.bol-system.com/
    [10]李东生,展望中国信息家电,1999,http://www.tclit.com/
    [11]李善平、郑扣根,《Linux内核分析和实验教程》,机械工业出版社,1999
    [12]Victor Yodaiken、Michael Brananov, RTLinux Version Two, VJY Associates LLC http://www.rtlinux.org/
    [13]Victor Yodaiken, The RTLinux Manifesto, Department of Computer Science, New Mexico Institute of Technology, http://www.rtlinux.rog/
    [14]Rick Lehrbaum, Using Linux in Embeded and Real-time Systems, http://www.linuxdevices.com/
    [15]Jim McQuillan, The Linux Terminal Server Project, http://www.ltsp.org/

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700