[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Writing in flash from bootloader
I'm working on a fail safe bootloader. It will among other
things start a backup kernel if the first one crashes during
boot.(With help from the watchdog.)
I've made some changes in the partition layout so it looks
0x0 to 0x10000 - rescue (as normal)
0x10000 to 0x14000 - boot loader
0x14000 to 0x20000 - data partition
0x20000 to end - JFFS partition.
Now my problem is, how can I save data in this "data partition"
from my boot loader? To me, it seems like changes always vanish
after some time.(I change some data in my boot loader and when I
look at it when linux is running, no changes are there.)
Do I have to do something special for writing to flash memory?
Also now at start up it complains:
Found valid partition table at 0x5001000A-0x50010076.
/dev/flash1 at 0x10000, size 0x4000
/dev/flash2 at 0x14000, size 0xc000
/dev/flash3 at 0x20000, size 0x1d0000
mtd: partition "part1" doesn't end on an erase block -- force read-only
mtd: partition "part2" doesn't start on an erase block boundary -- force
Is there some work around for beeing able to write to /dev/flash2?
Jonas Aaberg Email: firstname.lastname@example.org
Supercomputing Systems AG Web: http://www.scs.ch
Technoparkstrasse 1 Phone: +41 (0) 1 445 16 00
CH-8005 Zuerich Fax: +41 (0) 1 445 16 10