[mtd] 우분투에서 jffs2 이미지 마운트하기

방법이 예전하고 많이 바뀌었다.

(커널이 변경 되어서 그런건지... 휠 더 귀찮게 됐구만...)

 

How to mount a jffs2 image on ubuntu…

Install prerequisite packages:

sudo apt-get install mtd-tools

Load kernel modules (note that you can adjust the size of the mtd device while loading mtdram):

sudo modprobe mtd
sudo modprobe jffs2
sudo modprobe mtdram total_size=16384 erase_size=512
sudo modprobe mtdchar (이건 없는거 같다.)
sudo modprobe mtdblock

Load jffs2 image into mtd block device:

sudo dd if=firmware.jffs2 of=/dev/mtd0
(firmware.jffs2 : 마운트할 이미지이름)

You are now ready to mount the image:

sudo mkdir /mnt/image
sudo mount -t jffs2 /dev/mtdblock0 /mnt/image