ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] jffs2 file size suddenly doubled


From: Stuart Hughes
Subject: Re: [Ltib] jffs2 file size suddenly doubled
Date: Wed, 09 Jun 2010 18:45:46 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Todd,

Glad you found it and happy to help.

Regards, Stuart

address@hidden wrote:
> It turns out a "friend" nfs mounted my machine and added a couple large
> files.  I told LTIB to leave the staging area and found the problem
> looking at rootfs.tmp.
> 
> I appreciate your help.  I used to work in the IC design group at
> Thomson.  We had multiple tools that cost multiple $100,000 each. Your
> LTIB support is better than the support for any of those tools.
> 
> ----- Original Message -----
> From: "Stuart Hughes" <address@hidden>
> To: address@hidden
> Cc: "ltib" <address@hidden>
> Sent: Tuesday, June 8, 2010 6:20:20 AM GMT -05:00 US/Canada Eastern
> Subject: Re: [Ltib] jffs2 file size suddenly doubled
> 
> Answering my own question.  I did a bit more digging.  I realised that
> for the mpc5200, which is big endian, I need to first convert to little
> endian.  Here's the steps I used (for an mpc5200 jffs2 image) on a
> Debian Lenny box.  You may need slight adjustments for your distro.
> This is adapted from the Maemo instructions:
> 
> 1. As your normal user, convert the big endian jffs2 image to little endian:
> 
> /opt/ltib/usr/bin/jffs2dump -b -e rootfs.jffs2.le rootfs.jffs2
> 
> 2. Become root and then associate the loopback device with the image you
> just converted.
> 
> losetup /dev/loop0 rootfs.jffs2.le
> 
> 3. Load the mtd modules
> 
> modprobe mtdblock
> modprobe block2mtd
> modprobe jffs2
> 
> 4. Set the right erase block size, for the mpc5200 256 KB (note after
> this, you can run "cat /proc/mtd" to check the sizes look right)
> 
> echo "/dev/loop0,256KiB" > /sys/module/block2mtd/parameters/block2mtd
> 
> 5. Make a mount point (as needed)
> 
> mkdir /mnt/jffs2
> 
> 6. mount the jffs2 filesystem
> 
> mount -t jffs2 /dev/mtdblock0 /mnt/jffs2
> 
> 
> You can then examine this: (e.g. du /mnt/jffs2 | sort -n)
> 
> When you're done:
> 
> umount /mnt/jffs2/
> rmmod jffs2 block2mtd mtdblock
> losetup -d /dev/loop0
> 
> 
> Regards, Stuart
> 
> Stuart Hughes wrote:
>> Hi Todd,
>>
>> I'm not sure why your jffs2 has grown.  It should be possible to mount
>> your jffs2 on your host machine by following:
>>
>> https://wiki.maemo.org/Advanced_booting
>>
>> However, when I tried I end up with:
>> # mount -t jffs2 -o ro /dev/mtdblock0 /tmp/jffs2
>> mount: /dev/mtdblock0: can't read superblock
>>
>> and looking /var/log/messages, I see: "You cannot use older JFFS2
>> filesystems with newer kernels"
>>
>> So on my machine at least, I'm not able to do this.  Maybe someone else
>> knows a better way? or it may work on your box.
>>
>> There is also /opt/ltib/usr/bin/jffs2dump, but this seems to only output
>> raw data (block info).
>>
>> If you have the old/new BSPs around, you  could look/compare the size of
>> the staging area used to make the rootfs for the jffs2 (you need to
>> select Target Image Generation / Options / Keep temporary staging
>> directory in ./ltib -m config).  This is probably your best option.
>>
>> Another thought is that if you have enough RAM, you may be able to boot
>> your target NFS and then copy in your jffs2 image to a mtdram device,
>> and then mount it (you'd need to google for details, I've not tried).
>>
>> Good luck and if anyone else has any ideas about this, I'd be interested
>> too.
>>
>> NOTE:  the message about "You cannot use older JFFS2 filesystems with
>> newer kernels" worries me, if true, it looks like I should update
>> /opt/ltib/..../mtd-utils.  This is a PITA as I suspect it will break
>> backward compatibility (worse, probably the older kernels would be able
>> to mount jffs2 generated with a newer tool?).  Does anyone have any
>> insight into the change and the implications?
>>
>> Regards, Stuart
>>
>> address@hidden wrote:
>>> My jffs2 file size went from 14mB to 25mB.  OK, so I'm playing with
>>> settings so I tried to figure out what I did to make it increase so
>>> much.  I finally ran my old original LTIB in an old virtual machine to
>>> compare.  Without making any changes to the old environment, the jffs2
>>> file size also increased from about 14mB to 25mB.  So it seems that the
>>> thing that changed was maybe data downloaded from the GPP, (maybe.)
>>>
>>> So now I have a copy of my old 14mB jffs2 file and the new 25mB jffs2
>>> file.  The question is: How can I compare these to files to see what the
>>> difference is?  I can't boot the new 25mB file because I only have a
>>> 16mB flash.  Can I somehow mount a jffs2 file in Ubuntu even though it's
>>> a file and not in a flash.  Is there some other way I can look into the
>>> jffs2 files?  Does anybody know why my file size doubled without
>>> changing any settings?
>>>
>>> My original LTIB version is: 6.4.1
>>> My current LTIB version is: ltib 10.1.1 ($Revision: 1.62 $)
>>> Target: MPC5200
>>>
>>> Thanks!
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LTIB home page: http://ltib.org
> 
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib



reply via email to

[Prev in Thread] Current Thread [Next in Thread]