2009年12月8日 星期二

ubi filesystem on NAND

#ubinfo /dev/ubi0
Volumes count: 0
Logical eraseblock size: 1032192 bytes, 1008.0 KiB
Total amount of logical eraseblocks: 16336 (16861888512 bytes, 15.7 GiB)
Amount of available logical eraseblocks: 16169 (16689512448 bytes, 15.5 GiB)
Maximum count of volumes 128
Count of bad physical eraseblocks: 18
Count of reserved physical eraseblocks: 163
Current maximum erase counter value: 2
Minimum input/output unit size: 8192 bytes
Character device major/minor: 253:0
#sudo ubimkvol /dev/ubi0 -S 16169 -N ROOTFS
#mkfs.ubifs /dev/ubi0_0
#mkdir /tmp/ubi
#mount -t ubifs ubi0_0 /tmp/ubi
#mkdir /tmp/mmc
#mount -t ext3 /dev/mmcblk0p1 /tmp/mmc
#cd mmc/
#(tar -cf - * | tar -C ../ubi/ -xf -) &

//Booting from UBI
Setting u-boot parameters
setenv bootargs_root root=ubi0:ROOTFS rootfstype=ubifs

setenv tftpbootcmd 'tftpboot 0x2000000 ${image_name}; setenv bootargs pm_disable ${console} ${bootargs_root} usb0Mode=${usb0Mode} usb1Mode=${usb1Mode} video=dovefb:lcd0:${lcd0_params},lcd1:${lcd1_params} clcd.lcd0_enable=${lcd0_enable} clcd.lcd1_enable=${lcd1_enable} mtdparts=spi0.0:512k(uboot)ro,128k(uboot_env),3072k(kernel) ubi.mtd=Root;bootm 0x2000000'


沒有留言:

張貼留言