QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2789|回复: 0

请教s3c2440的skyeye.conf文件

[复制链接]
发表于 2009-4-4 22:25:52 | 显示全部楼层 |阅读模式
linux2.6.29.1 的在s3c2440板子上的移植过程如下:
1. 解压源代码
[root@localhost Desktop]# tar -xjvf linux-2.6.29.1.tar.bz2
[root@localhost Desktop]# cd linux-2.6.29.1
[root@localhost linux-2.6.29.1]#

2. 更改Makefile
[root@localhost linux-2.6.29.1]# gedit Makefile
修改 ARCH 和 CROSS_COMPILE
ARCH                ?= arm
CROSS_COMPILE        ?= arm-linux-

3. 生成默认配置
[root@localhost linux-2.6.29.1]# make s3c2410_defconfig

4. 支持启动时挂载devfs
[root@localhost linux-2.6.29.1]# gedit fs/Kconfig
找到menu "Pseudo filesystems"
添加如下语句:
-----------------------------------------------------------------------------------
找到menu "Pseudo filesystems"
添加如下语句:
config DEVFS_FS
        bool "/dev file system support (OBSOLETE)"
        depends on EXPERIMENTAL
        help
          This is support for devfs, a virtual file system (like /proc) which
          provides the file system interface to device drivers, normally found
          in /dev. Devfs does not depend on major and minor number
          allocations. Device drivers register entries in /dev which then
          appear automatically, which means that the system administrator does
          not have to create character and block special device files in the
          /dev directory using the mknod command (or MAKEDEV script) anymore.

          This is work in progress. If you want to use this, you *must* read
          the material in , especially
          the file README there.

          Note that devfs no longer manages /dev/pts! If you are using UNIX98
          ptys, you will also need to mount the /dev/pts filesystem (devpts).

          Note that devfs has been obsoleted by udev,
          <http://www.kernel.org/pub/linux/utils/kernel/hotplug/>.
          It has been stripped down to a bare minimum and is only provided for
          legacy installations that use its naming scheme which is
          unfortunately different from the names normal Linux installations
          use.

          If unsure, say N.

config DEVFS_MOUNT
        bool "Automatically mount at boot"
        depends on DEVFS_FS
        help
          This option appears if you have CONFIG_DEVFS_FS enabled. Setting
          this to 'Y' will make the kernel automatically mount devfs onto /dev
          when the system is booted, before the init thread is started.
          You can override this with the "devfs=nomount" boot option.

          If unsure, say N.

config DEVFS_DEBUG
        bool "Debug devfs"
        depends on DEVFS_FS
        help
          If you say Y here, then the /dev file system code will generate
          debugging messages. See the file
          for more details.

          If unsure, say N.

5. 修改晶振
[root@localhost linux-2.6.29.1]# gedit arch/arm/mach-s3c2440/mach-smdk2440.c

        s3c24xx_init_clocks(16934400);
改为
//        s3c24xx_init_clocks(16934400);
        s3c24xx_init_clocks(12000000);

6. 修改MTD分区
修改common-smdk.c文件
[root@localhost linux-2.6.29.1]# gedit arch/arm/plat-s3c24xx/common-smdk.c
static struct mtd_partition smdk_default_nand_part[] = {
        [0] = {
                .name        = "u-boot",
                .size        = SZ_64K*3,
                .offset        = 0,
        },
        [1] = {
                .name        = "kernel",
                .offset        = SZ_64K*3,
                .size        = SZ_64K*29,
        },
        [2] = {
                .name        = "rootfs",
                .offset        = SZ_2M,
                .size        = SZ_1M*30,
        },
        [3] = {
                .name        = "app",
                .offset        = SZ_32M,
                .size        = SZ_32M,
        }
};

7. 关闭ECC校验
[root@localhost linux-2.6.29.1]# gedit drivers/mtd/nand/s3c2410.c
在s3c2410_nand_init_chip函数中

                chip->ecc.mode            = NAND_ECC_SOFT;
改为
                chip->ecc.mode            = NAND_ECC_NONE;

8. 配置内核
[root@localhost linux-2.6.29.1]# make menuconfig
修改启动参数为:
|---Boot options
|    |---Default kernel command string:
[root=/dev/mtdblock2 rootfstype=cramfs init=/linuxrc console=ttySAC0,115200 devfs=mount mem=64]

增加devfs文件系统支持
|---File systems
|    |---Pseudo filesystems
|    |      |---/dev file system support
|    |      |      |---Automatically mount at boot
|    |      |      |---Debug devfs

9. 编译内核
[root@localhost linux-2.6.29.1]# make zImage

+++++++++++++++++++++++++++++++

s3c2440的skyeye2440.conf文件是ksh给的(http://www.linuxfans.org/bbs/thread-187665-1-1.html
#skyeye config file sample

cpu:  arm920t
mach: s3c2440

#physical memory
#mem_bank: map=M, type=RW, addr=0x20000000, size=0x01000000
mem_bank: map=M, type=RW, addr=0x30000000, size=0x00800000
mem_bank: map=M, type=RW, addr=0x30800000, size=0x00800000
mem_bank: map=M, type=RW, addr=0x31000000, size=0x01000000
#all peripherals I/O mapping area
#mem_bank: map=I, type=RW, addr=0xfefa0000, size=0x00060000
mem_bank: map=I, type=RW, addr=0x48000000, size=0x20000000
mem_bank: map=I, type=RW, addr=0x19000300, size=0x00000020
#net: type=cs8900a, base=0x19000300, size=0x20,int=9, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1
lcd:type=s3c2440,mod=gtk
load_addr:base=0x30000000, mask=0xFFFFFF
#dbct:state=on

++++++++++++++++++
(是 skyeye-1.2.7_rc1)
[root@localhost s3c2440-2.6.29.1]# skyeye -e zImage -c skyeye2440.conf
Your elf file is little endian.
arch: arm
cpu info: armv4, arm920t, 41009200, ff00fff0, 2
mach info: name s3c2440, mach_init addr 0x805d860
lcd_mod:1
Your elf file will be load to: base address=0x30000000,mask=0xffffff
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm920t mmu ops
elf_checkFile failed: -1
load "zImage" error
[root@localhost s3c2440-2.6.29.1]#

总觉得skyeye-1.2.7_rc1对s3c2440的支持有问题,我的 u-boot-2009.03(S3C2440)的移植也没有成功,相关信息见http://www.linuxfans.org/bbs/thread-188282-1-1.html

还请 ksh 多多指教
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-25 08:25 , Processed in 0.051044 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表