Forum Discussion
Altera_Forum
Honored Contributor
15 years agoCan't mount JFFS2
Hi,
I was trying to implement the JFFS2. So first I added the MTD as mentioned in this article: http://www.alterawiki.com/wiki/mtd Here is my output on booting:physmap platform flash device: 00800000 at 02800000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Using physmap partition information
Creating 4 MTD partitions on "physmap-flash.0":
0x000000200000-0x000000600000 : "romfs/jffs2"
0x000000000000-0x000000200000 : "loader/kernel"
0x000000600000-0x000000700000 : "User configuration"
0x000000700000-0x000000800000 : "safe configuration"
The key data of my board: - Cyclone I Board (NOMMU)
- 8 MB CFI-Flash named "parallel flash" in SOPC-Builder
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00380000: 0x0101 instead
...
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 57, bad_blocks 0, c->nr_blocks 64
mount: mounting /dev/mtdblock0 on /mnt failed: Input/output error
Urmel3 Replies
- Altera_Forum
Honored Contributor
EDIT:
I solved the first question, but still got problems. See next post. Urmel - Altera_Forum
Honored Contributor
Hi,
there are still some things which confuse me. When I try to execute "flash_eraseall -j /dev/mtd3" I get the error "Permission denied" Here are my mtd partitions:
The other partitions mtdblock0 to mtdblock2 can be erased and mounted successfully but not mtdblock3. Urmeldev: size erasesize name mtd0: 00400000 00010000 "romfs/jffs2" mtd1: 00200000 00010000 "loader/kernel" mtd2: 00100000 00010000 "User configuration" mtd3: 00100000 00010000 "safe configuration" - Altera_Forum
Honored Contributor
Hi (probably only to myself ;) ),
I found the solution for the problem why I couldn't mount and erase the fourth mtd partition. I used the example in config.c where the last one "safe configuration" used the mask_flags "MTD_WRITEABLE" which means weirdly the opposite. So it only accepts reading. So if I want to first create the partition I have to comment out that line and when I have my file on it just change it to MTD_WRITEABLE again. I hope it becomes handy for someone. So my monologue had a meaning :) Urmel