解决《 Linux3.6.7在OK6410平台的移植》文章的错误问题

我用的内核版本是linux-3.0.1,yaffs是飞凌linux-3.0.1根目录里的那个,按照此教程刷入后会报错,解决方法如下:

用飞凌的对应目录文件替换

替换:linux-3.0.1\fs\yaffs2\yaffs_vfs.c

替换:linux-3.0.1\include\linux\mtd\partitions.h




正确配置内核方法:

cp arch/arm/configs/s3c6400_defconfig .config

make menuconfig



1.System Type,取消SMDK6400 ,A&W6410,SMDK6410等平台,只选择OK6410


2.Device Drivers --> Generic Driver Options选择
        [*] Maintain a devtmpfs filesystem to mount at /dev  
        [*] Automount devtmpfs at /dev, after the kernel mounted the ....  


3.Device Drivers-->Memory Technology Device (MTD) support -->Caching block device access to MTD devices,(先选择 然后才能够在File Systems--->Miscellaneous filesystem下面找到YAFFS2。)


4.Device Drivers -->  Memory Technology Device (MTD) support --->NAND Device Support ---> 取消NAND Flash support for Samsung S3C SoCs ,选择 NAND support for Samsung S3C64xx S5P64xx
  <*>   NAND support for Samsung S3C64xx S5P64xx                   │ │  
  │ │    [*]     Samsung S3C64xx S5P64xx NAND driver debug                │ │  
  │ │    [*]     Samsung S3C64xx S5P64xx NAND Hardware ECC 8BITS (不选会出错)


5.File Systems 配置 取消 Second extended fs support 和 Ext3 journalling file system support , [*] Miscellaneous filesystems --->选择
 <*>   yaffs2 file system support                                 │ │  
  │ │    -*-     512 byte / page devices                                  │ │  
  │ │    [ ]       Use older-style on-NAND data format with pageStatus byt│ │  
  │ │    [ ]         Lets yaffs do its own ECC                            │ │  
  │ │    -*-     2048 byte (or larger) / page devices                     │ │  
  │ │    [*]       Autoselect yaffs2 format                               │ │  
  │ │    [*]       Disable yaffs from doing ECC on tags by default 
  │       [ ]     Force chunk erase check                                  │ │  
  │ │    [ ]     Empty lost and found on boot                             │ │  
  │ │    [ ]     Disable yaffs2 block refreshing                          │ │  
  │ │    [ ]     Disable yaffs2 background processing                     │ │  
  │ │    [*]     Enable yaffs2 xattr support     



备注:我的虚拟机使用的是ubuntu10,所以选项都用*,不能用M,

错误:make[3]: *** No rule to make target `drivers/mtd/nand/s3c_nand.o', needed by `drivers/mtd/nand/built-in.o'.  Stop.
解决方法:复制linux-3.0.1\drivers\mtd\nand\s3c_nand.c


错误:drivers/mtd/nand/s3c_nand.c:1400: error: implicit declaration of function 'add_mtd_partitions'
解决方法:替换:linux-3.0.1\include\linux\mtd\partitions.h


linux-3.0.1\fs\yaffs2\yaffs_vfs.c

yaffs_vfs.c这个文件如下地方增加了东西才能正常工作,飞凌用//gjl做了标记
param->no_tags_ecc = 1;  // gjl
yaffs2文件系统的故障

用文件内容比较软件分析很方便:Beyond Compare 4



错误:make[3]: *** No rule to make target `drivers/mtd/nand/s3c_nand.o', needed by `drivers/mtd/nand/built-in.o'.  Stop.
解决方法:复制linux-3.0.1\drivers\mtd\nand\s3c_nand.c


错误:drivers/mtd/nand/s3c_nand.c:1400: error: implicit declaration of function 'add_mtd_partitions'
解决方法:替换:linux-3.0.1\include\linux\mtd\partitions.h


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值