* Creating an Empty JFFS2 File System
@ 2008-03-07 17:55 Grant Erickson
2008-03-07 18:37 ` Josh Boyer
2008-03-07 18:50 ` Markus Franke
0 siblings, 2 replies; 5+ messages in thread
From: Grant Erickson @ 2008-03-07 17:55 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
Is creating an empty JFFS2 file system supported or is this a deprecated
capability? The following steps seem to be incorrect or failing:
# flash_eraseall -q -j /dev/mtd9
# mount -t jffs2 /dev/mtdblock9 /mnt
Cowardly refusing to erase blocks on filesystem with no valid JFFS2
nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 3840
Or, is the only way to accomplish this to create a NULL JFFS2 image with
mkfs.jffs2 and then nandwrite it?
Regards,
Grant
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating an Empty JFFS2 File System
2008-03-07 17:55 Creating an Empty JFFS2 File System Grant Erickson
@ 2008-03-07 18:37 ` Josh Boyer
2008-03-07 20:39 ` Grant Erickson
2008-03-07 18:50 ` Markus Franke
1 sibling, 1 reply; 5+ messages in thread
From: Josh Boyer @ 2008-03-07 18:37 UTC (permalink / raw)
To: Grant Erickson; +Cc: linux-mtd@lists.infradead.org
On Fri, 07 Mar 2008 09:55:13 -0800
Grant Erickson <gerickson@nuovations.com> wrote:
> Is creating an empty JFFS2 file system supported or is this a deprecated
> capability? The following steps seem to be incorrect or failing:
>
> # flash_eraseall -q -j /dev/mtd9
> # mount -t jffs2 /dev/mtdblock9 /mnt
> Cowardly refusing to erase blocks on filesystem with no valid JFFS2
> nodes
> empty_blocks 0, bad_blocks 0, c->nr_blocks 3840
>
> Or, is the only way to accomplish this to create a NULL JFFS2 image with
> mkfs.jffs2 and then nandwrite it?
Just erase it completely without the -j option and mount. JFFS2 will go
through and erase them all again and add the cleanmarkers itself.
josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating an Empty JFFS2 File System
2008-03-07 17:55 Creating an Empty JFFS2 File System Grant Erickson
2008-03-07 18:37 ` Josh Boyer
@ 2008-03-07 18:50 ` Markus Franke
1 sibling, 0 replies; 5+ messages in thread
From: Markus Franke @ 2008-03-07 18:50 UTC (permalink / raw)
To: Grant Erickson; +Cc: linux-mtd
Hi,
Grant Erickson schrieb:
> Is creating an empty JFFS2 file system supported or is this a deprecated
> capability? The following steps seem to be incorrect or failing:
>
> # flash_eraseall -q -j /dev/mtd9
> # mount -t jffs2 /dev/mtdblock9 /mnt
Does this work with NOR Flash as well?
Best regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating an Empty JFFS2 File System
2008-03-07 18:37 ` Josh Boyer
@ 2008-03-07 20:39 ` Grant Erickson
2008-08-23 15:34 ` Grant Erickson
0 siblings, 1 reply; 5+ messages in thread
From: Grant Erickson @ 2008-03-07 20:39 UTC (permalink / raw)
To: Josh Boyer; +Cc: linux-mtd@lists.infradead.org
On 3/7/08 10:37 AM, Josh Boyer wrote:
> On Fri, 07 Mar 2008 09:55:13 -0800
> Grant Erickson <gerickson@nuovations.com> wrote:
>> Is creating an empty JFFS2 file system supported or is this a deprecated
>> capability? The following steps seem to be incorrect or failing:
>>
>> # flash_eraseall -q -j /dev/mtd9
>> # mount -t jffs2 /dev/mtdblock9 /mnt
>> Cowardly refusing to erase blocks on filesystem with no valid JFFS2
>> nodes
>> empty_blocks 0, bad_blocks 0, c->nr_blocks 3840
>>
>> Or, is the only way to accomplish this to create a NULL JFFS2 image with
>> mkfs.jffs2 and then nandwrite it?
>
> Just erase it completely without the -j option and mount. JFFS2 will go
> through and erase them all again and add the cleanmarkers itself.
Josh:
That technique is a no-go as well:
# flash_eraseall -q /dev/mtd8
# mount -t jffs2 /dev/mtdblock8 /mnt
Cowardly refusing to erase blocks on filesystem with no valid JFFS2
nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 3840
mount: mounting /dev/mtdblock8 on /mnt failed: Input/output error
Regards,
Grant
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Creating an Empty JFFS2 File System
2008-03-07 20:39 ` Grant Erickson
@ 2008-08-23 15:34 ` Grant Erickson
0 siblings, 0 replies; 5+ messages in thread
From: Grant Erickson @ 2008-08-23 15:34 UTC (permalink / raw)
To: "linux-mtd@lists.infradead.org"; +Cc: Josh Boyer, Stefan Roese
On 3/7/08 12:39 PM, Grant Erickson wrote:
> On 3/7/08 10:37 AM, Josh Boyer wrote:
>> On Fri, 07 Mar 2008 09:55:13 -0800
>> Grant Erickson <gerickson@nuovations.com> wrote:
>>> Is creating an empty JFFS2 file system supported or is this a deprecated
>>> capability? The following steps seem to be incorrect or failing:
>>>
>>> # flash_eraseall -q -j /dev/mtd9
>>> # mount -t jffs2 /dev/mtdblock9 /mnt
>>> Cowardly refusing to erase blocks on filesystem with no valid JFFS2
>>> nodes
>>> empty_blocks 0, bad_blocks 0, c->nr_blocks 3840
>>>
>>> Or, is the only way to accomplish this to create a NULL JFFS2 image with
>>> mkfs.jffs2 and then nandwrite it?
>>
>> Just erase it completely without the -j option and mount. JFFS2 will go
>> through and erase them all again and add the cleanmarkers itself.
>
> Josh:
>
> That technique is a no-go as well:
>
> # flash_eraseall -q /dev/mtd8
> # mount -t jffs2 /dev/mtdblock8 /mnt
> Cowardly refusing to erase blocks on filesystem with no valid JFFS2
> nodes
> empty_blocks 0, bad_blocks 0, c->nr_blocks 3840
> mount: mounting /dev/mtdblock8 on /mnt failed: Input/output error
For those following this thread via Google, I finally had time to debug this
upon arrival of our prototype boards and thought I would close the thread
out with the root cause.
On the prototype board, which uses a Numonyx NAND01GW3B2B (128 KiB block / 2
KiB page), I found that I COULD successfully erase a NAND partition with
'nand erase' in u-boot or 'flash_eraseall' in Linux and then mount it:
# flash_eraseall -q /dev/mtd9
# mount -t jffs2 /dev/mtdblock9 /mnt/root0
# df
Filesystem 1k-blocks Used Available Use% Mounted on
...
/dev/mtdblock9 8192 512 7680 6% /mnt/root0
However, as before, I tried this on Haleakala/Kilauea with its Samsung
K9F1208U0B (16 KiB block / 512 B page) part using the same 2.6.25-rc3 DENX
kernel, I saw the following:
# flash_eraseall -q /dev/mtd9
# mount -t jffs2 /dev/mtdblock9 /mnt/root0
Cowardly refusing to erase blocks on filesystem with no valid JFFS2
nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 512
mount: mounting /dev/mtdblock9 on /mnt/root0 failed: Input/output error
My suspicion was that this was somehow related to the custom OOB/ECC layout
specified in arch/powerpc/platforms/40x/kilauea-nand.c because an erase from
either u-boot with 'nand erase' or Linux with 'flash_eraseall' produced
identical results.
The larger page part on the prototype board uses a default OOB/ECC layout
(similar to Canyonlands, et al) and worked correctly in either case.
So, I made the following change in arch/powerpc/platforms/40x/kilauea-nand.c
in the DENX-2.6.26.2 kernel:
- .ecclayout = &nand_oob_16,
+ .ecclayout = NULL,
and an empty/erased partition mount worked, both with an erase from u-boot
using 'nand erase' and from Linux using 'flash erase_all'.
Stefan Roese at DENX confirmed this was likely an arch/ppc to arch/powerpc
porting error/typo.
Regards,
Grant Erickson
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-23 15:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-07 17:55 Creating an Empty JFFS2 File System Grant Erickson
2008-03-07 18:37 ` Josh Boyer
2008-03-07 20:39 ` Grant Erickson
2008-08-23 15:34 ` Grant Erickson
2008-03-07 18:50 ` Markus Franke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox