good idea! Will try that tomorrow! I will post here if that works!

Thanks!

Érico V. Porto


On Wed, Feb 29, 2012 at 2:37 PM, Christian Gagneraud <[email protected]>wrote:

> On 29/02/12 03:24, Érico Porto wrote:
>
>> Hello guys,
>>
>> I have a small question. I've seem some images on the web, that uses the
>> format .jffs2 . Sometimes I just want to know what kind of files are
>> inside them instead of flashing my router all the way...
>>
>> I've found this info on a blog:
>>
>> $ mknod /tmp/mtdblock0 b 31 0
>> $ modprobe mtdblock
>> $ modprobe mtdram total_size=65536 erase_size=256
>> $ modprobe jffs2
>> $ dd if=/pathtoimage/rootfs.jffs2 of=/tmp/mtdblock0
>> $ mkdir /media/jffs2
>> $ mount -t jffs2 /tmp/mtdblock0 /media/jffs2
>>
>> But I really wasn't able to reproduce this. On the last part I'm getting :
>>
>> mount: wrong fs type, bad option, bad superblock on /tmp/mtdblock0,
>>        missing codepage or helper program, or other error
>>        In some cases useful info is found in syslog - try
>>        dmesg | tail  or so
>>
>> My system uses ppc and my computer is x86.
>>
>> dmesg shows:
>>
>> [ 1224.939358] jffs2: Flash size not aligned to erasesize, reducing to
>> 0KiB
>> [ 1224.939364] jffs2: Too few erase blocks (0)
>>
>> Does the mtdblock has to have the exact size of the jffs2 file or it can
>> be bigger? My jffs2 file has 198k (202060 as show by the ls -la command)
>>
>
> Hi,
>
> You should try to get the exat information from your target, try:
> # cat /proc/mtd
> or
> # cat /proc/mtdinfo
>
> From there you will know the exact size of the flash partition that
> contains your rootfs, and the block/erase size as well, then retry the
> "modprobe mtdram total_size=xxxxxx erase_size=xxxx"
>
> Hope this helps.
> Chris
>
>
>
>> Thanks
>>
>> Érico V. Porto
>>
>>
>> ______________________________**_________________
>> openwrt-users mailing list
>> [email protected].**org <[email protected]>
>> https://lists.openwrt.org/**mailman/listinfo/openwrt-users<https://lists.openwrt.org/mailman/listinfo/openwrt-users>
>>
>
>
> --
> Christian Gagneraud,
> Embedded systems engineer.
> Techworks Marine
> 1 Harbour road
> Dun Laoghaire
> Co. Dublin
> Ireland
> Tel: + 353 (0) 1 236 5990
> Web: http://www.techworks.ie/
>
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users

Reply via email to