public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* trouble compiling mkfs.jffs2
@ 2001-09-14 18:20 James Schettine
  2001-09-15 19:12 ` Jörn Engel
  0 siblings, 1 reply; 13+ messages in thread
From: James Schettine @ 2001-09-14 18:20 UTC (permalink / raw)
  To: linux-mtd

JFFS2 is working great on my embedded arm processor.
(Great work everybody!)

I have started out with a pre-built root image I grabbed 
from others working on handhelds, and they have set
the erase block size to 0x40000 and mine needs to be
0x20000.  Question #1...  does this only affect the
overhead/optimal use or will I actually run into problems
if I run this over a long period.

In order to re-flash my embedded root filesystem with 
the correct erase block size, I have transferred all files 
to my desktop system (an older Debian 2.2) and read up 
on using mkfs.jffs2.  I couldn't find a pre-compiled binary 
in a quick and lazy search so I grabbed the cvs tree, 
cd util, and make mkfs.jffs2.  (did the configure thing too,
but that didn't fix this problem.)

I'm getting problems with size_t undefined in linux/string.h
(I can't believe it doesn't include what it needs !), and 
patching around that I get conflicts between linux/string.h 
and asm/string.h

Then it struck me that as a user-land utility application,
we shouldn't need to get TOO intimate with the kernel.
After all, I am cross-building my filesystem.  The more
you ask about the host kernel, the more wrong you'll
be when you get to the target kernel.

Has anyone else had these troubles/got a work-around.
It's not a good time to be upgrading this particular 
system right now.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: trouble compiling mkfs.jffs2
  2001-09-14 18:20 trouble compiling mkfs.jffs2 James Schettine
@ 2001-09-15 19:12 ` Jörn Engel
  2001-09-17 13:06   ` Re(2): " James Schettine
  2001-09-17 18:16   ` jffs vs. jffs2 & new code Jörn Engel
  0 siblings, 2 replies; 13+ messages in thread
From: Jörn Engel @ 2001-09-15 19:12 UTC (permalink / raw)
  To: James Schettine; +Cc: linux-mtd

Hi!

