public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Dataflash and JFFS2
@ 2006-06-26 12:29 Andre Puschmann
  2006-06-26 13:07 ` Wolfgang Denk
  2006-06-27 12:06 ` Marco Cavallini
  0 siblings, 2 replies; 11+ messages in thread
From: Andre Puschmann @ 2006-06-26 12:29 UTC (permalink / raw)
  To: u-boot

hello folks,
we are using an atmel at91rm9200-dk based custom board with 4mb of
dataflash.
i stored the kernel image inside of an jffs2-partition on the dataflash.
to load the kernel i am trying to read the image out of the
jffs2-partition on dataflash.

i get the following error when typing "fsinfo":
<log>
no such FLASH device: nor0 (valid range 0 ... -1
incorrect device: nor0
</log>

my settings in modified at91rm9200dk.h-file are:

#undef CONFIG_JFFS2_CMDLINE
#define CONFIG_JFFS2_DEV		"nor0"
#define CONFIG_JFFS2_PART_SIZE		0x3f6fbf
#define CONFIG_JFFS2_PART_OFFSET	0xc0029040


all other configs that use jffs-read-functionality don't have
any dataflash, so is this possible generally?!

regards
andre

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-26 12:29 [U-Boot-Users] Dataflash and JFFS2 Andre Puschmann
@ 2006-06-26 13:07 ` Wolfgang Denk
  2006-06-26 13:33   ` Andre Puschmann
  2006-06-27 12:06 ` Marco Cavallini
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Denk @ 2006-06-26 13:07 UTC (permalink / raw)
  To: u-boot

In message <e7ok08$8eq$1@sea.gmane.org> you wrote:
>
> i get the following error when typing "fsinfo":
> <log>
> no such FLASH device: nor0 (valid range 0 ... -1
> incorrect device: nor0
> </log>
> 
> my settings in modified at91rm9200dk.h-file are:
> 
> #undef CONFIG_JFFS2_CMDLINE
> #define CONFIG_JFFS2_DEV		"nor0"
> #define CONFIG_JFFS2_PART_SIZE		0x3f6fbf
> #define CONFIG_JFFS2_PART_OFFSET	0xc0029040

This seems pretty broken to me.

First, data flash is not NOR  flash,  so  the  name  "nor0"  is  very
misleading.

Second, 0x3f6fbf is a very odd size for a flash partitions.

Similarly, 0xc0029040 is a very unlikely partition offset.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Hiring experienced unix people is  like  a  built-in  filter  against
idiots. Hiring experienced NT people provides no such guarantee.
            -- Miguel Cruz in WgL96.349$CC.122704 at typhoon2.ba-dsg.net

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-26 13:07 ` Wolfgang Denk
@ 2006-06-26 13:33   ` Andre Puschmann
  2006-06-26 14:45     ` Andre Puschmann
  2006-06-26 20:42     ` Wolfgang Denk
  0 siblings, 2 replies; 11+ messages in thread
From: Andre Puschmann @ 2006-06-26 13:33 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> In message <e7ok08$8eq$1@sea.gmane.org> you wrote:
>> i get the following error when typing "fsinfo":
>> <log>
>> no such FLASH device: nor0 (valid range 0 ... -1
>> incorrect device: nor0
>> </log>
>>
>> my settings in modified at91rm9200dk.h-file are:
>>
>> #undef CONFIG_JFFS2_CMDLINE
>> #define CONFIG_JFFS2_DEV		"nor0"
>> #define CONFIG_JFFS2_PART_SIZE		0x3f6fbf
>> #define CONFIG_JFFS2_PART_OFFSET	0xc0029040
> 
> This seems pretty broken to me.
> 
> First, data flash is not NOR  flash,  so  the  name  "nor0"  is  very
> misleading.
> 
> Second, 0x3f6fbf is a very odd size for a flash partitions.JFFS
> 
> Similarly, 0xc0029040 is a very unlikely partition offset.
> 
> Best regards,
> 
> Wolfgang Denk
> 

hi,
thank you for your prompt reply.
you're right, sorry i did not check those sizes!
page size of flash is 528byte. flash starts at 0xc0000000

is offset relative to starting flash address?
partition starts at 0x29040 (with 0xc0000000 as base) size is 0x3f6e10
which is a multiple of 528, right?

what does the parameter CONFIG_JFFS2_DEV really mean, is it just a
symbolical name?


thank you
andre

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-26 13:33   ` Andre Puschmann
@ 2006-06-26 14:45     ` Andre Puschmann
  2006-06-26 20:42     ` Wolfgang Denk
  1 sibling, 0 replies; 11+ messages in thread
From: Andre Puschmann @ 2006-06-26 14:45 UTC (permalink / raw)
  To: u-boot

Andre Puschmann wrote:
> Wolfgang Denk wrote:
>> In message <e7ok08$8eq$1@sea.gmane.org> you wrote:
>>> i get the following error when typing "fsinfo":
>>> <log>
>>> no such FLASH device: nor0 (valid range 0 ... -1
>>> incorrect device: nor0
>>> </log>
>>>
>>> my settings in modified at91rm9200dk.h-file are:
>>>
>>> #undef CONFIG_JFFS2_CMDLINE
>>> #define CONFIG_JFFS2_DEV		"nor0"
>>> #define CONFIG_JFFS2_PART_SIZE		0x3f6fbf
>>> #define CONFIG_JFFS2_PART_OFFSET	0xc0029040
>> This seems pretty broken to me.
>>
>> First, data flash is not NOR  flash,  so  the  name  "nor0"  is  very
>> misleading.
>>
>> Second, 0x3f6fbf is a very odd size for a flash partitions.JFFS
>>
>> Similarly, 0xc0029040 is a very unlikely partition offset.
>>
>> Best regards,
>>
>> Wolfgang Denk
>>
> 
> hi,
> thank you for your prompt reply.
> you're right, sorry i did not check those sizes!
> page size of flash is 528byte. flash starts at 0xc0000000
> 
> is offset relative to starting flash address?
> partition starts at 0x29040 (with 0xc0000000 as base) size is 0x3f6e10
> which is a multiple of 528, right?

sorry, size should be 0x3f6c00!
but it doesn't work anyways.


> what does the parameter CONFIG_JFFS2_DEV really mean, is it just a
> symbolical name?
> 
> 
> thank you
> andre
> 
> 
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-26 13:33   ` Andre Puschmann
  2006-06-26 14:45     ` Andre Puschmann
@ 2006-06-26 20:42     ` Wolfgang Denk
  2006-06-27  9:49       ` Andre Puschmann
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Denk @ 2006-06-26 20:42 UTC (permalink / raw)
  To: u-boot

In message <e7onni$mj5$1@sea.gmane.org> you wrote:
>
> is offset relative to starting flash address?
> partition starts at 0x29040 (with 0xc0000000 as base) size is 0x3f6e10
> which is a multiple of 528, right?

I don't think so.

> what does the parameter CONFIG_JFFS2_DEV really mean, is it just a
> symbolical name?

Yes.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Where would we be without rhetorical questions?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-26 20:42     ` Wolfgang Denk
@ 2006-06-27  9:49       ` Andre Puschmann
  2006-06-27 10:13         ` Wolfgang Denk
  0 siblings, 1 reply; 11+ messages in thread
From: Andre Puschmann @ 2006-06-27  9:49 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> In message <e7onni$mj5$1@sea.gmane.org> you wrote:
>> is offset relative to starting flash address?
>> partition starts at 0x29040 (with 0xc0000000 as base) size is 0x3f6e10
>> which is a multiple of 528, right?
> 
> I don't think so.

sorry, i already corrected this typo :-) size is 0x3f6c00

but where should offset start from? at 0x00000000 or 0xc0000000?

this is my config:
#undef CONFIG_JFFS2_CMDLINE
#define CONFIG_JFFS2_DEV		"nor0"
#define CONFIG_JFFS2_PART_SIZE		0x3f6c00
#define CONFIG_JFFS2_PART_OFFSET	(CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x29040)

where 0x29040 is the beginning of the partition starting from 0xc0000000



is it suppose to work generally on dataflash?

> 
>> what does the parameter CONFIG_JFFS2_DEV really mean, is it just a
>> symbolical name?
> 
> Yes.

so calling it nor0 doesn't effect anything?

> 
> Best regards,
> 
> Wolfgang Denk
> 

regards
andre

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-27  9:49       ` Andre Puschmann
@ 2006-06-27 10:13         ` Wolfgang Denk
  2006-06-27 11:50           ` Andre Puschmann
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Denk @ 2006-06-27 10:13 UTC (permalink / raw)
  To: u-boot

In message <e7quuu$ugk$1@sea.gmane.org> you wrote:
>
> >> partition starts at 0x29040 (with 0xc0000000 as base) size is 0x3f6e10
> >> which is a multiple of 528, right?
> > 
> > I don't think so.
> 
> sorry, i already corrected this typo :-) size is 0x3f6c00

This is NOT the partition size.

> but where should offset start from? at 0x00000000 or 0xc0000000?

I'm afraid I don't understand. Offsets measure the  distance  between
"here"  and  a "base" or "start" address. So offset 0 is identical to
the start address.

> this is my config:
> #undef CONFIG_JFFS2_CMDLINE
> #define CONFIG_JFFS2_DEV		"nor0"

This is not NOR flash. DOn't use misleading names.

> #define CONFIG_JFFS2_PART_SIZE		0x3f6c00

This is wrong. I would expect to see some "round" number here, i.  e.
0x380000 or so.

What are your partition sizes in Linux? You certainly don't have such
odd size there either, right?

> #define CONFIG_JFFS2_PART_OFFSET	(CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x29040)
> 
> where 0x29040 is the beginning of the partition starting from 0xc0000000

This is wrong, too. 

> so calling it nor0 doesn't effect anything?

Yes, it does. It causes confusion to the user and  is  thus  an  evil
thing that should be fixed.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
How many Unix hacks does it take to change a light bulb?  Let's  see,
   can you use a shell script for that or does it need a C program?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-27 10:13         ` Wolfgang Denk
@ 2006-06-27 11:50           ` Andre Puschmann
  0 siblings, 0 replies; 11+ messages in thread
From: Andre Puschmann @ 2006-06-27 11:50 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> In message <e7quuu$ugk$1@sea.gmane.org> you wrote:
>>>> partition starts at 0x29040 (with 0xc0000000 as base) size is 0x3f6e10
>>>> which is a multiple of 528, right?
>>> I don't think so.
>> sorry, i already corrected this typo :-) size is 0x3f6c00
> 
> This is NOT the partition size.
> 
>> but where should offset start from? at 0x00000000 or 0xc0000000?
> 
> I'm afraid I don't understand. Offsets measure the  distance  between
> "here"  and  a "base" or "start" address. So offset 0 is identical to
> the start address.

