* JFFS2 softlinks problem
@ 2007-05-19 9:55 Jakub Bednar
2007-05-21 10:37 ` MikeW
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jakub Bednar @ 2007-05-19 9:55 UTC (permalink / raw)
To: linux-mtd
Hi everybody, I have a trouble with JFFS2 and softlinks.
I have a device with NOR and NAND flash.
On the NOR flash there are some partitions:
- kernel image
- cramfs initrd image
- JFFS2 rootfs with links into cramfs initrd
image (busybox and so on)
This partiotion is mounted read-only
and is created with flash_erase /dev/mtd3 0x00 48;
mounted with mount -t jffs2 mtd0 /mnt;
and decompresing of rootfs from tarbal to /mnt;
On the NAND flash there are other JFFS2 partitions created with
flash_eraseall -j /dev/mtd4;
If I fill the NAND JFFS2 partition with data several times, the links from
rootfs to cramfs and some folders in tmpfs got broken and lot of things
stop working. After reboot the links are OK again.
How is it possible? Can something got wrong in RAM? Moving erase blocks
can broke links?
Thanks for Your help, really dont know where to start.
Regards Jakub
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: JFFS2 softlinks problem
2007-05-19 9:55 JFFS2 softlinks problem Jakub Bednar
@ 2007-05-21 10:37 ` MikeW
2007-05-21 15:24 ` David Woodhouse
2007-05-23 12:45 ` JFFS2 softlinks problem - repost from email MikeW
2 siblings, 0 replies; 5+ messages in thread
From: MikeW @ 2007-05-21 10:37 UTC (permalink / raw)
To: linux-mtd
Jakub Bednar <bednar <at> hnilux.racom.cz> writes:
>
> If I fill the NAND JFFS2 partition with data several times, the links from
> rootfs to cramfs and some folders in tmpfs got broken and lot of things
> stop working. After reboot the links are OK again.
>
> How is it possible? Can something got wrong in RAM? Moving erase blocks
> can broke links?
>
What do you mean by,
"I fill the NAND JFFS2 partition with data several times ..." ?
I presume the links you refer to are symbolic links (ln -s ...)
You should describe the procedure you use (including setting up the links,
and "filling the partition with data several times") and the problems you
observe, What exactly "stops working" - apart from access to files on the
affected partition(s) ?
Regards,
MikeW
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: JFFS2 softlinks problem
2007-05-19 9:55 JFFS2 softlinks problem Jakub Bednar
2007-05-21 10:37 ` MikeW
@ 2007-05-21 15:24 ` David Woodhouse
2007-05-23 12:45 ` JFFS2 softlinks problem - repost from email MikeW
2 siblings, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2007-05-21 15:24 UTC (permalink / raw)
To: Jakub Bednar; +Cc: linux-mtd
On Sat, 2007-05-19 at 11:55 +0200, Jakub Bednar wrote:
> How is it possible? Can something got wrong in RAM? Moving erase
> blocks can broke links?
Double-check your CPU's fixups for unaligned loads/stores.
--
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: JFFS2 softlinks problem - repost from email
2007-05-19 9:55 JFFS2 softlinks problem Jakub Bednar
2007-05-21 10:37 ` MikeW
2007-05-21 15:24 ` David Woodhouse
@ 2007-05-23 12:45 ` MikeW
2 siblings, 0 replies; 5+ messages in thread
From: MikeW @ 2007-05-23 12:45 UTC (permalink / raw)
To: linux-mtd
Jakub Bednar <bednar <at> hnilux.racom.cz> writes:
>MikeW <mw_phil <at> yahoo.co.uk> writes:
>
> What do you mean by,
> "I fill the NAND JFFS2 partition with data several times ..." ?
>
> I presume the links you refer to are symbolic links (ln -s ...)
>
> You should describe the procedure you use (including setting up the links,
> and "filling the partition with data several times") and the problems you
> observe, What exactly "stops working" - apart from access to files on the
> affected partition(s) ?
>
> Regards,
> MikeW
>
Jakub Bednar <bednar <at> hnilux.racom.cz> writes:
Sorry, I'll try to be more clear.
I have a board based on AMD DBAu1550 boards.
I'm using buildroot from November 2006 with
Linux 2.6.16.20.
The cramfs initrd image is created with mkcramfs and
concatenated with the kernel. At boottime, kernel
finds CRAMFS_MAGIC and creates a mtd partition containing
this image and boots it as first rootfs.
JFFS2 partition is created from desired tree.
In the tree there are soft links e.g. ln -sf /var/log /tmp/log;
The tree is then compressed
build machine: tar -zcf pkg.tgz tree/*
build machine: cat pkg.tgz | ssh target_machine "cat - > /tmp/pkg.tgz"
(tmpfs)
target machine: flash_erase mtd0 0x00 48;
target machine: mount -t jffs2 /dev/mtd0 /mnt;
target machine: tar -ztf /tmp/pkg.tgz; #cheks the tarbal ...
target machine: tar -zxf /tmp/pkg.tgz -C /mnt/
There are other checks (sync, remount mtd0 ro ...)
target machine: pivot_root /mnt /mnt/rom
Now the jffs2 become rootfs and /sbin and /bin are soft
links to /rom/sbin and /rom/bin (the initrd).
The system now works OK. It's using some staff from
one of NAND partitions as well without any problems.
Now the test on the NAND flash
target machine: flash_eraseall -j /dev/mtd6
target machine: mount -t jffs2 mtd6 /mnt2
and runing script as follows:
while [ 1 ]; do
cat /dev/urandom > /mnt2/file; # fills up the fs
rm /mnt2/file; #frees it again
done;
(The script using dd with 512kB files causes the same error but it
takes more time) The error sometimes occur in the first loop of
this script after reboot, sometimes later.
After a while many things goes wrong and each time goes wrong something
else.
1. cd /root/.ssh (which is in jffs2 NOR flash)
return Input/Output Error
2. disappears /var/log (which is a soft link in jffs2 NOR flash
created with ln -s into /tmp - tmpfs )
3. disappear all links from /usr/sbin (cramfs initrd image)
to /usr/sbin/busybox
The JFFS2 erase block size is set correctly and its using priority
compression. I know I'm not using the newest JFFS2 and I'm ready
to work on Linux 2.6.20 to put it into buildroot and hopefully it
will solve my trouble. But If You know what causes this problem and
how to fix it. Or if You know that in 2.6.20 it will do the same.
It will be really helpful to me.
Thank You very mych.
Regards,
Jakub
^ permalink raw reply [flat|nested] 5+ messages in thread
* JFFS2 softlinks problem
@ 2007-05-18 10:44 Bednář Jakub
0 siblings, 0 replies; 5+ messages in thread
From: Bednář Jakub @ 2007-05-18 10:44 UTC (permalink / raw)
To: linux-mtd
Hi everybody, I have a trouble wit JFFS2
I have a device with NOR and NAND flash.
On the NOR flash there are some partitions:
- kernel image
- cramfs initrd image
- JFFS2 rootfs with links into cramfs initrd
image (busybox and so on)
This partiotion is mounted read only
and is created with flash_erase mtd3 0x00 48; and
decompresing of rootfs from tarbal
On the NAND flash there are other JFFS2 partitions created with
flash_eraseall -j mtd4;
If I fill the NAND JFFS2 partition with data several times, the links from
rootfs to cramfs and some folders in tmpfs got broken and lot of things
stops working. After reboot the links are OK again.
How is it possible? Can something got wrong in RAM? Moving erase blocks
can broke links?
Thanks for Your help, really dont know where to start.
Regards Jakub
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-23 12:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-19 9:55 JFFS2 softlinks problem Jakub Bednar
2007-05-21 10:37 ` MikeW
2007-05-21 15:24 ` David Woodhouse
2007-05-23 12:45 ` JFFS2 softlinks problem - repost from email MikeW
-- strict thread matches above, loose matches on Subject: below --
2007-05-18 10:44 JFFS2 softlinks problem Bednář Jakub
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).