> In order to re-flash my embedded root filesystem with 
> the correct erase block size, I have transferred all files 
> to my desktop system (an older Debian 2.2) and read up 
> on using mkfs.jffs2.  I couldn't find a pre-compiled binary 
> in a quick and lazy search so I grabbed the cvs tree, 
> cd util, and make mkfs.jffs2.  (did the configure thing too,
> but that didn't fix this problem.)
>
> [more error descriptions]

Just a wild guess, but Debian 2.2 (aka Potato) is based on the 2.2
Kernel series. This also effects a bunch of files in the /usr/include
tree and might be the cause of your problems.
You could update your Debian system to testing/Woody or simply
temporarily symlink /usr/include/linux to /usr/src/linux/include - if
that one belongs to a current kernel version.

Jörn

-- 
Every good work of software starts by 
scratching a developer's personal itch.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re(2): trouble compiling mkfs.jffs2
  2001-09-15 19:12 ` Jörn Engel
@ 2001-09-17 13:06   ` James Schettine
  2001-09-17 13:51     ` David Woodhouse
  2001-09-17 18:16   ` jffs vs. jffs2 & new code Jörn Engel
  1 sibling, 1 reply; 13+ messages in thread
From: James Schettine @ 2001-09-17 13:06 UTC (permalink / raw)
  To: joern; +Cc: linux-mtd

joern@wohnheim.fh-wedel.de writes:
>Just a wild guess, but Debian 2.2 (aka Potato) is based on the 2.2
>Kernel series. This also effects a bunch of files in the /usr/include
>tree and might be the cause of your problems.
>You could update your Debian system to testing/Woody or simply
>temporarily symlink /usr/include/linux to /usr/src/linux/include - if
>that one belongs to a current kernel version.

Thanks...  I got it to compile (v1.15), but when I run it 
it creates a file size == one erase block.

A quick web search led me to :
ftp://ftp.uk.linux.org/pub/people/dwmw2/iPAQ/mkfs.jffs2.1.8
running it --version sez 1.7 and it creates the whole 5 meg
but my kernel complains bitterly that the fs is too old.

If I could grab a binary somewhere I could move on.
If no-one can point me to a binary, I guess I'll
be debugging this app on a 2.2 kernel.
(my boss threatens to "just go back to WinCE"!)

Thanks  J

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 13:06   ` Re(2): " James Schettine
@ 2001-09-17 13:51     ` David Woodhouse
  2001-09-17 14:48       ` Joakim Tjernlund
  0 siblings, 1 reply; 13+ messages in thread
From: David Woodhouse @ 2001-09-17 13:51 UTC (permalink / raw)
  To: James Schettine; +Cc: joern, linux-mtd


james@telos-systems.com said:
>  Thanks...  I got it to compile (v1.15), but when I run it  it creates
> a file size == one erase block.

1.15 was doing naughty things when given a relative rootdir, and just 
segfaulting when the rootdir wasn't specified.  1.16 should fix it.

ftp.uk.linux.org:/pub/people/dwmw2/jffs2/mkfs.jffs2-1.16

--
dwmw2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 13:51     ` David Woodhouse
@ 2001-09-17 14:48       ` Joakim Tjernlund
  2001-09-17 14:53         ` David Woodhouse
  0 siblings, 1 reply; 13+ messages in thread
From: Joakim Tjernlund @ 2001-09-17 14:48 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

Hi

When mounting a mkfs.jffs2 made jffs2 image, I get:
root@board8:~# mount /dev/mtdblock4 /jffs2/
Child dir "." (ino #1) of dir ino #1 appears to be a hard link
root@board8:~# cd /jffs2/                                     
root@board8:/jffs2# ls -l
total 4
drwxr-xr-x    2 root     root            0 Sep 14 09:05 ./
drwxr-xr-x    2 root     root            0 Sep 14 09:05 ./
drwxrwxrwx   17 root     root         4096 Sep 11 09:53 ../
drwxr-xr-x    1 root     root            0 Sep 11 09:38 bin/
drwxr-xr-x    1 root     root            0 Sep  4 08:55 boot/
drwxr-xr-x    1 root     root            0 Sep 14 09:33 dev/
drwxr-xr-x    1 root     root            0 Sep 11 09:49 etc/
-rw-r--r--    1 root     root            0 Sep  4 13:38 fastboot
drwxr-xr-x    1 root     root            0 Sep  4 08:57 home/
drwxr-xr-x    1 root     root            0 Jul 10 07:04 lib/
drwxr-xr-x    1 root     root            0 May 23 19:49 mnt/
drwxr-xr-x    1 root     root            0 May 23 19:49 opt/
drwxr-xr-x    1 root     root            0 Sep  4 08:52 proc/
drwsr--r--    1 root     root            0 Sep 17 12:36 root/
drwxr-xr-x    1 root     root            0 Sep  4 11:57 sbin/
drwxrwxrwt    1 root     root            0 Aug 29 07:19 tmp/
drwxr-xr-x    1 root     root            0 Sep  4 10:28 usr/
drwxr-xr-x    1 root     root            0 Jun  8 17:29 var/

This is with mkfs.jffs2 v1.16

I am not sure what I was running before I upgraded to v1.16, but it could 
have been as old as v1.11

This FS is created from MV 2.0 by doing(on Host, Redhat 7.1):
cp -a /opt/hardhat/.../target /root/target
<rm /root/target a lot of unnedded files>
mkfs.jffs2 -b -e 0x40000 -o rootfs -d /root/target

On target(custom PPC 860):
eraseall /dev/mtd4
cp rootfs /dev/mtdblock4




   Joakim
> 
> 
> james@telos-systems.com said:
> >  Thanks...  I got it to compile (v1.15), but when I run it  it creates
> > a file size == one erase block.
> 
> 1.15 was doing naughty things when given a relative rootdir, and just 
> segfaulting when the rootdir wasn't specified.  1.16 should fix it.
> 
> ftp.uk.linux.org:/pub/people/dwmw2/jffs2/mkfs.jffs2-1.16
> 
> --
> dwmw2
> 
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 14:48       ` Joakim Tjernlund
@ 2001-09-17 14:53         ` David Woodhouse
  2001-09-17 15:17           ` Joakim Tjernlund
  2001-09-17 18:57           ` Erik Andersen
  0 siblings, 2 replies; 13+ messages in thread
From: David Woodhouse @ 2001-09-17 14:53 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: linux-mtd, Erik Andersen

joakim.tjernlund@lumentis.se said:
> When mounting a mkfs.jffs2 made jffs2 image, I get:
> root@board8:~# mount /dev/mtdblock4 /jffs2/
> Child dir "." (ino #1) of dir ino #1 appears to be a hard link
> root@board8:~# cd /jffs2/                                     
> root@board8:/jffs2# ls -l
> total 4
> drwxr-xr-x    2 root     root            0 Sep 14 09:05 ./
> drwxr-xr-x    2 root     root            0 Sep 14 09:05 ./
> drwxrwxrwx   17 root     root         4096 Sep 11 09:53 ../

Interesting. I recommend you poke Erik with a sharp stick :) 

What args did you use to create the filesystem, and does it still do it 
with v1.15 (before I changed some stuff)?

--
dwmw2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Re(2): trouble compiling mkfs.jffs2
@ 2001-09-17 15:00 Jonas Holmberg
  2001-09-17 15:06 ` David Woodhouse
  0 siblings, 1 reply; 13+ messages in thread
From: Jonas Holmberg @ 2001-09-17 15:00 UTC (permalink / raw)
  To: 'David Woodhouse'; +Cc: linux-mtd

BTW: shouldn't mkfs.jffs2 be in the kernel source like mkcramfs?

/Jonas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 15:00 Re(2): trouble compiling mkfs.jffs2 Jonas Holmberg
@ 2001-09-17 15:06 ` David Woodhouse
  0 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2001-09-17 15:06 UTC (permalink / raw)
  To: Jonas Holmberg; +Cc: linux-mtd

jonas.holmberg@axis.com said:
> BTW: shouldn't mkfs.jffs2 be in the kernel source like mkcramfs? 

Possibly. 

Whatever happens, we should probably deprecate the non-zlib compression
methods except for rtime, which can be implmented purely in mkfs.jffs2.c 
rather than mucking about with sharing files between the kernel and 
userspace code.

--
dwmw2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 14:53         ` David Woodhouse
@ 2001-09-17 15:17           ` Joakim Tjernlund
  2001-09-17 15:20             ` David Woodhouse
  2001-09-17 18:57           ` Erik Andersen
  1 sibling, 1 reply; 13+ messages in thread
From: Joakim Tjernlund @ 2001-09-17 15:17 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd, Erik Andersen

> 
> Interesting. I recommend you poke Erik with a sharp stick :) 
:-)
> 
> What args did you use to create the filesystem, and does it still do it 
> with v1.15 (before I changed some stuff)?
args? What more do you want, than what I included last in my previous mail?

