转:http://www.armadeus.com/wiki/index.php?title=UBIFS

This is a preliminary page dealing with the installation of UBIFS on the APF boards. UBIFS will replace JFFS2 file system on NAND (and NOR as well) based boards because JFFS2 induces a big overhead when parsing, reading and writing large devices, see UBIFS scalability.

Contents

[hide]

Introduction

UBIFS website

Host Setup

  • add uuid-dev packages (should be already installed as required to build the HEAD of Armadeus repository):
$ sudo apt-get install uuid-dev

APF build config

Buildroot

$ make menuconfig

APF51:

Target filesystem options  --->
[*] ubifs root filesystem
(0x1f800) UBI logical erase block size
(0x800) UBI minimum I/O size
(2047) Maximum LEB count
ubifs runtime compression (lzo) --->
Compression method (no compression) --->
[*] UBI image
(0x20000) UBI physical erase block size
(512) UBI sub-page size

APF27:

Target filesystem options  --->
[*] ubifs root filesystem
(0x20000) UBI physical erase block size
(0x1f800) UBI logical erase block size
(0x800) UBI minimum I/O size
(512) UBI sub-page size
(2047) Maximum LEB count
$ make

Linux

$ make linux-menuconfig
File systems  --->
[*] Miscellaneous filesystems --->
<*> UBIFS file system support and disable debugging !! Device Drivers --->
<*> Memory Technology Device (MTD) support --->
UBI - Unsorted block images --->
<*> Enable UBI
(4096) UBI wear-leveling threshold and disable debugging !!
$ make linux
  • reflash your kernel

U-Boot envt variables

BIOS> setenv bootcmd run ubifsboot
BIOS> setenv download_rootfs tftpboot \${loadaddr} \${serverpath}\${board_name}-rootfs.arm.ubi

Additional informations

A new file 'ubinize.cfg' defining the ubi volumes is located in buildroot/target/ubifs/. This file contains the different UBI volumes of the UBI image:

 [ubifs]
mode=ubi
vol_id=0
vol_type=dynamic
vol_name=rootfs
vol_alignment=1
vol_flags=autoresize

This file is processed by the ubinize utility after mkfs.ubifs.

U-Boot access to UBIFS partitions

U-Boot can read files from the rootfs / UBIFS partition using the commands: uni, ubifsmount, ubifsls, ubifsload. Here is an example applicable to the apf27, apf28 and apf51 boards:

BIOS> ubi part rootfs
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=7"
UBI: MTD device size: 500 MiB
UBI: number of good PEBs: 3988
UBI: number of bad PEBs: 12
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 3988
UBI: number of PEBs reserved for bad PEB handling: 39
UBI: max/mean erase counter: 2/0 BIOS> ubifsmount ubi0:rootfs
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size: 504483840 bytes (492660 KiB, 481 MiB, 3910 LEBs)
UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root: 0 bytes (0 KiB) BIOS> ubifsls /boot
2604048 Thu Oct 03 08:38:56 2013 apf51-linux.bin BIOS> ubifsload 90000000 /boot/apf51-linux.bin
Loading file '/boot/apf51-linux.bin' to addr 0x90000000 with size 2604048 (0x0027bc10)...
Done

Acces to UBIFS files from U-Boot can used to do an update of your system after deployement on site through some U-Boot scripts..

