Chinaunix首页 | 论坛 | 博客
  • 博客访问: 37144
  • 博文数量: 19
  • 博客积分: 742
  • 博客等级: 军士长
  • 技术积分: 185
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-01 21:18
文章分类

全部博文(19)

文章存档

2011年(4)

2010年(15)

我的朋友

分类: 嵌入式

2010-08-07 22:41:20

1、vim Makefile
 
ARCH ?= arm
CROSS_COMPILE ?=arm-linux-
2、修改NAND分区 #vim arch/arm/mach-s3c2440/mach-mini2440.c
static struct mtd_partition mini2440_default_nand_part[] __initdata = {
   [0] = {
        .name   = "supervivi",
        .size   = 0x00040000,
        .offset = 0,
    },
    [1] = {
        .name   = "param",
        .offset = 0x00040000,
        .size   = 0x00020000,
    },
    [2] = {
        .name   = "Kernel",
        .offset = 0x00060000,
        .size   = 0x00500000,
    },
    [3] = {
        .name   = "root",
        .offset = 0x00560000,
        .size   = 1024 * 1024 * 1024, //
    },
    [4] = {
        .name   = "nand",
        .offset = 0x00000000,
        .size   = 1024 * 1024 * 1024, //
    }
};

3、增加yaffs2文件系统的支持,下载yaffs补丁:
./patch-ker.sh c /opt/my2440/linux-2.6.33
4、配置内核选项 
#make dep

#make clean

#cp arch/arm/configs/mini2440_defconfig .config

#make menuconfig
添加配置信息
(1).General setup --->

        [*] Configure standard kernel features (for small systems) --->

        选上这项,否则文件系统中的一些选项不会出现

(2).System Type ---->

        [*] S3C2410 DMA support

        S3C2440 Machines --->

             [*] SMDK2440

             [*] NexVision NEXCODER 2440 Light Board

               [*] MINI2440 development board

(3).File systems----->

         Miscellaneous filesystems --->

                <*>YAFFS2 file system support
5、make zImag
注意:运行时出现问题,网卡工作不稳定,导致NFS加载不成功
Looking up port of RPC 100003/2 on 192.168.0.1
rpcbind: server 192.168.0.1 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.0.1
rpcbind: server 192.168.0.1 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
Root-NFS: Server returned error -101 while mounting /opt/share/nfs/rootfs
VFS: Unable to mount root fs via NFS, trying floppy.

解决方法:
参考http://www.cublog.cn/u3/93291/showart_2064136.html
修改网卡驱动文件driver/net/dm9000.c
#include <linux/irq.h>
#include <linux/gpio.h> // important for s3c2410_gpio_cfgpin...
#include <mach/map.h>
#include <mach/regs-mem.h>
#include <mach/irqs.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#define DM9000_IRQ IRQ_EINT7
在probe里加上
//add by lzd
    unsigned int value;
    value = __raw_readl(S3C2410_BWSCON);
    value &= ~(S3C2410_BWSCON_WS4|
    S3C2410_BWSCON_ST4|S3C2410_BWSCON_DW4_32);
    value |= (S3C2410_BWSCON_ST4|S3C2410_BWSCON_DW4_16);
    __raw_writel(value, S3C2410_BWSCON);
//config the bankcon4
    value = 0;
    value = (S3C2410_BANKCON_Tacs4|S3C2410_BANKCON_Tcos4|S3C2410_BANKCON_Tacc14|S3C2410_BANKCON_Tcoh4| \
    S3C2410_BANKCON_Tcah4|S3C2410_BANKCON_Tacp6|S3C2410_BANKCON_PMCnorm);
    __raw_writel(value,S3C2410_BANKCON4);
    set_irq_type(DM9000_IRQ,IRQ_TYPE_LEVEL_HIGH);

 
 
阅读(655) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~