嵌入式LINUX2.6.32移植-yaffs2文件系统
主机:RHEL6.0(2.6.32-220.2.1.el6.i686)
开发板:FL2440
编译器:arm-unknown-linux-gnueabi-gcc-4.4.6
1.修改Makefile
ARCH
?= arm
CROSS_COMPILE
?= arm-unknown-linux-gnueabi-
2.修改晶振频率
@163@
arch/arm/mach-s3c2440/mach-smdk2440.c
- -- s3c24xx_init_clocks(16934400);
- ++ s3c24xx_init_clocks(12000000);
3.修改MTD分区(
mtd_partition smdk_default_nand_part)
@@
arch/arm/plat-s3c24xx/common-smdk.c
- static struct mtd_partition smdk_default_nand_part[] = {
- [0] = {
- .name = "Boot",
- .size = 0x00100000,
- .offset = 0
- },
- [1] = {
- .name = "MyApp",
- .size = 0x003c0000,
- .offset = 0x00140000,
- },
- [2] = {
- .name = "Kernel",
- .size = 0x00300000,
- .offset = 0x00500000,
- },
- [3] = {
- .name = "fs_yaffs",
- .size = 0x03c00000, //30M
- .offset = 0x00800000,
- },
- [4] = {
- .name = "WINCE",
- .size = 0x03c00000,
- .offset = 0x04400000,
- }
- };
##修改NAND_ECC方式
@@822@@drivers/mtd/nand/s3c2410.c
chip->ecc.mode
= NAND_ECC_NONE;//NAND_ECC_SOFT;
##支持yaffs2文件系统
git
clone git://
cd
yaffs2
./patch-ker.sh
c m /work/rhel/linux-2.6.32.59/
make s3c2410_defconfig
make menuconfig进行内核裁剪
##编译mkyaffsimage和mkyaffs2image
cd
yaffs3/utils
make
##yaffs_guts.h编译出错
- yaffs_guts.h:136: error: expected specifier-qualifier-list before ‘u8’
- yaffs_guts.h:155: error: expected specifier-qualifier-list before ‘u8’
- yaffs_guts.h:211: error: expected specifier-qualifier-list before ‘u8’
- yaffs_guts.h:293: error: expected specifier-qualifier-list before ‘u32’
- yaffs_guts.h:315: error: expected specifier-qualifier-list before ‘u16’
- yaffs_guts.h:388: error: expected specifier-qualifier-list before ‘u32’
- yaffs_guts.h:399: error: expected specifier-qualifier-list before ‘u8’
- yaffs_guts.h:488: error: expected specifier-qualifier-list before ‘u32’
- yaffs_guts.h:509: error: expected specifier-qualifier-list before ‘u8’
- yaffs_guts.h:525: error: expected specifier-qualifier-list before ‘u32’
- yaffs_guts.h:629: error: expected specifier-qualifier-list before ‘u16’
- yaffs_guts.h:792: error: expected specifier-qualifier-list before ‘u32’
- yaffs_guts.h:807: error: expected specifier-qualifier-list before ‘u32’
##解决办法
vim
../direct/yportenv.h
去掉#ifdef
CONFIG_YAFFS_DEFINES_TYPES宏定义
##注:不知道为什么yaffs2源码编译出来的mkyaffs2image打包的文件系统不能识别,只能用飞凌光盘自带的mkyaffs2image
阅读(2340) | 评论(0) | 转发(1) |