Difference between revisions of "UBIFS"

From ArmadeusWiki
Jump to: navigation, search
(Buildroot)
Line 1: Line 1:
 +
{{Note|UBIFS is now the default rootfs filesystem used on [[APF27]] & [[APF51]] boards, so this page should only be considered as reference for these boards. Work is still ongoing for [[APF9328]] though.}}
 +
 
This is a preliminary page dealing with the installation of UBIFS on the APF boards.  
 
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, [http://www.linux-mtd.infradead.org/doc/ubifs.html#L_scalability see UBISFS scalability].
+
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, [http://www.linux-mtd.infradead.org/doc/ubifs.html#L_scalability see UBIFS scalability].
  
 
For the time being, this procedure can only be used with the [[APF27]] board. Volunteers are welcome to investigate solutions to use UBIFS on the [[APF9328]].
 
For the time being, this procedure can only be used with the [[APF27]] board. Volunteers are welcome to investigate solutions to use UBIFS on the [[APF9328]].
Line 20: Line 22:
 
APF51:
 
APF51:
 
<pre class="config">
 
<pre class="config">
???
+
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
 
</pre>
 
</pre>
 +
 
APF27:
 
APF27:
 
<pre class="config">
 
<pre class="config">

Revision as of 17:02, 27 May 2011

Note Note: UBIFS is now the default rootfs filesystem used on APF27 & APF51 boards, so this page should only be considered as reference for these boards. Work is still ongoing for APF9328 though.


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.

For the time being, this procedure can only be used with the APF27 board. Volunteers are welcome to investigate solutions to use UBIFS on the APF9328.

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

APF9328:

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

Linux

$ make linux26-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 linux26
  • 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.