that is why i am asking from which "base" address the resulting address
is being calculated. sorry for incomprehensible formulation.

> 
>> this is my config:
>> #undef CONFIG_JFFS2_CMDLINE
>> #define CONFIG_JFFS2_DEV		"nor0"
> 
> This is not NOR flash. DOn't use misleading names.

so "dataflash0" would be ok ..

> 
>> #define CONFIG_JFFS2_PART_SIZE		0x3f6c00
> 
> This is wrong. I would expect to see some "round" number here, i.  e.
> 0x380000 or so.

ok, i thought jffs2-partition sizes might be multiple of pagesize and
erase-size, don't they?

> 
> What are your partition sizes in Linux? You certainly don't have such
> odd size there either, right?

we used such "odd" sizes as well ..
i thought it doesn't matter how those "numbers" look like as long as
they are suitable for jffs2-partition restrictions.


> 
>> #define CONFIG_JFFS2_PART_OFFSET	(CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x29040)
>>
>> where 0x29040 is the beginning of the partition starting from 0xc0000000
> 
> This is wrong, too.

this confuses me, sorry!
can you please give me some more details about what i am doing wrong?

> 
>> so calling it nor0 doesn't effect anything?
> 
> Yes, it does. It causes confusion to the user and  is  thus  an  evil
> thing that should be fixed.