UBIFS的更多相关文章

  1. ubifs概述

    UBIFS无排序区块图像文件系统(Unsorted Block Image File System, UBIFS)是用于固态存储设备上,并与LogFS相互竞争,作为JFFS2的后继文件系统之一.真正开 ...

  2. 嵌入式: jffs2,yaffs2,logfs,ubifs文件系统性能分析

    在嵌入式领域,FLASH是一种常用的存储介质,由于其特殊的硬件结构,所以普通的文件系统如ext2,ext3等都不适合在其上使用,于是就出现了专门针对FLASH的文件系统,比较常用的有jffs2,yaf ...

  3. ubifs核心功能 -- 垃圾回收

    可回收空间的分类 垃圾回收的目的是再利用(回收后的空间大小能写入有效的node),如果再利用的价值越低,其回收的必要性越低.为了进行有效的垃圾回收,UBIFS对可回收空间做了2个层次的水线划分: 死空 ...

  4. ubifs扩展性分析

    文件系统的可扩展性,主要考察flash规模变大时对文件系统性能的影响,主要考察指标有: mount时间 访问时间 检查修复时间 最大文件大小 最大文件系统大小 最大文件个数   mount时间     ...

  5. ubifs核心对象 -- TNC和LPT

              文件系统的核心问题是存储.这里面隐含2个问题:1)存储什么?2)存储到哪里?文件系统中的各种技术手段都是如何高效的解决这2个问题.ubifs用node标准化每一个存储对象,用lpr ...

  6. ubifs性能优化分析

    本文通过分析ubifs的mount.read.write和commit流程,挖掘ubifs背后的设计决策和性能优化手段,并结合自身产品的特点,给出一些读写性能改进方案.   1.     ubifs  ...

  7. ubifs总体设计分析

    1.     设计需求 flash设备区别与一般的块设备,有如下特点: 存在坏块 使用寿命较短 存储介质不稳定 读写速度慢 不支持随机访问(nand) 只能通过擦除将0改成1 最小读写单位为page ...

  8. ubifs物理存储

    Ubifs通过ubi管理MTD设备,ubi的LEB随机映射PEB,其本身占用一部分PEB,具体文件存储情况分析如下. 1. Ubi中不管是是逻辑块号还是物理块号都是从0开始的.一般情况下,Nandfl ...

  9. UBIFS 文件系统分析1 - 磁盘结构【转】

    转自:http://blog.csdn.net/kickxxx/article/details/7109662 版权声明:本文为博主原创文章,未经博主允许不得转载. ubifs磁盘结构 UBIFS文件 ...

  10. android和ubifs

    原文地址: http://opendevkit.com/?e=37 1. ubifs号称性能比yaffs2 好,同时压缩可读写,文件系统image体较小同时可写,相当不错 2. ubifs制作 (1) ...

随机推荐

  1. Homework-09 二维数组动态显示

    思路 主要是把计算的函数由一次跑完全部改成一次一步 主要是把一个3重for循环改为能一步一次的实现 public int nstep(int n){ while((n--)!=0){ //n步长 // ...

  2. 团队项目-任务分解[Alpha0]

    团队项目-任务分解[Alpha0] 标签(空格分隔): 团队博客 适用范围: 本文档 适用对象 团队全体成员 适用时间 alpha阶段第一周计划 10.24-10.28 适用内容 目标.分工.时长估计 ...

  3. eclipse 运行错误:在类XXX中找不到 main 方法, 请将 main 方法定义为: public static void main(String[] args) 否则 JavaFX 应用程序类必须扩展javafx.application.Application

    新建了一个类Hello: 代码: 第一次运行报错: 点击关闭该类的界面时出现: 点击是,然后再次打开,可以正确执行,结果为: 这是为什么....,后来发现了原因:是每次运行或调试前没有自动保存编辑的内 ...

  4. Client does not support authentication protocol requested by server

    关于由于版本号码不同而引起的 Client does not support authentication protocol requested by server 问题 搜索类似的问题,得到的答案类 ...

  5. poj 2151 概率DP(水)

    Check the difficulty of problems Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 5750   ...

  6. FileZilla修改文件大小格式

    之前使用FileZilla觉得很奇怪,文件大小显示为字节格式,很不习惯. 最近发现是在这里修改. 菜单“编辑”下选择设置,选择选项“文件大小格式”,在右边选择为:“使用SI式二进制前缀.(如 1 KB ...

  7. Linux命令 -文件操作类

    声明:本文所涉及到的Linux命令均为最常见的用法,未列举之参数,自行查阅man 1.ls    查看文件与目录 -a 打印全部的文件,包括隐藏文件 -l 列表打印,数据项包括文件属性,大小和权限等 ...

  8. 洛谷 P2155 [SDOI2008]沙拉公主的困惑 解题报告

    P2155 [SDOI2008]沙拉公主的困惑 题目描述 大富翁国因为通货膨胀,以及假钞泛滥,政府决定推出一项新的政策:现有钞票编号范围为\(1\)到\(N\)的阶乘,但是,政府只发行编号与\(M!\ ...

  9. bzoj 3160 万径人踪灭 FFT

    万径人踪灭 Time Limit: 10 Sec  Memory Limit: 256 MBSubmit: 1936  Solved: 1076[Submit][Status][Discuss] De ...

  10. JS实现 java的Map

    Map = function () { this.objects = new Object(); // 加入元素 this.put = function (key, value) { this.obj ...