![]() |
Editing n900 rootfs image
How to mount or edit rootfs.jffs2 file?
Already tried via nandsim and mtdram - no luck. I can't mount ubifs filesystem. Wiki entry have only information about jffs2 and not ubifs. |
Re: Editing n900's rootfs.jffs2
Well in theory you need recent kernel that supports ubifs and recent mtd-utils and follow stuff here
http://www.linux-mtd.infradead.org/d...tml#L_usptools http://www.linux-mtd.infradead.org/doc/ubifs.html I was trying to mount it too but didn't manage yet. Was also thinking that easier might be to simply flash it to NAND in my beagleboard and mount it there. But there shouldn't be problem with mtdram, just create mtdram device, use ubi tools to create/attach ubi volume and 'flash' image to it. |
Re: Editing n900's rootfs.jffs2
Here one solution to mount it:
Code:
# modprobe mtdblockCode:
# mkfs.ubifs -m 2048 -e 129024 -c 2047 -r /mnt/n900/ rootfs_ubifs.jffs2Somebody please test this and add to wiki. |
Re: Editing n900's rootfs.jffs2
Quote:
Can anyone confirm the true filesystem type of the rootfs.jffs2 file, and possibly a working How To for mounting the image? |
Re: Editing n900's rootfs.jffs2
Quote:
i can't mount rootfs.jffs2 all commands works perfectly excepts when i run Code:
modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15[code] crw------- 1 root root 90, 0 Oct 9 17:34 /dev/mtd0 crw------- 1 root root 90, 1 Oct 9 17:34 /dev/mtd0ro brw-rw---- 1 root disk 31, 0 Oct 9 17:34 /dev/mtdblock0 [code] Then i run Code:
ubiattach /dev/ubi_ctrl -m 0Code:
ubiattach: error!: cannot attach mtd0 |
Re: Editing n900's rootfs.jffs2
What is your result to:
Code:
cat /proc/mtdI suspect your mtd0 is taken |
Re: Editing n900's rootfs.jffs2
cat /proc/mtd
Code:
dev: size erasesize name |
Re: Editing n900's rootfs.jffs2
when using this command
Code:
dd if=rootfs.jffs2 of=/dev/mtdblock0 bs=2048Code:
dd if=rootfs.jffs2 of=/dev/mtdblock0 bs=2048many thanks ] |
Re: Editing n900's rootfs.jffs2
put the full path to rootfs.jffs2
The above instructions only work for me on ubuntu 10.04 32bit. In openSUSE don't work |
Re: Editing n900's rootfs.jffs2
Technically, they should work on all OSs assuming there's MTD block support in the kernel (afaik ubuntu got that in 10.04)
|
Re: Editing n900's rootfs.jffs2
writing to mtd with dd is prone to fail, as dd doesn't know about bad block management in mtd, and mtd is a *raw* device where you eventually will run into an occasional bad block.
There are tools that are specifically built to deal with bad blocks on mtd, e.g mtd_debug is one of them I'd assume, available in fremantle. /j |
Re: Editing n900's rootfs.jffs2
Correct way how to erase/flash rootfs partition (on which is ubi) is to use ubiformat utility.
Before using ubiformat utility, first any mounted ubifs volume must be umounted and ubi device deattached from mtd partition. Code:
$ umount ubi:rootfsCode:
$ ubiformat /dev/<mtd_rootfs>Code:
$ ubiformat /dev/<mtd_rootfs> -s 512 -O 512 -f <image.ubi>Code:
$ ubiattach /dev/ubi_ctrl -p /dev/<mtd_rootfs>Code:
$ mount ubi:rootfs </mountpoint> -t ubifs |
Re: Editing n900's rootfs.jffs2
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,2010Code:
$ modprobe ubiCode:
$ ubiformat /dev/mtd5 -s 512 -O 512 -f <rootfs_image>Code:
$ ubiattach /dev/ubi_ctrl -p /dev/mtd5Code:
$ mkdir -p /mnt/n900Umounting & cleaning: Code:
$ umount /mnt/n900 |
| All times are GMT. The time now is 11:08. |
vBulletin® Version 3.8.8