v1.15 has the same problem.

  Jocke
> 
> --
> dwmw2
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 15:17           ` Joakim Tjernlund
@ 2001-09-17 15:20             ` David Woodhouse
  2001-09-17 15:24               ` Joakim Tjernlund
  0 siblings, 1 reply; 13+ messages in thread
From: David Woodhouse @ 2001-09-17 15:20 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: linux-mtd, Erik Andersen

joakim.tjernlund@lumentis.se said:
> args? What more do you want, than what I included last in my previous
> mail? 

Er, I want you to put them near the top of the mail, of course, so that I 
don't have to be intelligent enough to scroll down and look at them :)

--
dwmw2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 15:20             ` David Woodhouse
@ 2001-09-17 15:24               ` Joakim Tjernlund
  0 siblings, 0 replies; 13+ messages in thread
From: Joakim Tjernlund @ 2001-09-17 15:24 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

> 
> Er, I want you to put them near the top of the mail, of course, so that I 
> don't have to be intelligent enough to scroll down and look at them :)

OK, I try to remember that next time :-)
 
   Jocke

^ permalink raw reply	[flat|nested] 13+ messages in thread

* jffs vs. jffs2 & new code
  2001-09-15 19:12 ` Jörn Engel
  2001-09-17 13:06   ` Re(2): " James Schettine
@ 2001-09-17 18:16   ` Jörn Engel
  1 sibling, 0 replies; 13+ messages in thread
