转: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. Thread sleep()休眠

    Thread sleep()休眠就是让线程进入休眠状态TIMED_WAITING,sleep("毫秒数"),当休眠时间到了之后继续线程.当然也可以用中断线程interrupt()来 ...

  2. POJ A-Wireless Network

    http://poj.org/problem?id=2236 An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated ...

  3. css控制文字模糊

    *{ color: transparent; text-shadow: #111 0 0 5px; }

  4. MIFARE Classic S50技术详解

    Mifare Classic 简介 MIFARE Classic是恩智浦半导体开发的可用于非接触式智能卡,符合ISO/IEC 14443 A类标准.用于公共交通票证等应用,还可用于各类其他应用有S20 ...

  5. StringBuilder_学习笔记

    参考:https://www.jianshu.com/p/160c9be0b132 连接符号 "+" 本质 字符串变量(非final修饰)通过 "+" 进行拼接 ...

  6. 【bzoj2079】[Poi2010]Guilds 构造结论题

    题目描述 Zy皇帝面临一个严峻的问题,两个互相抵触的贸易团体,YYD工会和FSR工会,他们在同一时间请求在王国各个城市开办自己的办事处.这里有n个城市,其中有一些以双向马路相连,这两个工会要求每个城市 ...

  7. Android React Native组件的生命周期及回调函数

    熟悉android的童鞋应该都清楚,android是有生命周期的,其很多组件也是有生命周期.今天小编和大家分享的React Native组件的生命周期,还不了解的童鞋,赶紧来围观吧 在android开 ...

  8. js 数组遍历

    map.filter.forEach.every.some http://www.runoob.com/jsref/jsref-obj-array.html 1.在字符串中使用 map 在一个Stri ...

  9. angular组件--tips提示功能

    将组件封装起来在项目中开发很实用,之前遭遇过一次痛苦的经历,那阵子改的要吐血了.常用的组件封装起来,改公共的地方,往往多处受用. 例如:我在项目中引用  tips.text('加载中...',fals ...

  10. 获得NOTEPAD++ Download Manager的所有下载列表的内容的au3脚本

    ;~ 获得NOTEPAD++ Download Manager的所有下载列表的内容的au3脚本 ;~ 作者: 鹏程万里 ;~ Email:aprial@163.com ;~ 创建日期: 2014年11 ...