already fixed this :-)
but just the fact that dataflash is not "normal" nor-flash doesn't
effect the usability of dataflash for the discussed problem?
i mean, in case i wouldn't make such silly mistakes :-) it should work
with this configuration?

> 
> Best regards,
> 
> Wolfgang Denk
> 

thank for help ..

regards

andre

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-26 12:29 [U-Boot-Users] Dataflash and JFFS2 Andre Puschmann
  2006-06-26 13:07 ` Wolfgang Denk
@ 2006-06-27 12:06 ` Marco Cavallini
  2006-06-27 12:19   ` Andre Puschmann
  1 sibling, 1 reply; 11+ messages in thread
From: Marco Cavallini @ 2006-06-27 12:06 UTC (permalink / raw)
  To: u-boot

Andre,
I read all the other thread under your message.
I didn't understand what are you trying to do.
If this can help, I can say I am successfully using Dataflash with a 
couple of different custom boards based on AT91RM9200 (DK like)
Please post your u-boot configuration, your memory specification, and 
what you want to do.

===========

U-Boot 1.1.4 (May 20 2006 - 11:18:53)

U-Boot code: 21F00000 -> 21F165A4  BSS: -> 21F33404
RAM Configuration:
Bank #0: 20000000 64 MB
Atmel: AT49BV6416 (64Mbit)
Flash:  8 MB
DataFlash:AT45DB642
Nb pages:   8192
Page Size:   1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C0007FFF (RO)
Area 1: C0008000 to C001FFFF (RO)
Area 2: C0020000 to C0027FFF
Area 3: C0028000 to C083FFFF
In:    serial
Out:   serial
Err:   serial

U-Boot> flinfo
DataFlash:AT45DB642
Nb pages:   8192
Page Size:   1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C0007FFF (RO)
Area 1: C0008000 to C001FFFF (RO)
Area 2: C0020000 to C0027FFF
Area 3: C0028000 to C083FFFF

Bank # 1: Atmel: AT49BV6416 (64Mbit)
   Size: 8 MB in 135 Sectors
   Sector Start Addresses:
     10000000 (RO) 10002000 (RO) 10004000 (RO) 10006000 (RO) 10008000 (RO)
     1000A000 (RO) 1000C000 (RO) 1000E000 (RO) 10010000 (RO) 10020000 (RO)
     10030000 (RO) 10040000 (RO) 10050000 (RO) 10060000 (RO) 10070000
.snip.

===========

Ciao

-- 
Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
Tel. +39-(0)35-255.235 - Fax +39-178-223.9748
www.KoanSoftware.com   |    www.KaeilOS.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-27 12:06 ` Marco Cavallini
@ 2006-06-27 12:19   ` Andre Puschmann
  2006-06-27 12:29     ` Andre Puschmann
  0 siblings, 1 reply; 11+ messages in thread