From: Jörn Engel @ 2001-09-17 18:16 UTC (permalink / raw)
  To: linux-mtd

Hi!

I am relatively new to mtd, but already have two questions. Please
give me a hint if they are covered in some faq.

1. jffs is not jffs2, obvious. But what is the difference from a
user-perspective besides the mkfs used?
I created some test partitions and tried both but could not really see
a difference. The platform is a 2.4.2 Kernel with the montavista
patches, additional patches for the hardware - still secret stuff,
sorry - and the current MTD code from cvs.

2. After examining the availlable partition table parsers, I was not
very happy with the choices and wrote my own, along with a userspace
tool for partition table creation. This still needs a couple of days
for testing and code cleanup, before it is ready for the wild, but at
least my employer allows me to send the code to you.
How, when, where, [...] can I do it?

Regards, Joern

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Re(2): trouble compiling mkfs.jffs2
  2001-09-17 14:53         ` David Woodhouse
  2001-09-17 15:17           ` Joakim Tjernlund
@ 2001-09-17 18:57           ` Erik Andersen
  1 sibling, 0 replies; 13+ messages in thread
From: Erik Andersen @ 2001-09-17 18:57 UTC (permalink / raw)
  To: David Woodhouse; +Cc: joakim.tjernlund, linux-mtd

On Mon Sep 17, 2001 at 03:53:44PM +0100, David Woodhouse wrote:
> 
> joakim.tjernlund@lumentis.se said:
> > When mounting a mkfs.jffs2 made jffs2 image, I get:
> > root@board8:~# mount /dev/mtdblock4 /jffs2/
> > Child dir "." (ino #1) of dir ino #1 appears to be a hard link
> > root@board8:~# cd /jffs2/                                     
> > root@board8:/jffs2# ls -l
> > total 4
> > drwxr-xr-x    2 root     root            0 Sep 14 09:05 ./
> > drwxr-xr-x    2 root     root            0 Sep 14 09:05 ./
> > drwxrwxrwx   17 root     root         4096 Sep 11 09:53 ../
> 
> Interesting. I recommend you poke Erik with a sharp stick :) 

Hmm.  Sorry about that.  I thought I had everything perfect
but I guess not... 

 -Erik

--
Erik B. Andersen   email:  andersee@debian.org, formerly of Lineo
--This message was written using 73% post-consumer electrons--

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2001-09-17 23:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-14 18:20 trouble compiling mkfs.jffs2 James Schettine
2001-09-15 19:12 ` Jörn Engel
2001-09-17 13:06   ` Re(2): " James Schettine
2001-09-17 13:51     ` David Woodhouse
2001-09-17 14:48       ` Joakim Tjernlund
2001-09-17 14:53         ` David Woodhouse
2001-09-17 15:17           ` Joakim Tjernlund
2001-09-17 15:20             ` David Woodhouse
2001-09-17 15:24               ` Joakim Tjernlund
2001-09-17 18:57           ` Erik Andersen
2001-09-17 18:16   ` jffs vs. jffs2 & new code Jörn Engel
  -- strict thread matches above, loose matches on Subject: below --
2001-09-17 15:00 Re(2): trouble compiling mkfs.jffs2 Jonas Holmberg
2001-09-17 15:06 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox