Arm9+linux fl2440 lcd驱动移植、添加MMC支持、添加U盘支持

来源:互联网 发布:snmp linux版本查询 编辑:程序博客网 时间:2024/06/06 12:43

--------------------------------------------------------------------------------------------------------------------

                                     主机操作系统:centos 6.7
                                     交叉编译器版本:arm-linux-gcc-4.5.4
                                     开发板平台:fl2440
                                     linux内核版本:Linux-3.0

                                     lcd屏幕:4.3寸

                                     Author:  shaocongshuai <916962705@qq.com>

--------------------------------------------------------------------------------------------------------------------

lcd简介:

          LCD ( Liquid Crystal Display 的简称)液晶显示器。
       LCD 的构造是在两片平行的玻璃基板当中放置液晶盒,下基板玻璃上设置TFT(薄膜晶体管),上基板玻璃上设置彩色滤光片,通过TFT上的信号与电压改变来控制液晶分子的转动方向,从而达到控制每个像素点偏振光出射与否而达到显示目的。现在LCD已经替代CRT成为主流,价格也已经下降了很多,并已充分的普及。

Linux lcd详细信息:

http://www.linuxidc.com/Linux/2011-03/33519.htm

[shaocongshuai@localhost linux-3.0.2]$ vim arch/arm/mach-s3c2440/mach-smdk2440.c

...

115     .type       = S3C2410_LCDCON1_TFT,
116
117     .width      = 480,
118     .height     = 272,
119
120     .pixclock   = 40000, /* HCLK 60 MHz, divisor 10 */
121     .xres       = 480,
122     .yres       = 272,
123     .bpp        = 16,
124     .left_margin    = 19,
125     .right_margin   = 10,
126     .hsync_len  = 30,
127     .upper_margin   = 4,
128     .lower_margin   = 2,
129     .vsync_len  = 8,

...

149     .lpcsel     = 0,//((0xCE6) & ~7) | 1<<4,

...

配置内核文件

[shaocongshuai@localhost linux-3.0.2]$ make menuconfig

Device Drivers  ---> Graphics (图像)support  --->

             <*> Support for frame buffer devices  --->

                           [*]   Enable firmware EDID

                           [*]   Enable Video Mode Handling Helpers

                           <*>   S3C2410 LCD framebuffer support

             [*] Backlight & LCD device support  --->

                          <M>   Lowlevel LCD controls

                          <M>   Lowlevel Backlight controls

                          <M>     Generic (aka Sharp Corgi) Backlight Driver

                                        Console display driver support  --->

                                                     <*> Framebuffer Console support
                                                     [*]   Map the console to the primary display device

                                                     [*]   Framebuffer Console Rotation

                                                     [*] Select compiled-in fonts

                                                     [*]   VGA 8x8 font

                                                     [*]   Mini 4x6 font

             Console display driver support  --->
                           <*> Framebuffer Console support

             [*] Bootup logo  --->

                         [*]   Standard 224-color Linux logo

           这样就配置完了,然后

[shaocongshuai@localhost linux-3.0.2]$ make

启动Linux内核,可以看到small penguin.   

            

二、添加MMC的支持

mmc支持很简单,linux内核中提供了,所以直接选上这些选项,重新编译就行了。

Device Drivers  --->

          <*> MMC/SD/SDIO card support  --->  

                       <*>   MMC block device driver

                       <*>   Samsung S3C SD/MMC Card Interface support 

三、添加U盘支持

FL2440添加u盘的挂载比较简单,大部分的内容都是在内核里面做make menuconfig,配置内核。

Device Drivers  --->

           Generic Driver Options  --->  

                      (/sbin/hotplug) path to uevent helper (支持热拔插)

           [*] Block devices  --->

                            <*>   Low Performance USB Block driver

           SCSI device support  --->

                       <*> SCSI device support 

                       <*> SCSI generic support

                       [*] Probe all LUNs on each SCSI device

                       [*] legacy /proc/scsi/ support 
                       <*> SCSI disk support

   配置U盘的文件系统

 File systems  --->

         DOS/FAT/NT Filesystems  --->

                 <*> MSDOS fs support 

                  <*> VFAT (Windows-95) fs support 

                 (437) Default codepage for FAT 

                 (iso8859-1) Default iocharset for FAT  

         -*- Native language support  ---> 

                   <*>   Simplified Chinese charset (CP936, GB2312)

                   <*>   ASCII (United States)

                    <*>   NLS UTF-8

配置好之后,重新编译,烧写到板子上面运行

0 0
原创粉丝点击