Dataflash and JFFS2
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
Quoted 7 lines · In message <[email protected]> you wrote:
i get the following error when typing "fsinfo":
<log>
no such FLASH device: nor0 (valid range 0 ... -1
incorrect device: nor0
</log>
Quoted 6 lines
my settings in modified at91rm9200dk.h-file are:
#undef
CONFIG_JFFS2_CMDLINE
#defineCONFIG_JFFS2_DEV"nor0"
#defineCONFIG_JFFS2_PART_SIZE0x3f6fbf
#defineCONFIG_JFFS2_PART_OFFSET0xc0029040
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
Signature · 5 lines
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.netQuoted 19 lines · Wolfgang Denk
Quoted 6 lines · In message <[email protected]> you wrote:
i get the following error when typing "fsinfo":
<log>
no such FLASH device: nor0 (valid range 0 ... -1
incorrect device: nor0
</log>Quoted 6 lines
my settings in modified at91rm9200dk.h-file are:
#undef
CONFIG_JFFS2_CMDLINE
#defineCONFIG_JFFS2_DEV"nor0"
#defineCONFIG_JFFS2_PART_SIZE0x3f6fbf
#defineCONFIG_JFFS2_PART_OFFSET0xc0029040This seems pretty broken to me.
First, data flash is not NOR flash, so the name "nor0" is very misleading.
Quoted 8 lines
Second,
0x3f6fbfis a very odd size for a flash partitions.JFFSSimilarly,
0xc0029040is 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
Quoted 28 lines · Andre Puschmann
Quoted 18 lines · Wolfgang Denk
Quoted 6 lines · In message <[email protected]> you wrote:
i get the following error when typing "fsinfo":
<log>
no such FLASH device: nor0 (valid range 0 ... -1
incorrect device: nor0
</log>Quoted 6 lines
my settings in modified at91rm9200dk.h-file are:
#undef
CONFIG_JFFS2_CMDLINE
#defineCONFIG_JFFS2_DEV"nor0"
#defineCONFIG_JFFS2_PART_SIZE0x3f6fbf
#defineCONFIG_JFFS2_PART_OFFSET0xc0029040This seems pretty broken to me.
First, data flash is not NOR flash, so the name "nor0" is very misleading.
Quoted 8 lines
Second,
0x3f6fbfis a very odd size for a flash partitions.JFFSSimilarly,
0xc0029040is a very unlikely partition offset.Best regards,
Wolfgang Denk
Quoted 8 lines
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 at0xc0000000is offset relative to starting flash address?
partition starts at0x29040(with0xc0000000as base) size is0x3f6e10which is a multiple of 528, right?
sorry, size should be 0x3f6c00!
but it doesn't work anyways.
Quoted 12 lines
what does the parameter
CONFIG_JFFS2_DEVreally mean, is it just a symbolical name?thank you
andreUsing 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
Quoted 4 lines · In message <[email protected]> you wrote:
is offset relative to starting flash address?
partition starts at0x29040(with0xc0000000as base) size is0x3f6e10which is a multiple of 528, right?
I don't think so.
Quoted 2 lines
what does the parameter
CONFIG_JFFS2_DEVreally mean, is it just a symbolical name?
Yes.
Best regards,
Wolfgang Denk
Signature · 3 lines
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?
Quoted 6 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:
is offset relative to starting flash address?
partition starts at0x29040(with0xc0000000as base) size is0x3f6e10which 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?
Quoted 5 lines
Quoted 3 lines
what does the parameter
CONFIG_JFFS2_DEVreally mean, is it just a symbolical name?Yes.
so calling it nor0 doesn't effect anything?
Quoted 5 lines
Best regards,
Wolfgang Denk
regards
andre
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 3 lines
partition starts at
0x29040(with0xc0000000as base) size is0x3f6e10which 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.
Quoted 1 line
but where should offset start from? at
0x00000000or0xc0000000?
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.
Quoted 3 lines
this is my config:
#undefCONFIG_JFFS2_CMDLINE
#defineCONFIG_JFFS2_DEV"nor0"
This is not NOR flash. DOn't use misleading names.
Quoted 1 line
#define
CONFIG_JFFS2_PART_SIZE0x3f6c00
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?
Quoted 3 lines
#define
CONFIG_JFFS2_PART_OFFSET(CFG_DATAFLASH_LOGIC_ADDR_CS0+0x29040)where
0x29040is the beginning of the partition starting from0xc0000000
This is wrong, too.
Quoted 1 line
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
Signature · 4 lines
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?
Quoted 6 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Quoted 2 lines
partition starts at
0x29040(with0xc0000000as base) size is0x3f6e10which is a multiple of 528, right?I don't think so.
sorry, i already corrected this typo :-) size is
0x3f6c00
Quoted 7 lines
This is NOT the partition size.
Quoted 1 line
but where should offset start from? at
0x00000000or0xc0000000?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.
Quoted 6 lines
Quoted 4 lines
this is my config:
#undefCONFIG_JFFS2_CMDLINE
#defineCONFIG_JFFS2_DEV"nor0"This is not NOR flash. DOn't use misleading names.
so "dataflash0" would be ok ..
Quoted 5 lines
Quoted 2 lines
#define
CONFIG_JFFS2_PART_SIZE0x3f6c00This is wrong. I would expect to see some "round" number here, i. e.
0x380000or so.
ok, i thought jffs2-partition sizes might be multiple of pagesize and erase-size, don't they?
Quoted 3 lines
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.
Quoted 6 lines
Quoted 4 lines
#define
CONFIG_JFFS2_PART_OFFSET(CFG_DATAFLASH_LOGIC_ADDR_CS0+0x29040)where
0x29040is the beginning of the partition starting from0xc0000000This is wrong, too.
this confuses me, sorry!
can you please give me some more details about what i am doing wrong?
Quoted 5 lines
Quoted 2 lines
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?
Quoted 5 lines
Best regards,
Wolfgang Denk
thank for help ..
regards
andre
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
Signature · 5 lines
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
Quoted 3 lines · Marco Cavallini
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.
Quoted 4 lines
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
Quoted 37 lines
===========
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:AT45DB642Nb 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: serialU-Boot> flinfo
DataFlash:AT45DB642Nb pages: 8192 Page Size: 1056Size= 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 C083FFFFBank # 1: Atmel: AT49BV6416 (64Mbit)
Size: 8 MB in 135 Sectors
Sector Start Addresses:
Quoted 9 lines
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
Quoted 8 lines · Andre Puschmann
Quoted 3 lines · Marco Cavallini
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!