[U-Boot-Users] 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

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

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

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&da...

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

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

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

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

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 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

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!
participants (3)
-
Andre Puschmann
-
Marco Cavallini
-
Wolfgang Denk