[ELDK] jffs2 file system for two different flash devices

Yigal Goldberger yigal_gold at yahoo.com
Wed Jan 27 14:39:29 CET 2010


Hi ,
My system runs :
u-boot 2009.03
linux 2.6.29.4
Xenomai - v2.4.8

I've changed a few configuration settings in my system to operate with the new SPANSION flash which has a 128KB sector size (the previous flash had a 64KB sector size}.

 In u-boot  :
1)I've added a case to match the Flash ID inside
 flash_get_size()
And set the sector_count to 256 and size to 0x02000000 (32MB) .
2) Added my flash ID code to flash.h .

3) BOARD.h - changed CONFIG_ENV_SECT_SIZE to 0x20000 . (so saveenv works).

After burning the recompiled u-boot on the flash , it boots ,
seems to work fine (erase , protect and cp commands work as expected )
And also flinfo returns the correct  flash data and sector map .

In Linux :
1) Edited the xxx.dts file so that My partition begining addresses are 128KB aligned .
After compiling linux again , building a new jffs2 file system with -e 0x20000 to match the new sector size , the system boots , the jffs2 partition mounts , and My application runs as expected .

However , when I try to write to a partition
busybox dd bs=1024 seek=0 if=/mnt/temp/fpga.bin of=/dev/mtdblock6

I get the following Oops  :

 Oops: Exception in kernel mode, sig: 4 [#1]
PREEMPT NDS 802 Reader
Modules linked in: Fpga_Driver
NIP: c003c500 LR: c003c500 CTR: c005ca10
REGS: c03f5e80 TRAP: 0700   Not tainted  (2.6.29.4)
MSR: 00089032 <EE,ME,IR,DR>  CR: 22022044  XER: 00000000
TASK = c03ce588[0] 'swapper' THREAD: c03f4000
GPR00: c003c500 c03f5f30 c03ce588 00000001 00000001 00000000 26dcbb00 00000110
GPR08: ccc134ff 00000000 00000001 c03f4000 22022044 100db7cc 0fffc000 00000000
GPR16: 0fff1914 0fff61c4 00000000 00000000 00000000 00000000 00008000 c03fce58
GPR24: 010da016 00011544 08d24d00 00011544 08f0757d c0409238 010d9f95 c0409238
NIP [c003c500] hrtimer_start+0x30/0x40
LR [c003c500] hrtimer_start+0x30/0x40
Call Trace:
[c03f5f30] [c003c500] hrtimer_start+0x30/0x40 (unreliable)
[c03f5f40] [c0045c5c] tick_nohz_stop_sched_tick+0x330/0x3e8
[c03f5f80] [c000908c] cpu_idle+0x58/0x104
[c03f5fa0] [c02da554] __got2_end+0x80/0x94
[c03f5fc0] [c03a481c] start_kernel+0x2a8/0x2bc
[c03f5ff0] [00003438] 0x3438
Instruction dump:
9421fff0 7c0802a6 7ca62b78 38e00001 38a00000 90010014 81240000 81440004
7c240b78 95240008 91440004 4bfffced <80010014> 38210010 7c0803a6 4e800020
---[ end trace 33aa73857552ea90 ]---
Kernel panic - not syncing: Attempted to kill the idle task!
Rebooting in 180 seconds..



Yigal Goldberger 




--- On Mon, 1/25/10, Wolfgang Denk <wd at denx.de> wrote:

> From: Wolfgang Denk <wd at denx.de>
> Subject: Re: [ELDK] jffs2 file system for two different flash devices
> To: "Yigal Goldberger" <yigal_gold at yahoo.com>
> Cc: eldk at lists.denx.de
> Date: Monday, January 25, 2010, 1:43 PM
> Dear Yigal Goldberger,
> 
> In message <20167.75324.qm at web38904.mail.mud.yahoo.com>
> you wrote:
> > 
> > It turns out that my flash is obsolete , and was
> replaced by a new one with a larger erase sector size . (the
> old one was 64KB and the new - 128KB) .
> ...
> > My question is how can I (If I can) build one jffs2
> file system the suite both flash devices ?
> 
> You cannot. JFFS2 depends on the physical block size of the
> underlying
> flash device. If the block sizes differ, you must use two
> different
> file system images.
> 
> Alternatively, you could try and for a step forward and use
> UBI /UBIFS
> instead of JFFS2. But that might be a bigger change for
> you.
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> DENX Software Engineering GmbH,     MD:
> Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> wd at denx.de
> I used to be indecisive, now I'm not sure.
> 


      


More information about the eldk mailing list