From: Andre Puschmann @ 2006-06-27 12:19 UTC (permalink / raw)
  To: u-boot

Marco Cavallini wrote:
> Andre,
> I read all the other thread under your message.
> I didn't understand what are you trying to do.

i am trying to store the kernel image (uImage) inside of the
jffs2-filesystem .. thus i need the fsload command to load it from the
filesystem into sram.

> If this can help, I can say I am successfully using Dataflash with a 
> couple of different custom boards based on AT91RM9200 (DK like)
> Please post your u-boot configuration, your memory specification, and 
> what you want to do.

we are using dataflash as well, and it works! but we store the kernel
image directly on the dataflash ..
if we can store the kernel inside of an jffs2-image which is mounted
during the system runs it would be much easier to update the kernel, or
am i wrong?
that is what the whole discussion is about.

here is some output:
<log>
U-Boot 1.1.4 (Jun 26 2006 - 16:38:12)

DRAM:  32 MB
Flash:  0 kB
DataFlash:AT45DB321
Nb pages:   8192
Page Size:    528
Size= 4325376 bytes
Logical address: 0xC0000000
Area 0:\0x09C0000000 to C0007FFF (RO)
Area 1:\0x09C0008000 to C001FFFF (RO)
Area 2:\0x09C0020000 to C0027FFF
Area 3:\0x09C0028000 to C041FFFF
In:    serial
Out:   serial
Err:   serial
OPENDO> flinfo
DataFlash:AT45DB321
Nb pages:   8192
Page Size:    528
Size= 4325376 bytes
Logical address: 0xC0000000
Area 0:\0x09C0000000 to C0007FFF (RO)
Area 1:\0x09C0008000 to C001FFFF (RO)
Area 2:\0x09C0020000 to C0027FFF
Area 3:\0x09C0028000 to C041FFFF
OPENDO>
</log>

