[ECOS] Error in JFFS2 test program

Chris Zimman czimman@Bloomberg.com
Fri Nov 3 12:14:00 GMT 2006


Himanshu,

Make sure interrupts are disable during JFFS2 access unless you are using the new eCosCentric Flash V2 drivers.  The old flash drivers need to have interrupts disabled during access, or you're going to run into problems like these.

Eg:

int
my_flash_function()
{
	CYG_INTERRUPT_STATE intr_state;

	HAL_DISABLE_INTERRUPTS(intr_state);

	[do your thing with flash here]

	HAL_RESTORE_INTERRUPTS(intr_state);
}

--Chris

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of himanshup
Sent: 03 November 2006 11:31
To: Hans Hübner
Cc: eCos Discuss
Subject: Re: [ECOS] Error in JFFS2 test program

Hi Hans,

Thanks for reply.

I erase the flash blocks and mount works now. However open() and write() 
fail now...

Below is the output:
<INFO>: reading directory /
<INFO>: entry              . [mode 00016f01 ino 000cb6c0 nlink 1 size 0]
<INFO>: entry             .. [mode 00016f01 ino 000cb6c0 nlink 1 size 0]
<INFO>: create file /foo size 202
<FAIL>: open() returned -1 Unknown error
<FAIL>: write() returned -1 Bad file handle
<FAIL>: write() returned -1 Bad file handle
<FAIL>: write() returned -1 Bad file handle

We are trying to debug the same. Any immediate pointer will be helpful.

Regards,

Himanshu Patel

----- Original Message ----- 
From: "Hans Hübner" <hans.huebner@junger-audio.com>
To: "himanshup" <himanshup@aftek.com>
Cc: "eCos Discuss" <ecos-discuss@ecos.sourceware.org>
Sent: Friday, November 03, 2006 4:19 PM
Subject: Re: [ECOS] Error in JFFS2 test program


> Did you erase the flash blocks you try to use as JFFS2?  You need to
> do so, otherwise the mount will fail.
>
> -Hans
>
> 2006/11/3, himanshup <himanshup@aftek.com>:
>> Hi,
>>
>> We are trying to use JFFS2 on PXA250 Evaluation Board. I am trying to run
>> test program fileio1.c. However it is giving error in the mount() command
>> itself.
>>
>> Below is the output:
>> go 0x20000
>> [cyg_net_init] Init: mbinit(0x00000000)
>> [cyg_net_init] Init: cyg_net_init_devs(0x00000000)
>> Init device 'lan91cxx_eth0'
>> [cyg_net_init] Init: loopattach(0x00000000)
>> [cyg_net_init] Init: ifinit(0x00000000)
>> IFP: 0x0007d304, next: 0x000ca320
>> IFP: 0x000ca320, next: 0x00000000
>> [cyg_net_init] Init: domaininit(0x00000000)
>> [cyg_net_init] Init: cyg_net_add_domain(0x0007df0c)
>> New domain internet at 0x00000000
>> [cyg_net_init] Init: cyg_net_add_domain(0x0007d66c)
>> New domain route at 0x00000000
>> [cyg_net_init] Init: cyg_route_init(0x00000000)
>> [cyg_net_init] Done
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000:
>> 0x2003 instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004:
>> 0x000c instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008:
>> 0xdc6d instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000:
>> 0x2003 instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004:
>> 0x000c instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008:
>> 0xdc6d instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080000:
>> 0x2003 instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080004:
>> 0x000c instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080008:
>> 0xdc6d instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0000:
>> 0x2003 instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0004:
>> 0x000c instead
>> <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0008:
>> 0xdc6d instead
>> <5>Cowardly refusing to erase blocks on filesystem with no valid JFFS2 
>> nodes
>> <5>empty_blocks 0, bad_blocks 0, c->nr_blocks 4
>> <FAIL>: mount() returned -1 I/O error
>> <FAIL>: chdir() returned -1 No such entity
>>
>> Is there any prerequisite for running JFFS2 tests? What could be the
>> problem?
>>
>> Regards,
>>
>> Himanshu Patel
>>
>>
>>
>> --
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>>
>
> 



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list