View Single Post
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#13
So correct way how to mount N900 rootfs on computer using nandsim is:
(this will use ubiformat instead mtdblock and dd as in #3rd post)

1. Load nandsim module (which emulate nand mtd device) with same layout as has N900:
Code:
$ modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15 parts=1,3,2,16,16,2010
2. Load ubi and ubifs modules:
Code:
$ modprobe ubi
$ modprobe ubifs
3. Flash rootfs ubi image to emulated nand mtd device:
Code:
$ ubiformat /dev/mtd5 -s 512 -O 512 -f <rootfs_image>
4. Attach mtd device to ubi:
Code:
$ ubiattach /dev/ubi_ctrl -p /dev/mtd5
5. Mount rootfs volume (ubifs image) from ubi to /mnt/n900:
Code:
$ mkdir -p /mnt/n900
$ mount ubi:rootfs /mnt/n900 -t ubifs
And then rootfs image should be mounted to /mnt/n900

Umounting & cleaning:
Code:
$ umount /mnt/n900
$ ubidetach /dev/ubi_ctrl -d 0
$ rmmod ubifs
$ rmmod ubi
$ rmmod nandsim
 

The Following 6 Users Say Thank You to pali For This Useful Post: