移植kernel-3.10.79 (1) 支持 yaffs

网站: http://www.yaffs.net/
获取方法: 执行git clone git://www.aleph1.co.uk/yaffs2
解压:tar zxf yaffs_source.tar.gz
打补丁:

#cd /work/tmp/yaffs2 // cd yaffs-dir
#./patch-ker.sh c m ~/mini2440/linux-3.10.79 // ./patch-ker.sh c m linux-tree
make menuconfig

    File Systems
    ---> Miscellaneous filesystems
        ---> [*]YAFFS2 file system support
    make uImage

出错:fs/yaffs2/yaffs_vfs.c:3398: error: implicit declaration of function ‘create_proc_entry‘

原因:编译fs/yaffs2/yaffs_vfs.c时出现错误,function ‘create_proc_entry‘没有申明。
原来这个接口在linux-3.10被删除了,应该使用proc_create代替。

修改:

vim fs/yaffs2/yaffs_vfs.c

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) 修改为#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
    #define YAFFS_NEW_PROCFS
    #include <linux/seq_file.h>
    #endif

问题2:
end_request: I/O error, dev mtdblock4, sector 0
移植内核时出现了这种错误,这种错误通常是由校验造成的.这种情况的解决办法为:

禁止Flash ECC校验
我们的内核都是通过UBOOT写到Nand Flash的, UBOOT通过的软件ECC算法产生ECC校验码, 这与内核校验的ECC码不一样, 内核中的ECC码是由S3C2410中Nand Flash控制器产生的. 所以, 我们在这里选择禁止内核ECC校验.
修改drivers/mtd/nand/s3c2410.c 文件:
vi drivers/mtd/nand/s3c2410.c
找到s3c2410_nand_init_chip()函数,在该函数体最后加上一条语句:

chip->ecc.mode = NAND_ECC_NONE;

原文地址:https://www.cnblogs.com/hulig7/p/9924202.html

时间: 2024-08-03 01:11:44

移植kernel-3.10.79 (1) 支持 yaffs的相关文章

FL2440移植LINUX-3.4.2(四)-- 添加支持YAFFS文件系统

1.修改 MTD 驱动源码以支持 yaffs 文件系统 在/drivers/mtd/nand/s3c2410.c的846行修改chip->ecc.mode        = NAND_ECC_SOFT;为chip->ecc.mode        = NAND_ECC_NONE;    /* by zhutao */ 2.获得yaffs方法1):(这个版本的yaffs2没有成功)官网http://www.yaffs.net/download-yaffs-using-git 获得命令:git c

Implement a System Call in Kernel 3.10.56 (X86_64)

Implementing a system call in Kernel 2.6.32 is somehow different from the method in Kernel 3.10.56. In kernel 2.6.32, we should register the system call number in the file /arch/x86/include/asm/unistd_64.h and then add the corresponding function prot

Install a new Linux Kernel (3.10.56) in Guest OS (Dom U)

These days I want to install a new Linux kernel in Guest Operating System. The original version of Guest OS is 2.6.32, but I need a kernel version 3.10. I have tried several ways and following steps is just one of methods which can work: 1. We should

移植kernel-3.10.79 (1)

u-boot 使用u-boot-2014.10 find * -name "*2410*_defconfig"find * -name "*2440*_defconfig" 可以看到arch/arm/configs/mini2440_defconfigarch/arm/configs/s3c2410_defconfig 下载命令: set serverip 192.168.1.104kernel: tftp 30000000 uImage nand erase 0x

u-boot支持yaffs映像烧写的补丁

u-boot的nand flash驱动有两个版本,似乎是以u-boot1.1.5为分界点的,之前的版本使用的是自己写的nand flash驱动,而后面的版本使用的是linux内核中nand flash的驱动.这两个版本有可能在同一个u-boot中存在,都存放在 driver目录下面,一个为nand,一个为nand_legacy,意思为传统的nand flash驱动.两者使用一个宏开关 CFG_NAND_LEGACY来打开,如果定义这个宏的话,将使用传统的nand flash驱动,否则使用最新的f

u-boot移植(十三)---代码修改---支持文件系统及补丁制作

一.烧写文件系统 1.1 jffs2烧写 1.下载文件系统:tftp 30000000 fs_mini_mdev.jffs2 2.擦除文件的块:nand erase.part rootfs 3.烧入文件系统:nand write.jffs2 30000000 0x00260000 5b89a8 4.设置启动参数:set bootargs console=ttySAC0 root=/dev/mtdblock3 rootfstype=jffs2 5.重新启动 这个需要先烧写内核. 1.2 yaffs

u-boot移植(十)---代码修改---支持nor flash

一.问题定位 开发板重启后打印了2个提醒和一个错误,caches的提醒先不看,看看flash和nand下面的提醒,bad CRC,Using default enviroment,我们可以定位Using default enviroment定位到 代码位置,如下: Env_common.c (common) 传入的参数应该是 !badCRC,再次定位函数set_default_env 看是在哪里调用此函数: 基本上文件都在common文件夹下,有common中的调用和 dataflash,nan

OS X 10.6以上支持NTFS

Mac os 默认只能读取NTFS 格式的外接 移动硬盘,U盘.只能读写 FAT32,EXTFAT 格式的磁盘. 故而使用NTFS格式的设备,需要使用一些特别的方式. 我使用过  ntfsmounter,发现不怎么好使用. Paragon Ntfs 10,非常好用,可惜价格太贵. 而转成EXTFAT 但是 磁盘在 xp 和 windows server 2003 无法识别. 故而使用 macfuse 方案,mac os 自带的方案最靠谱,第三方软件,容易卡磁盘. macfuse: http://

mariadb 10.2.3支持oracle execute immediate语法

在之前的版本包括oracle mysql/percona server版本中,所有的动态SQL都需要通过prepare执行,如下: prepare stmt from "select 1"; execute stmt; deallocate prepare stmt; 现在可以这样执行: EXECUTE IMMEDIATE 'SELECT 1'