This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UBI文件系统问题-AM335x

Other Parts Discussed in Thread: AM3359, OMAP-L138

我用的是AM3359处理器,把一个opt压缩文件拷到文件系统里面,解压缩之后出现这个问题:

opt/Qt4.8.1/lib/libQtGui.la
opt/Qt4.8.1/lib/libQtGui.so.4
opt/Qt4.8.1/lib/libQtGui.so.4.8.1
[ 112.087463] UBI error: ubi_io_write: error -5 while writing111 2048 bytes to PEB 1586:108544, written 0 bytes
[ 112.097991] UBI warning: ubi_eba_write_leb: failed to write data to PEB 1586
[ 112.105468] UBI: recover PEB 1586, move data to PEB 5531
[ 112.124694] UBI error: ubi_io_write: error -5 while writing111 512 bytes to PEB 5531:2048, written 0 bytes
[ 112.134918] UBI warning: recover_peb: failed to write to PEB 5531
[ 112.141326] UBI: try again
[ 112.144226] UBI: recover PEB 1586, move data to PEB 5532
[ 112.150512] UBI: run torture test for PEB 5531
[ 112.175964] UBI error: ubi_io_write: error -5 while writing111 512 bytes to PEB 5532:2048, written 0 bytes
[ 112.186187] UBI warning: recover_peb: failed to write to PEB 5532
[ 112.192626] UBI: try again
[ 112.195495] UBI: recover PEB 1586, move data to PEB 5533
[ 112.301269] UBI error: ubi_io_write: error -5 while writing111 131072 bytes to PEB 5531:0, written 0 bytes
[ 112.311523] UBI error: erase_worker: failed to erase PEB 5531, error -5
[ 112.318511] UBI: reserve more 1 PEBs
[ 112.322296] UBI: mark PEB 5531 as bad
[ 112.339813] UBI: 81 PEBs left in the reserve
[ 112.370269] UBI: run torture test for PEB 5532
[ 112.405151] UBI error: ubi_io_write: error -5 while writing111 106496 bytes to PEB 5533:4096, written 0 bytes
[ 112.415679] UBI warning: recover_peb: failed to write to PEB 5533
[ 112.422088] UBI: try again
[ 112.424987] UBI: recover PEB 1586, move data to PEB 5534
[ 112.443939] UBI error: ubi_io_write: error -5 while writing111 512 bytes to PEB 5534:2048, written 0 bytes
[ 112.454132] UBI warning: recover_peb: failed to write to PEB 5534
[ 112.460571] UBI warning: ubi_ro_mode: switch to read-only mode
[ 112.466766] UBIFS error (pid 865): ubifs_leb_write: writing 2048 bytes to LEB 1514:104448 failed, error -5
[ 112.476928] UBIFS warning (pid 865): ubifs_ro_mode: switched to read-only mode, error -5
[ 112.485473] Backtrace:
[ 112.488098] [<c0018a54>] (dump_backtrace+0x0/0x108) from [<c042ab4c>] (dump_stack+0x18/0x1c)
[ 112.497009] r6:00019800 r5:cf0a1000 r4:fffffffb
[ 112.501892] [<c042ab34>] (dump_stack+0x0/0x1c) from [<c017f634>] (ubifs_ro_mode+0x6c/0x78)
[ 112.510620] [<c017f5c8>] (ubifs_ro_mode+0x0/0x78) from [<c0180598>] (ubifs_leb_write+0xf8/0x1

求大神!!!

  • 请参考如下链接:

    http://www.linux-mtd.infradead.org/faq/ubi.html#L_subpage_verify_fail

    I get "ubi_io_write: error -5 while writing 512 bytes to PEB 5:512"

    If you have a 2048 bytes per NAND page device, and haveCONFIG_MTD_NAND_VERIFY_WRITE enabled in your kernel, you will need to turn it off. The code does not currently (as of 2.6.26) perform verification of sub-page writes correctly. As UBI is one of the few users of sub-page writes, not much else seems to be affected by this bug.

    建议找到uboot和内核中的CONFIG_MTD_NAND_VERIFY_WRITE 宏定义尝试注释后,看能否解决。

     

     

     

  • 都已经去注释掉了,还是不行

  • 我做的ubi.img怎么弄都不行,就不去弄了,改成内核烧写,步骤如下:

    flash_erase /dev/mtd7 0 0
    ubiattach /dev/ubi_ctrl -m 7 -O 2048
    ubimkvol /dev/ubi0 -N rootfs -s 500MiB
    mount -t ubifs ubi0_0 /mnt
    cd /mnt
    tar zxvf ../base-rootfs-am335x-evm.tar.gz
    cd ..
    umount /mnt
    halt

    在解压过程中也会报错:

    [ 109.827847] UBI error: ubi_io_write: error -5 while writing111 2048 bytes to PEB 177:71680, written 0 bytes
    [ 109.838236] UBI warning: ubi_eba_write_leb: failed to write data to PEB 177

    有时候还有这种错误:

    [ 108.396450] UBI error: ubi_io_write: error -5 while writing111 2048 bytes to PEB 343:0, written 0 bytes
    [ 108.406470] UBI error: erase_worker: failed to erase PEB 343, error -5
    [ 108.413354] UBI: reserve more 1 PEBs
    [ 108.417142] UBI: mark PEB 343 as bad
    [ 108.436947] UBI error: ubi_io_mark_bad: cannot mark PEB 343 bad, error -5
    [ 108.444154] UBI warning: ubi_ro_mode: switch to read-only mode
    [ 108.450357] UBI error: do_work: work failed with error code -5
    [ 108.456533] UBI error: ubi_thread: ubi_bgt0d: work failed with error code -5
    [ 108.509195] UBIFS: un-mount UBI device 0, volume 0
    [ 108.514949] UBIFS error (pid 976): ubifs_leb_write: writing 2048 bytes to LEB 1:8192 failed, error -30
    [ 108.524861] UBIFS warning (pid 976): ubifs_ro_mode: switched to read-only mode, error -30
    [ 108.533507] Backtrace:
    [ 108.536184] [<c0018a54>] (dump_backtrace+0x0/0x108) from [<c042a814>] (dump_stack+0x18/0x1c)
    [ 108.545083] r6:00002000 r5:cf3ad000 r4:ffffffe2
    [ 108.550010] [<c042a7fc>] (dump_stack+0x0/0x1c) from [<c017f630>] (ubifs_ro_mode+0x6c/0x78)
    [ 108.558756] [<c017f5c4>] (ubifs_ro_mode+0x0/0x78) from [<c0180594>] (ubifs_leb_write+0xf8/0x13c)
    [ 108.568029] r4:ffffffe2
    [ 108.570711] [<c018049c>] (ubifs_leb_write+0x0/0x13c) from [<c01806c4>] (ubifs_write_node+0xec/0x1d8)
    [ 108.580349] r7:00002000 r6:00000200 r5:00000001 r4:cf3ad000
    [ 108.586367] [<c01805d8>] (ubifs_write_node+0x0/0x1d8) from [<c018721c>] (ubifs_write_master+0xa4/0x13c)
    [ 108.596298] [<c0187178>] (ubifs_write_master+0x0/0x13c) from [<c017ace8>] (ubifs_put_super+0x174/0x2b8)
    [ 108.606214] r6:000001c8 r5:cf198b58 r4:cf198b30
    [ 108.611117] [<c017ab74>] (ubifs_put_super+0x0/0x2b8) from [<c00ae664>] (generic_shutdown_super+0x64/0xac)
    [ 108.621229] [<c00ae600>] (generic_shutdown_super+0x0/0xac) from [<c00ae738>] (kill_anon_super+0x18/0x24)
    [ 108.631242] r6:00000000 r5:c0666174 r4:00000013
    [ 108.636177] [<c00ae720>] (kill_anon_super+0x0/0x24) from [<c01796c4>] (kill_ubifs_super+0x18/0x24)
    [ 108.645625] r4:cf3ad000
    [ 108.648324] [<c01796ac>] (kill_ubifs_super+0x0/0x24) from [<c00ae9b8>] (deactivate_locked_super+0x48/0x70)
    [ 108.658512] r4:cf198200
    [ 108.661200] [<c00ae970>] (deactivate_locked_super+0x0/0x70) from [<c00af3e4>] (deactivate_super+0x6c/0x70)
    [ 108.671387] r5:cf198200 r4:cf198200
    [ 108.675182] [<c00af378>] (deactivate_super+0x0/0x70) from [<c00c667c>] (mntput_no_expire+0x60/0xb4)
    [ 108.684731] r4:cf2bb180
    [ 108.687428] [<c00c661c>] (mntput_no_expire+0x0/0xb4) from [<c00c7280>] (sys_umount+0x78/0x370)
    [ 108.696518] r5:cf2bb1a0 r4:cf2bb178
    [ 108.700329] [<c00c7208>] (sys_umount+0x0/0x370) from [<c0015100>] (ret_fast_syscall+0x0/0x30)
    [ 108.709322] Backtrace:
    [ 108.711919] [<c0018a54>] (dump_backtrace+0x0/0x108) from [<c042a814>] (dump_stack+0x18/0x1c)
    [ 108.720827] r6:00002000 r5:cf3ad000 r4:ffffffe2
    [ 108.725733] [<c042a7fc>] (dump_stack+0x0/0x1c) from [<c0180598>] (ubifs_leb_write+0xfc/0x13c)
    [ 108.734730] [<c018049c>] (ubifs_leb_write+0x0/0x13c) from [<c01806c4>] (ubifs_write_node+0xec/0x1d8)
    [ 108.744371] r7:00002000 r6:00000200 r5:00000001 r4:cf3ad000
    [ 108.750381] [<c01805d8>] (ubifs_write_node+0x0/0x1d8) from [<c018721c>] (ubifs_write_master+0xa4/0x13c)
    [ 108.760309] [<c0187178>] (ubifs_write_master+0x0/0x13c) from [<c017ace8>] (ubifs_put_super+0x174/0x2b8)
    [ 108.770222] r6:000001c8 r5:cf198b58 r4:cf198b30
    [ 108.775116] [<c017ab74>] (ubifs_put_super+0x0/0x2b8) from [<c00ae664>] (generic_shutdown_super+0x64/0xac)
    [ 108.785221] [<c00ae600>] (generic_shutdown_super+0x0/0xac) from [<c00ae738>] (kill_anon_super+0x18/0x24)
    [ 108.795227] r6:00000000 r5:c0666174 r4:00000013
    [ 108.800136] [<c00ae720>] (kill_anon_super+0x0/0x24) from [<c01796c4>] (kill_ubifs_super+0x18/0x24)
    [ 108.809596] r4:cf3ad000
    [ 108.812279] [<c01796ac>] (kill_ubifs_super+0x0/0x24) from [<c00ae9b8>] (deactivate_locked_super+0x48/0x70)
    [ 108.822471] r4:cf198200
    [ 108.825153] [<c00ae970>] (deactivate_locked_super+0x0/0x70) from [<c00af3e4>] (deactivate_super+0x6c/0x70)
    [ 108.835347] r5:cf198200 r4:cf198200
    [ 108.839149] [<c00af378>] (deactivate_super+0x0/0x70) from [<c00c667c>] (mntput_no_expire+0x60/0xb4)
    [ 108.848696] r4:cf2bb180
    [ 108.851378] [<c00c661c>] (mntput_no_expire+0x0/0xb4) from [<c00c7280>] (sys_umount+0x78/0x370)
    [ 108.860459] r5:cf2bb1a0 r4:cf2bb178
    [ 108.864248] [<c00c7208>] (sys_umount+0x0/0x370) from [<c0015100>] (ret_fast_syscall+0x0/0x30)
    [ 108.873685] UBIFS error (pid 976): ubifs_put_super: failed to write master node, error -30

    我用的内核是beaglebone的。版本3.2.0

  • 驱动当然加载了啊

  • 我用的nand 是K9K8G08U0B,会不会是这个问题,但是看了资料,没什么大区别啊

  • 你好,你的问题现在解决了吗?  我现在也遇到了同样的问题 !  寻求帮助

  • Jack,

    请问这个问题最终解决了么?

  • 你的问题解决了没?我遇到和你一样的问题了。我的处理器是OMAP-L138,内核为Linux-3.3。

    使用的是SPI NOR Flash,(w25q128),内核分区为/dev/mtd2,ubifs文件系统分区为/dev/mtd3。内核加载文件系统出息如下错误,怎么解决?

    你怎么解决的?