CONFIDENTIAL
DOC-USR-0014-03
___________________________________________________________________________________________
Z3 Technology, LLC
♦
100 N 8
th
ST, STE 250
♦
Lincoln, NE 68508-1369 U.S.A.
♦
+1.402.323.0702
16
UBIFS
Follow this procedure to flash the development NFS root filesystem onto the target NAND using the UBIFS
filesystem format:
(1)
Boot the board from NFS in U-Boot:
Z3-DM8168-MOD# run boot-nfs
(2)
Erase partition
flash_eraseall /dev/mtd3 # Run this the first time
OR
ubiformat /dev/mtd3 # Run this to preserve wear-leveling data
(3)
Attach UBI device
Ubiattach /dev/ubi_ctrl -m 3 -O 2048
(4)
Create UBI volume named 'rootfs' on device ubi0
ubimkvol /dev/ubi0 -N rootfs -s 128MiB
(5)
Mount clean copy of NFS root filesystem
mkdir /tmp/mynfsmnt
mount -o nolock 192.168.0.6:/home/z3/z3-netra/filesys/fs /tmp/mynfsmnt
(6)
Mount UBIFS on empty filesystem
mkdir /mnt/ubifs
mount -t ubifs ubi0:rootfs /mnt/ubifs
(7)
Copy all files from clean NFS mount to UBIFS
cp -a /tmp/mynfsmnt/* /mnt/ubifs/.
(8)
Unmount filesystems
umount /mnt/ubifs
umount /tmp/mynfsmnt
Reboot the board and stop at the u-boot prompt. In U-Boot then enter the commands:
Z3-DM8168-MOD# setenv bootcmd run nand_boot_ubifs
Z3-DM8168-MOD# saveenv