- 论坛徽章:
- 0
|
Kernel version :2.6.22.6Crosstool :arm-linux-gcc-3.4.5Board :FS2410 一、Makefile
#ARCH ?= $(SUBARCH)#CROSS_COMPILE ?=ARCH ?= armCROSS_COMPILE ?= arm-linux-二、MTD(Memory Technology Device)
/linux-2.6.22.6/arch/arm/plat-s3c24xx/common-smdk.cstatic 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:
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/
[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博客,如果查看原文请点:http://blog.chinaunix.net/u2/74310/showart_1138818.html |
|