[U-Boot-Users] jffs2 view u-boot/linux

Jonas Dietsche maillist at fsforth.de
Mon May 30 13:43:31 CEST 2005


Jonas Dietsche wrote on 05/17/05 10:39:
> Hi all,
> 
> I'm wondering why linux and u-boot are seeing different files when I use 
> a jjfs2 image on my nand flash.
> 
> This is what I've done.
> I partitioned my nand flash with 3 partitions (u-boot, jffs2, user)
> Then I flashed the jffs2 image with nand write.jffs2
> booted the uImage from my jffs2 with fsload
> That all worked fine (although fsload is extreamly slow) and I can use 
> my linux.
> Then I created a new file in my root. A "ls" from linux displays that 
> file. With a "ls" from u-boot the file is not visible...
> So what went wrong?
> Who is cheating on me?
> 

Some additional info:
I use the mtd stuff from mtd-snapshot-20050524.tar.bz2 with a 2.6.11 
kernel. I executed patchkernel.sh from the mtd package.
I created a jffs2 image with
mkfs.jffs2 -e  16384 -qnd my_rootfs -o jffs2.img
Then I flashed the image with nand write.jffs2 (or from linux with 
nandwrite).
A "ls" shows me the contents of the image as expected.
Scanning JFFS2 FS: .. done.
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 bin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 dev
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 etc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 initrd
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 lib
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 mnt
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 nfs
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 proc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 ram
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 sbin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 sys
  lrwxrwxrwx        4 Mon May 30 10:09:25 2005 tmp ->
  -rw-r--r--  1330220 Mon May 30 10:09:24 2005 uImage
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 usr
  lrwxrwxrwx        4 Mon May 30 10:09:25 2005 var ->
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 www

Then I boot linux and mount my jffs2 partiton. I deleted the uImage from 
  it. A "ls" from linux shows me that it is deleted.
Then I rebooted and did a "ls" from u-boot.
Scanning JFFS2 FS: .. done.
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 bin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 dev
  drwxr-xr-x        0 Thu Aug 26 08:34:34 2004 etc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 initrd
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 lib
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 mnt
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 nfs
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 proc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 ram
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 sbin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 sys
  lrwxrwxrwx        4 Mon May 30 10:09:25 2005 tmp ->
  -rw-r--r--  1330220 Mon May 30 10:09:24 2005 uImage
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 usr
  lrwxrwxrwx        4 Mon May 30 10:09:25 2005 var ->
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 www
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 bin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 dev
  drwxr-xr-x        0 Thu Aug 26 08:34:34 2004 etc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 initrd
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 lib

The uImage is still there. And "bin, dev, etc, initrd, lib" are listed 
twice.
Then I deleted the "www directory" and the ls of u-boot gives me
Scanning JFFS2 FS: ... done.
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 bin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 dev
  drwxr-xr-x        0 Thu Aug 26 08:34:34 2004 etc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 initrd
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 lib
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 mnt
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 nfs
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 proc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 ram
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 sbin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 sys
  lrwxrwxrwx        4 Mon May 30 10:09:25 2005 tmp ->
  -rw-r--r--  1330220 Mon May 30 10:09:24 2005 uImage
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 usr
  lrwxrwxrwx        4 Mon May 30 10:09:25 2005 var ->
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 www
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 bin
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 dev
  drwxr-xr-x        0 Thu Aug 26 08:34:34 2004 etc
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 initrd
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 lib
  drwxr-xr-x        0 Mon May 30 10:09:25 2005 usr
  lrwxrwxrwx        4 Mon May 30 10:09:25 2005 var ->

"bin, dev, etc, initrd, lib, usr var" are listed twice.

What I'm doing wrong?

Jonas





More information about the U-Boot mailing list