How can I create a fixed-side JFFS2 image-file?
I have a machine that I want to install LFS onto.
The "hard-disk" is a 1Gb compact-flash card connected to the (only) IDE channel via an IDE adaptor.
What I want to do is to create a JFFS2 filesystem on the flash memory, to conserve wear and tear on the CF card. I'd also like to create a JFFS2 image on the host system first, and mount that as a loopback filesystem (rather than creating the JFFS2 filesystem directly on the card), partly so I have a copy of the filesystem and partly to save wearing out the card.
As a test, I ran this:
Code:
mkfs.jffs2 --output=image.jffs2 256
what I expected to happen was that it would create a 256-block device (with default 4k blocks, giving 1Mb) on a new file; instead it kept going until about 2.2Gb when I killed it.
Creating a 1Gb file using df and trying to create the image on that just overwrote the file with a new 2Gb file, when mkfs.jffs2 died.
Also, I note that JFFS2 uses the MTD devices; will JFFS2 even work over an IDE interface, and if not, what should I use for this setup?