Ubifs

From Qi-Hardware
Jump to: navigation, search

Contents

[edit] Quick summary

[edit] Overview

 http://www.linux-mtd.infradead.org/doc/ubifs.html

[edit] Make the ubifs filesystem from the rootfs

root# mkfs.ubifs -r /PATH/TO/ROOTFS -m 4096 -e 516096 -c 4095 -o root.ubifs 

[edit] Make ubi image out of the ubifs

root# ubinize -o ubi.img -m 4096 -p 512KiB ubinize.cfg

contents of ubinize.cfg:

[rootfs]
# Volume mode (other option is static)
mode=ubi
# Source image
image=root.ubifs
# Volume ID in UBI image
vol_id=0
# Allow for dynamic resize
vol_type=dynamic
# Volume name
vol_name=rootfs
# Autoresize volume at first mount
vol_flags=autoresize

[edit] Format the NAND with your new image

root# ubiformat /dev/mtd3 -s 512 -f ubi.img

[edit] Attach the image to the UBI subsystem

root# ubiattach /dev/ubi_ctrl -m 3

[edit] Mount the new device

root# mount -t ubifs ubi0:rootfs /mnt/ubi

[edit] Reboot into the new system with ubifs root

QI# setenv bootargs 'mem=32M console=ttyS0,57600n8 ubi.mtd=3 rootfstype=ubifs root=ubi0:rootfs rw rootwait' 
QI# boot
Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export