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.

DM385 UBIFS ECC错误



各位专家好:

 我们使用DM385 IPNC3.5,目前把内核和文件系统通过tftp烧录到flash(flash型号:MT29F2G16ABBEA4),出现ECC错误,在制作ubifs的过程中也遇到了一些问题,描述如下,希望各位能抽空看看,谢谢!

1.make ubifs出错,生成不了镜像
tfh@hh:~/work/dm385/Source/ipnc_rdk$ make ubifs
mkdir -p /home/tfh/work/dm385/Source/ipnc_rdk/../ipnc_rdk/tmp
/home/tfh/work/dm385/Source/ipnc_rdk/../ipnc_rdk/target/mtd-utils/32bit/mkfs.ubifs -r /home/tfh/work/dm385/Source/ipnc_rdk/../ipnc_rdk/target/filesys -F -o ./tmp/ubifs.img -m 2048 -e 126976 -c 827
/home/tfh/work/dm385/Source/ipnc_rdk/../ipnc_rdk/target/mtd-utils/32bit/mkfs.ubifs: error while loading shared libraries: liblzo2.so.2: cannot open shared object file: No such file or directory
make: *** [ubifs] Error 127

MTD_UTILS_MODE设置成32位和64位都出现编译错误,
后来从网上下载了ubifs的相关文件,编译了一下,生成了mkfs.ubifs和ubinize,用这2个文件替换ipnc3.5对应的文件,编译通过了。

 2.启动参数设置
setenv bootargs 'console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=4,2048 noinitrd rootfstype=ubifs rootwait=1 mem=80M pcie_mem=8M vram=4M notifyk.vpssm3_sva=0xBFD00000 cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1'

 3.启动内核出现ECC校验错误
Loading from NAND 256MiB 1,8V 16-bit, offset 0x280000
   Image Name:   Linux-2.6.37_DM385_IPNC_3.50.00
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2366268 Bytes = 2.3 MiB
   Load Address: 80008000
   Entry Point:  80008000

