Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Problems on using jffs2 file system in dataflash AT45DB642D
PostPosted: Tue Jun 17, 2008 5:17 am 
Offline

Joined: Wed May 28, 2008 3:41 am
Posts: 1
Dear all,

I am a new developer on AT91SAM9261 with linux. I have a problem on using dataflash as backup storage in AT91SAM9261. I have tried to find the solution in the forum and search in internet. But I still cannot find some hints. Would you mind giving me some hints to solve the problem.

The problem is as follows:
When I copy a large file (e.g. 800K) from ram to dataflash, kernel oops appear.

***************************************************************
kernel BUG at arch/arm/mm/consistent.c:488!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c1988000
[00000000] *pgd=21896031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.22.1 #366)
***************************************************************

My setup is as follows:
I have partitioned the dataflash in kernel 2.6.22.1 as follows:
static struct mtd_partition urp2_flash1_partitions[] =
{
/* Note there are 8 pages per block, so put all sections on a block boundary */
{
.name = "sys",
.offset = 0,
.size = 2304 * 1056,/* 2304 pages (288blocks) * 1056 bytes = 0x252000 bytes*/
},
{
.name = "rootfs", /* 0x252000 */
.offset = MTDPART_OFS_NXTBLK,
.size = 3072 * 1056, /* 3072 pages (384 blocks) * 1056 bytes = 0x318000 bytes */
},
{
.name = "data", /* 0x56A000 */
.offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL,
}
};

if I type "cat /proc/mtd", I can see
mtd4: 00252000 00000420 "sys"
mtd5: 00318000 00000420 "rootfs"
mtd6: 002d6000 00000420 "data"

Then I mount the "data" drive by
mknod /dev/mtd6 c 90 12
mknod /dev/mtdblock6 b 31 6
flash_eraseall /dev/mtd6
mount -t jffs2 /dev/mtdblock6 /mnt/tmp

cp /tmp/file /mnt/tmp

kernel oops appear after a while.

kernel oops will not be appear if the file system is small.

Thanks so much for your kind attention.

ykhui


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron