zoukankan      html  css  js  c++  java
  • 制作yaffs2文件系统

    由于内核里没有yaffs2文件系统生成功能,所以需要添加补丁。
     
    1. fsMakefile.path in fs_yaffs2.tgz is the patch for kernel/fs/Makefile
     
    在 kernel/fs/Makefile中添加如下内容
    [root@localhost fs_yaffs2]# cat fsMakefile.path
    --- fs/Makefile.orig    2010-01-22 11:43:38.000000000 +0800
    +++ fs/Makefile 2010-01-22 11:44:22.000000000 +0800
    @@ -120,3 +120,5 @@
     obj-$(CONFIG_DEBUG_FS)         += debugfs/
     obj-$(CONFIG_OCFS2_FS)         += ocfs2/
     obj-$(CONFIG_GFS2_FS)           += gfs2/
    +# Patched by YAFFS
    +obj-$(CONFIG_YAFFS_FS)               += yaffs2/
    [root@localhost fs_yaffs2]#
     
    2. Kconfig.patch in fs_yaffs2.tgz is the patch for kernel/fs/Kconfig
    在 kernel/fs/Kconfig中,添加如下内容
    [root@localhost fs_yaffs2]# cat Kconfig.patch
    --- Kconfig.pre.yaffs   2010-01-21 12:41:45.000000000 +0800
    +++ Kconfig     2010-01-21 12:41:37.000000000 +0800
    @@ -1182,6 +1182,10 @@
              To compile the EFS file system support as a module, choose M here: the
              module will be called efs.
     
    +
    +# Patched by YAFFS
    +source "fs/yaffs2/Kconfig"
    +
     config JFFS2_FS
            tristate "Journalling Flash File System v2 (JFFS2) support"
            select CRC32
    [root@localhost fs_yaffs2]#
     
    最后后拷贝 yaffs2/ 到 /kerenl/fs/ 中。
     
    3. stlinux23-host-yaffs-utils-1.0.0-3.i386.rpm is to install  /opt/STM/STLinux-
    2.3/host/bin/mkyaffs2image to create yaffs2 fs image.
     
    制作文件系统工具
    [root@localhost fs_yaffs2]# rpm -ivh stlinux23-host-yaffs-utils-1.0.0-3.i386.rpm --nodeps --force
    这样就可以用mkyaffs2image 来制作yaffs2文件系统了~

    4. use apply_yaffs2nand-app.sh
     
    [root@localhost hanbang--mini+fs+for+ramdisk&jffs2&yaffs2]# cat apply_yaffs2nand-app.sh
    echo "rm ./yaffs2fs-app.yaffs2"
    rm /opt/STM/STLinux-2.3/devkit/sh4/yaffs2fs-app.yaffs2
    /opt/STM/STLinux-2.3/host/bin/mkyaffs2image 1 /opt/STM/STLinux-2.3/devkit/sh4/target
    /opt/STM/STLinux-2.3/devkit/sh4/yaffs2fs-app.yaffs2
    echo "done !!!"
    [root@localhost hanbang--mini+fs+for+ramdisk&jffs2&yaffs2]#
     
    5. 制作文件系统:source ./apply_yaffs2nand-app.sh

  • 相关阅读:
    git常用指令 github版本回退 reset
    三门问题 概率论
    如何高效的学习高等数学
    数据库6 关系代数(relational algebra) 函数依赖(functional dependency)
    数据库5 索引 动态哈希(Dynamic Hashing)
    数据库4 3层结构(Three Level Architecture) DBA DML DDL DCL DQL
    梦想开始的地方
    java String字符串转对象实体类
    java 生成图片验证码
    java 对象之间相同属性进行赋值
  • 原文地址:https://www.cnblogs.com/wangfengju/p/6173260.html
Copyright © 2011-2022 走看看