* [Buildroot] Writable EXT2 fs on dataflash (using MTD)
@ 2007-10-14 17:24 Jorge S.
2007-10-15 14:56 ` Jonathan Nalley
0 siblings, 1 reply; 4+ messages in thread
From: Jorge S. @ 2007-10-14 17:24 UTC (permalink / raw)
To: buildroot
Hi all,
I've created a rootfs for my AT91RM9200 based custom board and i'm unable to
mount the ext2 fs on a writable way.
I'm using an AT45DB64 spi dataflash as an MTD device and i've defined 3
partitions using this kernel bootargs:
console=/dev/ttyS0,115200 root=/dev/mtdblock2
mtdparts=AT45DB642.spi0:168960(boot)ro,2162688(kernel),-(rootfs)rw
rootfstype=ext2 mem=32M
After booting the kernel always says:
VFS: Mounted root (ext2 filesystem) readonly.
Even if i try a "mount -o remount,rw /" from the busybox shell, i get this
message:
mount: /dev/root is write-protected, mounting read-only
The "rootfs" partition is defined "writable" at the u-boot code, so i think
i can assume the flash is Unlocked.
Any ideas? Did i miss something when building the Rootfs? any option?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20071014/52f07f49/attachment.htm
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Writable EXT2 fs on dataflash (using MTD)
2007-10-14 17:24 [Buildroot] Writable EXT2 fs on dataflash (using MTD) Jorge S.
@ 2007-10-15 14:56 ` Jonathan Nalley
2007-10-15 16:14 ` Ulf Samuelsson
2007-10-15 21:44 ` Jorge S.
0 siblings, 2 replies; 4+ messages in thread
From: Jonathan Nalley @ 2007-10-15 14:56 UTC (permalink / raw)
To: buildroot
You can make sure that the flash is unlocked by running:
flash_unlock /dev/mtd/x
(Where /dev/mtd/x is the character device corresponding to the mtd in
question).
"flash_unlock" is part of the mtd tools and can be selected under package
selection in the buildroot.
You might have better luck using jffs2 instead of ext2. The jffs2 file
system is intended for MTD devices, and uses "wear-leveling" to distribute
writes over the entire flash part.
Regards,
Jon Nalley
On 10/14/07, Jorge S. <jorgesolla@gmail.com> wrote:
>
> Hi all,
>
> I've created a rootfs for my AT91RM9200 based custom board and i'm unable
> to mount the ext2 fs on a writable way.
>
> I'm using an AT45DB64 spi dataflash as an MTD device and i've defined 3
> partitions using this kernel bootargs:
>
> console=/dev/ttyS0,115200 root=/dev/mtdblock2 mtdparts=AT45DB642.spi0:168960(boot)ro,2162688(kernel),-(rootfs)rw
> rootfstype=ext2 mem=32M
>
> After booting the kernel always says:
>
> VFS: Mounted root (ext2 filesystem) readonly.
>
> Even if i try a "mount -o remount,rw /" from the busybox shell, i get this
> message:
>
> mount: /dev/root is write-protected, mounting read-only
>
> The "rootfs" partition is defined "writable" at the u-boot code, so i
> think i can assume the flash is Unlocked.
>
>
> Any ideas? Did i miss something when building the Rootfs? any option?
>
> Thanks in advance.
>
>
>
>
>
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20071015/5f0c5d54/attachment.htm
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Writable EXT2 fs on dataflash (using MTD)
2007-10-15 14:56 ` Jonathan Nalley
@ 2007-10-15 16:14 ` Ulf Samuelsson
2007-10-15 21:44 ` Jorge S.
1 sibling, 0 replies; 4+ messages in thread
From: Ulf Samuelsson @ 2007-10-15 16:14 UTC (permalink / raw)
To: buildroot
> You can make sure that the flash is unlocked by running:
>
> flash_unlock /dev/mtd/x
>
> (Where /dev/mtd/x is the character device corresponding to the mtd in
> question).
>
> "flash_unlock" is part of the mtd tools and can be selected under package
> selection in the buildroot.
>
> You might have better luck using jffs2 instead of ext2. The jffs2 file
> system is intended for MTD devices, and uses "wear-leveling" to distribute
> writes over the entire flash part.
>
Luck has nothing to do with it...
using EXT2 will wear out the dataflash in record time...
There is some support for Dataflash in buildroot, but you have to set the
page size to 0x420 and the erase size to 0x2100.
The sizes are by default, the sizes needed for par flash.
If you make menuconfig and save it before changing this,
then the page/erase size will not be changed automagically,
and you file system will be built in the wrong way.
I am thinking of changing this to
choice
config 4kB
config 1056 byte
config custom
endchoice
config jffs_page_size_custom
depends on custom
config jffs_page_size
string
"0x1000" if 4kB
"0x420" if 1056 byte
$(jffs_page_size_custom) if custom
Then changing the choice, will update the value
and let the user supply
> Regards,
>
> Jon Nalley
>
> On 10/14/07, Jorge S. <jorgesolla@gmail.com> wrote:
>>
>> Hi all,
>>
>> I've created a rootfs for my AT91RM9200 based custom board and i'm unable
>> to mount the ext2 fs on a writable way.
>>
>> I'm using an AT45DB64 spi dataflash as an MTD device and i've defined 3
>> partitions using this kernel bootargs:
>>
>> console=/dev/ttyS0,115200 root=/dev/mtdblock2
>> mtdparts=AT45DB642.spi0:168960(boot)ro,2162688(kernel),-(rootfs)rw
>> rootfstype=ext2 mem=32M
>>
>> After booting the kernel always says:
>>
>> VFS: Mounted root (ext2 filesystem) readonly.
>>
>> Even if i try a "mount -o remount,rw /" from the busybox shell, i get
>> this
>> message:
>>
>> mount: /dev/root is write-protected, mounting read-only
>>
>> The "rootfs" partition is defined "writable" at the u-boot code, so i
>> think i can assume the flash is Unlocked.
>>
>>
>> Any ideas? Did i miss something when building the Rootfs? any option?
>>
>> Thanks in advance.
>>
>>
>>
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] Writable EXT2 fs on dataflash (using MTD)
2007-10-15 14:56 ` Jonathan Nalley
2007-10-15 16:14 ` Ulf Samuelsson
@ 2007-10-15 21:44 ` Jorge S.
1 sibling, 0 replies; 4+ messages in thread
From: Jorge S. @ 2007-10-15 21:44 UTC (permalink / raw)
To: buildroot
I'm planning to use jffs2 on the final system, but now, just for testing,
i'm using EXT2 because buildroot failed when building the jffs rootfs.
My questions now are:
Is there any way to unlock the dataflash without using the "flash_unlock"
command? Maybe something from U-BOOT? Maybe some option on the Kernel?
If not... Wich is the "usual" way of doing things? Unprotect the flash and
remount writable the rootfs at boot time on some boot script?
As i understand, the dataflash will be still "locked" even if i use jffs2,
so this is not a FS type matter, is a "lock" matter. isn't it?
I think i'm going a little off-topic here, please accept my apologies, and
thanks in advance for your help.
2007/10/15, Jonathan Nalley <buildroot@bluebot.org>:
>
> You can make sure that the flash is unlocked by running:
>
> flash_unlock /dev/mtd/x
>
> (Where /dev/mtd/x is the character device corresponding to the mtd in
> question).
>
> "flash_unlock" is part of the mtd tools and can be selected under package
> selection in the buildroot.
>
> You might have better luck using jffs2 instead of ext2. The jffs2 file
> system is intended for MTD devices, and uses "wear-leveling" to distribute
> writes over the entire flash part.
>
> Regards,
>
> Jon Nalley
>
> On 10/14/07, Jorge S. <jorgesolla@gmail.com> wrote:
>
> > Hi all,
> >
> > I've created a rootfs for my AT91RM9200 based custom board and i'm
> > unable to mount the ext2 fs on a writable way.
> >
> > I'm using an AT45DB64 spi dataflash as an MTD device and i've defined 3
> > partitions using this kernel bootargs:
> >
> > console=/dev/ttyS0,115200 root=/dev/mtdblock2 mtdparts=AT45DB642.spi0:168960(boot)ro,2162688(kernel),-(rootfs)rw
> > rootfstype=ext2 mem=32M
> >
> > After booting the kernel always says:
> >
> > VFS: Mounted root (ext2 filesystem) readonly.
> >
> > Even if i try a "mount -o remount,rw /" from the busybox shell, i get
> > this message:
> >
> > mount: /dev/root is write-protected, mounting read-only
> >
> > The "rootfs" partition is defined "writable" at the u-boot code, so i
> > think i can assume the flash is Unlocked.
> >
> >
> > Any ideas? Did i miss something when building the Rootfs? any option?
> >
> > Thanks in advance.
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at uclibc.org
> > http://busybox.net/mailman/listinfo/buildroot
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20071015/d3aa5ed4/attachment-0001.htm
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-15 21:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-14 17:24 [Buildroot] Writable EXT2 fs on dataflash (using MTD) Jorge S.
2007-10-15 14:56 ` Jonathan Nalley
2007-10-15 16:14 ` Ulf Samuelsson
2007-10-15 21:44 ` Jorge S.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox