From: Nancy <nancydreaming@gmail.com>
To: Hyphen79 <hyphen79@web.de>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Last sector of flash root partition will not be flashed
Date: Thu, 12 Jun 2008 21:20:34 +0800 [thread overview]
Message-ID: <bae050c10806120620q9682370s19515023f1eec00f@mail.gmail.com> (raw)
In-Reply-To: <4850F86D.90505@web.de>
On Thu, Jun 12, 2008 at 6:20 PM, Hyphen79 <hyphen79@web.de> wrote:
> Hello,
>
> the problem is, that the last sector of the mtd root partition
> (cramdisk) will not be flashed:
>
> mtdblock: write on "File System" at 0x1f5e00, size 0x200
> mtdblock: write on "File System" at 0x1f6000, size 0x200
> mtdblock: writing cached data for "File System" at 0x1f5000, size 0x1000
> mtdblock: write on "File System" at 0x1f6200, size 0x200
> mtdblock: write on "File System" at 0x1f6400, size 0x200
> mtdblock: write on "File System" at 0x1f6600, size 0x200
> mtdblock: write on "File System" at 0x1f6800, size 0x200
> mtdblock: write on "File System" at 0x1f6a00, size 0x200
> mtdblock: write on "File System" at 0x1f6c00, size 0x200
> mtdblock: write on "File System" at 0x1f6e00, size 0x200
>
> But the last call to "write_cached_data" will not be done - even not
> after an explicit "sync".
> For example: "mtdblock: writing cached data for "File System" at
> 0x1f6000, size 0x1000"
> Has anyone an idea?
You shoud umount it or write a program to flush the cache in mtdblock.c
For example:
/* flushcache.c */
#include <sys/ioctl.h>
#include <linux/fs.h>
#include <fcntl.h>
#include <stdio.h>
int main(int argc,char **argv)
{
int fd;
if( argc != 2 ){
printf( "Usage:%s device name(full path)\n", argv[0] );
return -1;
}
if( (fd = open( argv[1], O_RDONLY ) ) == -1) {
printf( "Open %s failed\n", argv[1] );
return -1;
}
if( ioctl( fd, BLKFLSBUF) == -1)
printf("flush catche failed\n");
close(fd);
return 0;
}
# cp ....; sync; flushcache /dev/mtdblockN
But why you use cramdisk as your rootfs ? Why do not use Nand awared
filesystem as its rootfs file system?
--
Best wishes,
Nancy
prev parent reply other threads:[~2008-06-12 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 10:20 Last sector of flash root partition will not be flashed Hyphen79
2008-06-12 13:20 ` Nancy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bae050c10806120620q9682370s19515023f1eec00f@mail.gmail.com \
--to=nancydreaming@gmail.com \
--cc=hyphen79@web.de \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox