Chime in easily!

I have made my flash_eraseall use mtd-snapshot-20050217 and mips-linux-gcc
cross compiler, but I got this error message as below:
=========
# ./flash_eraseall /dev/mtd2
MTD_open
MTD_ioctl
MTD_ioctl
Invalid ioctl 80084d0b (MEMGETINFO = 40204d01)

./flash_eraseall /dev/mtd2: MTD get bad block failed: Inappropriate ioctl
for device
=========
I don't know how to fix it.



2007/3/22, Aubrey Li <[EMAIL PROTECTED]>:

On 3/22/07, Yue Han <[EMAIL PROTECTED]> wrote:
> Greetings
> My question as the subject.
>
> Here is the course what give me the question.
>
> When is use my jffs2 fs, the console  always tell me:
> ========
>     jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at
0x000e0000:
> 0x0101 instead
>     JFFS2: Erase block at 0x000e0000 is not formatted. It will be erased
> ========
> As the result, my flash cann't do any write command at all:
> ========
>     Last[2] is 1, datum is 85
>     Write clean marker to block at 0x000e0000 failed: -5
> ========
>
> My jffs2.img about 14 blocks(64K), it is 0xe0000 in to HEX.
> I's using 4M norflash, BASE_ADDRESS is 0xbfc00000.
> I'll put the jffs2.img to 0x40000.
> For test, I only give the os(mtd1) one block free space.
> So the mtd1 has 14+1 blocks.(0xf0000).
>
> The console information as below:
> =========
>     number of CFI chips: 1
>     Creating 3 MTD partitions on "Flash":
>     0x00000000-0x00040000 : "Bootloader"
>     mtd: Giving out device 0 to Bootloader
>     0x00040000-0x00130000 : "os"
>     mtd: Giving out device 1 to os
>     0x00130000-0x00400000 : "bkup"
> =========
>
> I dumped the flash at block 0xd0000:(0xbfcd10000 == 0xbfc00000 + 0x40000
+
> 0xd0000 , means this block has my jffs2.img )
>
>                             Memory Dump Result
>
==============================================================================
> 0xbfd10000 : 19 85 20 03 00 00 00 0c f0 60 dc 98 19 85 e0 02
> 0xbfd10010 : 00 00 06 80 6e bc 83 11 00 00 00 2c 00 00 00 08
> 0xbfd10020 : 00 00 81 ed 00 00 00 00 00 00 72 5c 45 b2 40 58
> 0xbfd10030 : 45 b2 40 58 45 b2 40 58 00 00 69 c4 00 00 06 3c
> 0xbfd10040 : 00 00 06 3c 00 00 00 00 d4 fd e1 04 d4 b0 ad b4
> 0xbfd10050 : 8c 21 ba 16 a9 02 e4 a1 7f 6e 48 b9 2b 82 ea dd
> 0xbfd10060 : 48 34 5a 18 d5 7a 54 89 0f ce 77 75 e5 67 95 cc
> 0xbfd10070 : 88 9f ec d4 b0 c7 9e e1 59 a9 66 6c 7c 56 c2 55
> 0xbfd10080 : 84 4d ee ae b8 41 a8 ed 28 a7 35 41 32 0b 9b 66
> 0xbfd10090 : 70 66 bb 2b a5 e2 c7 e0 2b f8 d8 be 52 e9 ee 62
> 0xbfd100a0 : 69 7f 71 df 81 42 e9 9e 89 fd 77 ef 29 e1 da 75
> 0xbfd100b0 : ad 59 db c9 c7 ed 9d 74 4e 5a 47 90 ec fb 7f 4c
> 0xbfd100c0 : aa 65 fe 89 ae 96 4a e2 c8 4f 9b b0 d6 5a e6 77
> 0xbfd100d0 : 7b af f5 f5 86 68 90 cc 44 ab ee a6 0a 72 5f bf
> 0xbfd100e0 : 3d e8 9f ed 03 5f 03 d7 b6 6c da bc e5 86 5f bb
> 0xbfd100f0 : 71 70 28 f7 eb 37 6d bd f9 96 e1 5b 7f e3 43 1f
>
==============================================================================
>
> then I dumped 0xe0000 where the error message placed:(0xbfd20000 ==
> 0xbfc00000 + 0x40000 + 0xe0000)
>
>                             Memory Dump Result
>
==============================================================================
> 0xbfd20000 : 01 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20010 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20020 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20030 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20040 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20050 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20060 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20070 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20080 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd20090 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd200a0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd200b0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd200c0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd200d0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd200e0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0xbfd200f0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>
==============================================================================
>
> DOSE the bit mask error(0x1985) is the primary criminal who caused my
jffs2
> fs can't write?
>
> Is anyone can give me some advice? I am gonna crazy about this!!!
>

You jffs2 partition should be erased firstly.

-Aubrey
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to