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