Chinaunix首页 | 论坛 | 博客
  • 博客访问: 93028
  • 博文数量: 21
  • 博客积分: 548
  • 博客等级: 中士
  • 技术积分: 290
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-01 12:11
文章分类

全部博文(21)

文章存档

2012年(12)

2011年(9)

我的朋友

分类: 嵌入式

2012-04-24 16:12:39

嵌入式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

点击(此处)折叠或打开

  1. -- s3c24xx_init_clocks(16934400);
  2. ++ s3c24xx_init_clocks(12000000);

3.修改MTD分区( mtd_partition smdk_default_nand_part)

@@ arch/arm/plat-s3c24xx/common-smdk.c

点击(此处)折叠或打开

  1. static struct mtd_partition smdk_default_nand_part[] = {

  2. [0] = {
  3.                 .name = "Boot",
  4.                 .size = 0x00100000,
  5.                 .offset = 0
  6.         },

  7.         [1] = {
  8.                 .name = "MyApp",
  9.                 .size = 0x003c0000,
  10.                 .offset = 0x00140000,
  11.         },

  12.         [2] = {
  13.                 .name = "Kernel",
  14.                 .size = 0x00300000,
  15.                 .offset = 0x00500000,
  16.         },

  17.         [3] = {
  18.                 .name = "fs_yaffs",
  19.                 .size = 0x03c00000, //30M
  20.                 .offset = 0x00800000,
  21.         },

  22.         [4] = {
  23.                 .name = "WINCE",
  24.                 .size = 0x03c00000,
  25.                 .offset = 0x04400000,
  26.         }

  27. };

##修改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进行内核裁剪

##编译mkyaffsimagemkyaffs2image

cd yaffs3/utils

make

##yaffs_guts.h编译出错


点击(此处)折叠或打开

  1. yaffs_guts.h:136: error: expected specifier-qualifier-list before ‘u8’

  2. yaffs_guts.h:155: error: expected specifier-qualifier-list before ‘u8’

  3. yaffs_guts.h:211: error: expected specifier-qualifier-list before ‘u8’

  4. yaffs_guts.h:293: error: expected specifier-qualifier-list before ‘u32’

  5. yaffs_guts.h:315: error: expected specifier-qualifier-list before ‘u16’

  6. yaffs_guts.h:388: error: expected specifier-qualifier-list before ‘u32’

  7. yaffs_guts.h:399: error: expected specifier-qualifier-list before ‘u8’

  8. yaffs_guts.h:488: error: expected specifier-qualifier-list before ‘u32’

  9. yaffs_guts.h:509: error: expected specifier-qualifier-list before ‘u8’

  10. yaffs_guts.h:525: error: expected specifier-qualifier-list before ‘u32’

  11. yaffs_guts.h:629: error: expected specifier-qualifier-list before ‘u16’

  12. yaffs_guts.h:792: error: expected specifier-qualifier-list before ‘u32’

  13. yaffs_guts.h:807: error: expected specifier-qualifier-list before ‘u32’

##解决办法

vim ../direct/yportenv.h

去掉#ifdef CONFIG_YAFFS_DEFINES_TYPES宏定义


##注:不知道为什么yaffs2源码编译出来的mkyaffs2image打包的文件系统不能识别,只能用飞凌光盘自带的mkyaffs2image


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