## Booting kernel from Legacy Image at 80007fc0 ...
   Image Name:   Linux-2.6.37_DM385_IPNC_3.50.00
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2366268 Bytes = 2.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.37_DM385_IPNC_3.50.00 (tfh@hh) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #285 Thu Feb 25 19:23:55 CST 2016
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: dm385ipnc
DM81xx PCIe EP memory  size = 8388608 
vram size = 4194304 at 0x0
ti81xx_reserve: ### Reserved DDR region @84f00000
reserved size = 4194304 at 0x0
FB: Reserving 4194304 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP chip is DM385 1.0
SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16992
Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=4,2048 noinitrd rootfstype=ubifs rootwait=1 mem=80M pcie_mem=8M vram=4M notifyk.vpssm3_sva=0xBFD00000 cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 66MB 1MB = 67MB total
Memory: 62708k/62708k available, 19212k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc5800000 - 0xf8000000   ( 808 MB)
    lowmem  : 0xc0000000 - 0xc5000000   (  80 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc003c000   ( 208 kB)
      .text : 0xc003c000 - 0xc0483000   (4380 kB)
      .data : 0xc0484000 - 0xc04c2880   ( 251 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:375
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
GPMC revision 6.0
Trying to install interrupt handler for IRQ368
Trying to install interrupt handler for IRQ369
Trying to install interrupt handler for IRQ370
Trying to install interrupt handler for IRQ371
Trying to install interrupt handler for IRQ372
Trying to install interrupt handler for IRQ373
Trying to install interrupt handler for IRQ374
Trying to install type control for IRQ375
Trying to set irq flags for IRQ375
OMAP clockevent source: GPTIMER1 at 20000000 Hz
Console: colour dummy device 80x30 
Calibrating delay loop... 599.65 BogoMIPS (lpj=2998272)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
TI81XX: Map 0x84f00000 to 0xfe500000 for dram barrier
TI81XX: Map 0x40300000 to 0xfe600000 for sram barrier
omap_voltage_early_init: voltage driver support not added
regulator: core version 0.5
regulator: dummy: 
NET: Registered protocol family 16
omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
omap_voltage_add_dev: VDD specified does not exist!
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
i2c-core: driver [dummy] registered
omap_mux_init: Add partition: #1: core, flags: 4
_omap_mux_get_by_name: Could not find signal dcan0_tx.dcan0_tx
_omap_mux_get_by_name: Could not find signal dcan0_rx.dcan0_rx
Cannot clk_get ck_32
Debugfs: Only enabling/disabling deep sleep and wakeup timer is supported now
registered ti81xx_vpss device
==============> cpu is ti814X 
registered ti81xx_vin device
PWM0 init success.
PWM1 init success.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource gp timer
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
PMU: registered new PMU device of type 0
omap-iommu omap-iommu.0: ducati registered
omap-iommu omap-iommu.1: sys registered
JFFS2 version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 122
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
CMEMK module: built on Jan 13 2016 at 01:15:53
  Reference Linux version 2.6.37
  File /home/tfh/work/dm385/Source/ti_tools/linuxutils_3_23_00_01/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
==> CMEM get address 0x85000000 0x89000000 
allocated heap buffer 0xc7000000 of size 0x4000000
cmemk initialized
brd: module loaded
loop: module loaded
omap2-nand driver initializing
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron )
Creating 8 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000020000 : "U-Boot-min"
0x000000020000-0x000000260000 : "U-Boot"
0x000000260000-0x000000280000 : "U-Boot Env"
0x000000280000-0x0000006c0000 : "Kernel"
0x0000006c0000-0x000006fc0000 : "File System"
0x000006fc0000-0x000007bc0000 : "Data"
0x000007bc0000-0x00000b0c0000 : "File System2"
0x00000b0c0000-0x000010000000 : "Reserved"
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       3
UBI error: ubi_io_read: error -74 (ECC error) while reading 22528 bytes from PEB 839:4096, read 22528 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 22528 bytes from PEB 838:4096, read 22528 bytes
UBI: attached mtd4 to ubi0
UBI: MTD device name:            "File System"
UBI: MTD device size:            105 MiB
UBI: number of good PEBs:        840
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 840
UBI: number of PEBs reserved for bad PEB handling: 8
UBI: max/mean erase counter: 4/0
UBI: image sequence number:  1690735961
UBI: background thread "ubi_bgt0d" started, PID 39
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
i2c-core: driver [dev_driver] registered
Linux video capture interface: v2.00
UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 838:4096, read 126976 bytes
UBI warning: ubi_eba_copy_leb: error -74 while reading data from PEB 838
UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 839:4096, read 126976 bytes
UBI warning: ubi_eba_copy_leb: error -74 while reading data from PEB 839
OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
notify_shm_drv: no DSP present (MULTIPROC_INVALIDID)
=========> GET id 1 line 428 address 0x0  
notify_init : notify drivercreated  for  remote proc id 1 at physical Address 0xbfd00000
i2c-core: driver [tlv320aic3x-codec] registered
asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
ALSA device list:
  #0: TI81XX EVM
nf_conntrack version 0.5.0 (979 buckets, 3916 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
Bridge firewalling registered
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_voltage_late_init: Voltage driver support not added
Power Management for TI81XX.
Detected MACID=c4:ed:ba:ba:c4:14
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
UBI error: ubi_io_read: error -74 (ECC error) while reading 4096 bytes from PEB 837:4096, read 4096 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 3:4096, read 126976 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 4:4096, read 126976 bytes
UBIFS: start fixing up free space
UBI error: ubi_io_read: error -74 (ECC error) while reading 2048 bytes from PEB 3:4096, read 2048 bytes
UBIFS error (pid 1): ubifs_leb_read: reading 2048 bytes from LEB 1:0 failed, error -74
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00             128 mtdblock0  (driver?)
1f01            2304 mtdblock1  (driver?)
1f02             128 mtdblock2  (driver?)
1f03            4352 mtdblock3  (driver?)
1f04          107520 mtdblock4  (driver?)
1f05           12288 mtdblock5  (driver?)
1f06           54272 mtdblock6  (driver?)
1f07           81152 mtdblock7  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Backtrace: 
[<c0049f70>] (dump_backtrace+0x0/0x110) from [<c0364238>] (dump_stack+0x18/0x1c)
 r6:00008000 r5:c3c15000 r4:c04c3398 r3:60000013
[<c0364220>] (dump_stack+0x0/0x1c) from [<c0364298>] (panic+0x5c/0x178)
[<c036423c>] (panic+0x0/0x178) from [<c0009184>] (mount_block_root+0x1c4/0x204)
 r3:00000000 r2:00000000 r1:c3c25f78 r0:c0414a15
 r7:c002bbec
[<c0008fc0>] (mount_block_root+0x0/0x204) from [<c000940c>] (prepare_namespace+0x94/0x1cc)
[<c0009378>] (prepare_namespace+0x0/0x1cc) from [<c0008d70>] (kernel_init+0x114/0x154)
 r5:c002b1b4 r4:c002b1b4
[<c0008c5c>] (kernel_init+0x0/0x154) from [<c0070fd0>] (do_exit+0x0/0x5d0)
 r5:c0008c5c r4:00000000