attached the modified at91rm9200dk.h configuration file ..


regards
andre

> 
> ===========
> 
> U-Boot 1.1.4 (May 20 2006 - 11:18:53)
> 
> U-Boot code: 21F00000 -> 21F165A4  BSS: -> 21F33404
> RAM Configuration:
> Bank #0: 20000000 64 MB
> Atmel: AT49BV6416 (64Mbit)
> Flash:  8 MB
> DataFlash:AT45DB642
> Nb pages:   8192
> Page Size:   1056
> Size= 8650752 bytes
> Logical address: 0xC0000000
> Area 0: C0000000 to C0007FFF (RO)
> Area 1: C0008000 to C001FFFF (RO)
> Area 2: C0020000 to C0027FFF
> Area 3: C0028000 to C083FFFF
> In:    serial
> Out:   serial
> Err:   serial
> 
> U-Boot> flinfo
> DataFlash:AT45DB642
> Nb pages:   8192
> Page Size:   1056
> Size= 8650752 bytes
> Logical address: 0xC0000000
> Area 0: C0000000 to C0007FFF (RO)
> Area 1: C0008000 to C001FFFF (RO)
> Area 2: C0020000 to C0027FFF
> Area 3: C0028000 to C083FFFF
> 
> Bank # 1: Atmel: AT49BV6416 (64Mbit)
>    Size: 8 MB in 135 Sectors
>    Sector Start Addresses:
>      10000000 (RO) 10002000 (RO) 10004000 (RO) 10006000 (RO) 10008000 (RO)
>      1000A000 (RO) 1000C000 (RO) 1000E000 (RO) 10010000 (RO) 10020000 (RO)
>      10030000 (RO) 10040000 (RO) 10050000 (RO) 10060000 (RO) 10070000
> .snip.
> 
> ===========
> 
> Ciao
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: at91rm9200dk.h
Type: text/x-chdr
Size: 8838 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060627/608e269c/attachment.h 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot-Users] Dataflash and JFFS2
  2006-06-27 12:19   ` Andre Puschmann
@ 2006-06-27 12:29     ` Andre Puschmann
  0 siblings, 0 replies; 11+ messages in thread
From: Andre Puschmann @ 2006-06-27 12:29 UTC (permalink / raw)
  To: u-boot

Andre Puschmann wrote:
> Marco Cavallini wrote:
>> Andre,
>> I read all the other thread under your message.
>> I didn't understand what are you trying to do.
> 
> i am trying to store the kernel image (uImage) inside of the
> jffs2-filesystem .. thus i need the fsload command to load it from the
> filesystem into sram.

not sram, but normal ram :-)
sorry!

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-06-27 12:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-26 12:29 [U-Boot-Users] Dataflash and JFFS2 Andre Puschmann
2006-06-26 13:07 ` Wolfgang Denk
2006-06-26 13:33   ` Andre Puschmann
2006-06-26 14:45     ` Andre Puschmann
2006-06-26 20:42     ` Wolfgang Denk
2006-06-27  9:49       ` Andre Puschmann
2006-06-27 10:13         ` Wolfgang Denk
2006-06-27 11:50           ` Andre Puschmann
2006-06-27 12:06 ` Marco Cavallini
2006-06-27 12:19   ` Andre Puschmann
2006-06-27 12:29     ` Andre Puschmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox