[ELDK] jffs2 file system for two different flash devices

Wolfgang Denk wd at denx.de
Wed Jan 27 16:27:08 CET 2010


Dear Yigal Goldberger,

In message <826801.54026.qm at web38904.mail.mud.yahoo.com> you wrote:
>
> 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) .

Oops? Why that? The CFI flash driver should automatically be able to
detect the correct size and number of sectors. Are you still using a
custom flash driver? Time to get rid of it!

> 2) Added my flash ID code to flash.h .

Not needed either. Use the CFI driver, and dump your custom flash
driver instead.

> In Linux :
> 1) Edited the xxx.dts file so that My partition begining addresses are 128K
> B aligned .

INstead, you could just use the mtdarts feature in U-Boot and command
line configuration in Linux. 

> 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 00000
> 110
> GPR08: ccc134ff 00000000 00000001 c03f4000 22022044 100db7cc 0fffc000 00000
> 000
> GPR16: 0fff1914 0fff61c4 00000000 00000000 00000000 00000000 00008000 c03fc
> e58
> GPR24: 010da016 00011544 08d24d00 00011544 08f0757d c0409238 010d9f95 c0409
> 238
> 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

This does not seem to be related to writing to flash.


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
The management question ... is not _whether_ to build a pilot  system
and  throw  it away. You _will_ do that. The only question is whether
to plan in advance to build a throwaway, or to promise to deliver the
throwaway to customers.       - Fred Brooks, "The Mythical Man Month"


More information about the eldk mailing list