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)
chinaunix网友2009-09-15 16:52:26
您好,能不能给我发份config_ok,我的邮箱weite_0303@163.com,谢谢! 顺便问下,您哪是什么书啊,我也看看~~~