Chinaunix首页 | 论坛 | 博客
  • 博客访问: 94987
  • 博文数量: 17
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 230
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-24 17:41
文章分类

全部博文(17)

文章存档

2008年(17)

我的朋友

分类: LINUX

2008-08-22 02:17:23

Kernel version :2.6.22.6
Crosstool      :arm-linux-gcc-3.4.5
Board          :FS2410  

一、Makefile
   
#ARCH           ?= $(SUBARCH)
#CROSS_COMPILE  ?=
ARCH            ?= arm
CROSS_COMPILE   ?= arm-linux-

二、MTD(Memory Technology Device)

  /linux-2.6.22.6/arch/arm/plat-s3c24xx/common-smdk.c

static struct mtd_partition smdk_default_nand_part[] = {
    [0] = {
        .name   = "u-boot",
        .size   = SZ_1M,
        .offset    = 0,
    },
    [1] = {
        .name   = "kernel",
        .offset = MTDPART_OFS_APPEND,
        .size   = SZ_1M*2,
    },
    [2] = {
        .name   = "yaffs",
        .offset = MTDPART_OFS_APPEND,
        .size   = SZ_1M*40,
    },
    [3] = {
        .name   = "jffs2",
        .offset = MTDPART_OFS_APPEND,
        .size   = MTDPART_SIZ_FULL,
    }
};

三、YAFFS
download the source code:


[root@weijing yaffs2]# pwd
/work/rootfs/Development/yaffs2
[root@weijing yaffs2]# ./patch-ker.sh c /work/kernel/linux-2.6.22.6
Updating /work/kernel/linux-2.6.22.6/fs/Kconfig
Updating /work/kernel/linux-2.6.22.6/fs/Makefile
[root@weijing yaffs2]#

/work/kernel/linux-2.6.22.6/fs/yaffs2
打上补丁后,是fs目录下就可以看到ysffs2文件夹。

四、make menuconfig、make uImage

make menuconfig 选项较多,直接使用书中光盘附带的config_ok,
#cp config_ok .config
#make menuconfig
#make uImage


#tftp 0x30008000 uImage
#nand erase 0x100000 0x200000  /*2M的kernel空间*/
#nand write.jffs2 0x30008000 0x100000 $(filesize)
由于烧写分区已改,u-boot的环境变量相应改下便可(set bootcmd 'nand read 30007fc0 100000 200000; bootm 30007fc0',,saveenv)







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

chinaunix网友2009-09-15 16:52:26

您好,能不能给我发份config_ok,我的邮箱weite_0303@163.com,谢谢! 顺便问下,您哪是什么书啊,我也看看~~~