skyeye install

(一)skyeye install:

sudo apt-get install  libxft-dev libx11-dev libxpm-dev

sudo apt-get install libncurses5-dev

./configure
make lib
make
sudo make install_lib
sudo make install

 

(二)dowload  arm-linux-gcc

需要注意的是gcc最好使用友善之臂的4.4.3(http://arm9download.cncncn.com/mini2440/linux/arm-linux-gcc-4.4.3-20100728.tar.gz ),传说中这个版本编译QT时能避免所有的Segmentation Fault

 

#tar -jxvf  arm-linux-gcc-4.4.3-20100728.tar.gz

  # cd .........

  #cp -rv .... /usr/local/
  现在交叉编译程序集都在........../4.4.3/bin下面了

vi /etc/bash.bashrc

export PATH=$PATH:/usr/local/arm/4.4.3/bin
export PATH

 

更新

source bash.bashrc

(三)compile linux kernel supporting LCD, touchmonitor

先下载linux-2.6.36.tar.bz2(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.36.tar.bz2 sudo tar jxvf linux-2.6.36.tar.bz2

使用tar命令时为什么会有“不允许的操作":权限不够,你用root操作应该就不会了。另外在解包时放在linux分区上,不要在win分区下。
win分区不支持符号链接。

 

 tar jxvf linux-2.6.36.tar.bz2

2. cd linux-2.6.36/

3. gedit arch/arm/mach-s3c2410/include/mach/memory.h &
    将:
#define PHYS_OFFSET    UL(0x30000000)
    修改成:
#define PHYS_OFFSET    UL(0xC0000000)

4. gedit arch/arm/mach-s3c2410/include/mach/map.h &
    将:
#define S3C2410_CS6 (0x30000000)
    修改成:
#define S3C2410_CS6 (0xC0000000)

5. gedit arch/arm/mach-s3c2410/include/mach/smdk2410.h &
    在文件中添加以下内容:
#ifndef _INCLUDE_SMDK2410_H_
#define _INCLUDE_SMDK2410_H_

#include <generated/autoconf.h>

#define pSMDK2410_ETH_IO __phys_to_pfn(0x19000000)
#define vSMDK2410_ETH_IO S3C2410_ADDR(0xE0000000)
#define SMDK2410_ETH_IRQ IRQ_EINT9

#define pSMDK2410_TS_IO __phys_to_pfn(0x19100000)
#define vSMDK2410_TS_IO S3C2410_ADDR(0xE0100000)
#define SMDK2410_TS_IRQ IRQ_EINT19

#endif // _INCLUDE_SMDK2410_H_

6. gedit arch/arm/mach-s3c2410/mach-smdk2410.c &
    添加以下内容:
#include <mach/smdk2410.h>
#include <mach/regs-lcd.h>
#include <mach/fb.h>

static struct s3c2410fb_display s3c2410_lcd_cfg __initdata = {
    .type = S3C2410_LCDCON1_TFT,
 
    .lcdcon5    = S3C2410_LCDCON5_FRM565 |
                  S3C2410_LCDCON5_INVVLINE |
                  // S3C2410_LCDCON5_INVVCLK |
                  S3C2410_LCDCON5_INVVFRAME |
                  // S3C2410_LCDCON5_INVLEND|
                 S3C2410_LCDCON5_PWREN |
                  S3C2410_LCDCON5_HWSWP,

   .width       = 320,
   .height        = 240,
   .xres        = 320,
   .yres        = 240,
   .bpp            = 16,

    .pixclock     = 100000,
    .left_margin  = 13,
    .right_margin = 8,
    .hsync_len    = 4,
    .upper_margin = 2,
    .lower_margin = 7,
    .vsync_len    = 4,
};

static struct s3c2410fb_mach_info s3c2410_lcd_info __initdata = {
    .displays=     &s3c2410_lcd_cfg,
    .num_displays=     1,
    .default_display= 0,
 
    .gpcup=         0xffffffff,
    .gpcup_mask=    0xffffffff,
    .gpccon=        0xaaaaaaaa,
    .gpccon_mask=   0xffffffff,
    .gpdup  =       0xFFFFFFFF,
    .gpdup_mask=    0xffffffff,
    .gpdcon=        0xaaaaaaaa,
    .gpdcon_mask=   0xffffffff,

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

    在smdk2410_iodesc的定义中添加以下内容:
  /* Map the ethernet controller CS8900A */
  {vSMDK2410_ETH_IO,pSMDK2410_ETH_IO, SZ_1M, MT_DEVICE},
  /* Map the touchscreen controller SKYEYE */
  {vSMDK2410_TS_IO,pSMDK2410_TS_IO, SZ_1M, MT_DEVICE},

    在smdk2410_init的定义中s3c_i2c0_set_platdata(NULL);这一句的下面添加:
    s3c24xx_fb_set_platdata(&s3c2410_lcd_info);

7. gedit arch/arm/plat-s3c24xx/common-smdk.c &
    将结构定义mtd_partition smdk_default_nand_part由:
static struct mtd_partition smdk_default_nand_part[] = {
    [0] = {
        .name    = "Boot Agent",
        .size    = SZ_16K,
        .offset    = 0,
    },
    [1] = {
        .name    = "S3C2410 flash partition 1",
        .offset = 0,
        .size    = SZ_2M,
    },
    [2] = {
        .name    = "S3C2410 flash partition 2",
        .offset = SZ_4M,
        .size    = SZ_4M,
    },
    [3] = {
        .name    = "S3C2410 flash partition 3",
        .offset    = SZ_8M,
        .size    = SZ_2M,
    },
    [4] = {
        .name    = "S3C2410 flash partition 4",
        .offset = SZ_1M * 10,
        .size    = SZ_4M,
    },
    [5] = {
        .name    = "S3C2410 flash partition 5",
        .offset    = SZ_1M * 14,
        .size    = SZ_1M * 10,
    },
    [6] = {
        .name    = "S3C2410 flash partition 6",
        .offset    = SZ_1M * 24,
        .size    = SZ_1M * 24,
    },
    [7] = {
        .name    = "S3C2410 flash partition 7",
        .offset = SZ_1M * 48,
        .size    = SZ_16M,
    }
};
改成:
static struct mtd_partition smdk_default_nand_part[] = {
    [0] = {
        .name    = "S3C2410 flash partition 1",
        .offset = 0,
        .size    = SZ_32M,
    },
    [1] = {
        .name    = "S3C2410 flash partition 2",
        .offset = SZ_32M,
        .size    = SZ_32M,
    }/*,
    [2] = {
        .name    = "S3C2410 flash partition 2",
        .offset = SZ_4M,
        .size    = SZ_4M,
    },
    [3] = {
        .name    = "S3C2410 flash partition 3",
        .offset    = SZ_8M,
        .size    = SZ_2M,
    },
    [4] = {
        .name    = "S3C2410 flash partition 4",
        .offset = SZ_1M * 10,
        .size    = SZ_4M,
    },
    [5] = {
        .name    = "S3C2410 flash partition 5",
        .offset    = SZ_1M * 14,
        .size    = SZ_1M * 10,
    },
    [6] = {
        .name    = "S3C2410 flash partition 6",
        .offset    = SZ_1M * 24,
        .size    = SZ_1M * 24,
    },
    [7] = {
        .name    = "S3C2410 flash partition 7",
        .offset = SZ_1M * 48,
        .size    = SZ_16M,
    }*/
};

将:
static struct s3c2410_nand_set smdk_nand_sets[] = {
    [0] = {
        .name        = "NAND",
        .nr_chips    = 1,
        .nr_partitions    = ARRAY_SIZE(smdk_default_nand_part),
        .partitions    = smdk_default_nand_part,
    },
};
改成:
static struct s3c2410_nand_set smdk_nand_sets[] = {
    [0] = {
        .name        = "NAND",
        .nr_chips    = 1,
        .disable_ecc    = 1,
        .nr_partitions    = ARRAY_SIZE(smdk_default_nand_part),
        .partitions    = smdk_default_nand_part,
    },
};

8. gedit arch/arm/plat-samsung/time.c &
    将函数s3c2410_timer_setup中的:
    if (tcnt > TICK_MAX) {
    修改成:
    if (tcnt > 0xffffffff) {

9. 下载cs8900驱动(http://blog.csdn.net/Matrix_Designer/archive/2010/12/09/6065055.aspx ),然后:
cp cs8900.h drivers/net/arm/
cp cs8900.c drivers/net/arm/

10. gedit drivers/net/arm/Kconfig &
    在文件最后添加以下内容:
config ARM_CS8900
        tristate "CS8900 support"
        depends on NET_ETHERNET && ARM && ARCH_SMDK2410
        help
          Support for CS8900A chipset based Ethernet cards. If you have a network
          (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available
          from as well as .To compile this driver as a module, choose M here and read.
          The module will be called cs8900.o.

11. gedit drivers/net/arm/Makefile &
    在文件最后添加以下内容:
obj-$(CONFIG_ARM_CS8900)     += cs8900.o


12. 下载TouchScreen驱动(http://blog.csdn.net/Matrix_Designer/archive/2010/12/09/6065713.aspx ),然后:
cp skyeye_ts_drv.h drivers/input/touchscreen/
cp skyeye_ts_drv.c drivers/input/touchscreen/

13. gedit drivers/input/touchscreen/Kconfig &
在if INPUT_TOUCHSCREEN的下面添加以下内容:
config TOUCHSCREEN_SKYEYE
    tristate "SkyEye Touch Screen support"
    depends on INPUT && INPUT_TOUCHSCREEN
    help
      Support for skyeye based touchscreen. If you build the kernel
          for skyeye, and want to use the touchscreen, say Y. To compile
          this driver as a module, choose M here and read.
          The module will be called skyeye_ts_drv.o.

14. gedit drivers/input/touchscreen/Makefile &
在文件最后添加以下内容:
obj-$(CONFIG_TOUCHSCREEN_SKYEYE)    += skyeye_ts_drv.o

15. make ARCH=arm CROSS_COMPILE=arm-linux- s3c2410_defconfig

16. make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
      将Boot options->Default kernel command string改成mem=64M console=ttySAC0 root=/dev/ram initrd=0xC0800000,0x01000000 ramdisk_size=16384 rw
      选中Kernel Features->Use the ARM EABI to compile the kernel
      取消Device Drivers->Character devices->Serial drivers->8250/16550 and compatible serial support
      选中Device Drivers->Graphics support->Logo configuration->Bootup logo
      选中Device Drivers->Input device support->Event Debugging
      选中Device Drivers->Input device support->Touchscreens->SkyEye Touch Screen support
      选中Device Drivers->Network device support->Ethernet (10 or 100Mbit)->CS8900 support
      修改Device Drivers->Block devices下的几个值:
            (1) Default number of RAM disks
            (16384) Default RAM disk size (kbyte)
      选中Device Drivers->Memory Technology Device(MTD) support->Mapping drivers for chip access->Flash device in physical memory map
      选中Device Drivers->Memory Technology Device(MTD) support->Mapping drivers for chip access->Flash device in physical memory map->Physmap compat support
      修改Device Drivers->Memory Technology Device(MTD) support->Mapping drivers for chip access->Flash device in physical memory map->Physmap compat support下的几个值:
            (0x80000000) Physical start address of flash mapping
            (0x2000000) Physical length of flash mapping
            (4) Bank width in octets
      取消File System->Network File System->Root file system on NFS
      选中File System->Network File System->NFS client support for NFS version 4
      选中File System->Network File System->NFS client support for NFSv4.1 (EXPERIMENTAL)

17. make ARCH=arm CROSS_COMPILE=arm-linux-

至此,linux2.6.36编译完成,此内核支持cs8900网卡、LCD和触摸屏。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值