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.

AM335X UBI FS: saw many 'UBI: scrubbed PEB xx (LEB 0:yy), data moved to PEB z" and "UBI: run torture test for PEB xxx"

Other Parts Discussed in Thread: DM385, TPS65910, DA8XX, TMP275

I just started using UBI FS on my AM335x EVM. I followed http://processors.wiki.ti.com/index.php/UBIFS_Support to generate ubi.img and flash the FS to NAND.

EVM booted up OK but I saw many UBI related kernel printouts during kernel bootup (see bootup log below). Do they indicate any problem? I didn't see these printouts using UBIFS on DM385 EVM uisng UBIFS.

Thanks,

Bin

######## kernel bootup log ##########

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 3.2.0 (a0270765@uda0270765-ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Wed May 9 10:57:58 EDT 2012
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES1.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 30480
[    0.000000] Kernel command line: mem=120M console=ttyO0,115200n8 noinitrd rootwait=1 rw ubi.mtd=7,2048 rootfstype=ubifs root=ubi0:rootfs init=/init ip=dhcp
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 120MB = 120MB total
[    0.000000] Memory: 115360k/115360k available, 7520k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8000000 - 0xff000000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc7800000   ( 120 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc057c000   (5584 kB)
[    0.000000]       .init : 0xc057c000 - 0xc05b9000   ( 244 kB)
[    0.000000]       .data : 0xc05ba000 - 0xc0617fc0   ( 376 kB)
[    0.000000]        .bss : 0xc0617fe4 - 0xc0644d64   ( 180 kB)
[    0.000000] NR_IRQS:396
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[    0.000000] Console: colour dummy device 80x30
[    0.000152] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
[    0.058929] pid_max: default: 32768 minimum: 301
[    0.059051] Security Framework initialized
[    0.059143] Mount-cache hash table entries: 512
[    0.059539] CPU: Testing write buffer coherency: ok
[    0.079498] omap_hwmod: gfx: failed to hardreset
[    0.095733] omap_hwmod: pruss: failed to hardreset
[    0.096832] print_constraints: dummy:
[    0.097198] NET: Registered protocol family 16
[    0.099334] OMAP GPIO hardware version 0.1
[    0.101928] omap_mux_init: Add partition: #1: core, flags: 0
[    0.104095]  omap_i2c.1: alias fck already exists
[    0.104980]  omap2_mcspi.1: alias fck already exists
[    0.105194]  omap2_mcspi.2: alias fck already exists
[    0.105468]  edma.0: alias fck already exists
[    0.105468]  edma.0: alias fck already exists
[    0.105499]  edma.0: alias fck already exists
[    0.130126] bio: create slab <bio-0> at 0
[    0.132324] SCSI subsystem initialized
[    0.133911] usbcore: registered new interface driver usbfs
[    0.134216] usbcore: registered new interface driver hub
[    0.134399] usbcore: registered new device driver usb
[    0.134704] registerd cppi-dma Intr @ IRQ 17
[    0.134704] Cppi41 Init Done Qmgr-base(c803a000) dma-base(c8038000)
[    0.134735] Cppi41 Init Done
[    0.134765] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.135070] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.136169] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.138000] tps65910 1-002d: JTAGREVNUM 0x0
[    0.140411] print_constraints: VRTC:
[    0.141876] print_constraints: VIO: at 1800 mV
[    0.144165] print_constraints: VDD1: 600 <--> 1500 mV at 1262 mV normal
[    0.146453] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
[    0.147430] print_constraints: VDD3: 5000 mV
[    0.148834] print_constraints: VDIG1: at 1800 mV
[    0.150299] print_constraints: VDIG2: at 1800 mV
[    0.151702] print_constraints: VPLL: at 1800 mV
[    0.153137] print_constraints: VDAC: at 1800 mV
[    0.154541] print_constraints: VAUX1: at 1800 mV
[    0.155975] print_constraints: VAUX2: at 3300 mV
[    0.157379] print_constraints: VAUX33: at 3300 mV
[    0.158813] print_constraints: VMMC: at 3300 mV
[    0.159332] tps65910 1-002d: No interrupt support, no core IRQ
[    0.160217] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.161376] Switching to clocksource gp timer
[    0.176757] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.176940] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[    0.178100] musb-hdrc musb-hdrc.0: USB OTG mode controller at c801c000 using DMA, IRQ 18
[    0.178283] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[    0.178955] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.179077] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    0.179199] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.179229] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.179229] usb usb1: Product: MUSB HDRC host driver
[    0.179229] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[    0.179260] usb usb1: SerialNumber: musb-hdrc.1
[    0.180023] hub 1-0:1.0: USB hub found
[    0.180053] hub 1-0:1.0: 1 port detected
[    0.180572] musb-hdrc musb-hdrc.1: USB Host mode controller at c801e800 using DMA, IRQ 19
[    0.180999] NET: Registered protocol family 2
[    0.181213] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.181579] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.181671] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.181732] TCP: Hash tables configured (established 4096 bind 4096)
[    0.181762] TCP reno registered
[    0.181762] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.181793] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.181976] NET: Registered protocol family 1
[    0.182220] RPC: Registered named UNIX socket transport module.
[    0.182250] RPC: Registered udp transport module.
[    0.182250] RPC: Registered tcp transport module.
[    0.182250] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.182525] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.189697] VFS: Disk quotas dquot_6.5.2
[    0.189758] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.190307] msgmni has been set to 225
[    0.191070] io scheduler noop registered
[    0.191101] io scheduler deadline registered
[    0.191162] io scheduler cfq registered (default)
[    0.195007] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    0.819427] console [ttyO0] enabled
[    0.823699] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.831512] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.839324] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    0.847106] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    0.854888] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    0.871948] brd: module loaded
[    0.880065] loop: module loaded
[    0.883575] i2c-core: driver [tsl2550] using legacy suspend method
[    0.890014] i2c-core: driver [tsl2550] using legacy resume method
[    0.896453] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    0.910369] Detected a daughter card on AM335x EVM..
[    0.915374] Unknown CPLD version found, falling back to 1.0A
[    0.921478] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    0.936645] Board name: A33515BB
[    0.940032] Board version: 1.0D
[    0.943298] SKU: SKU#01
[    0.945983] The board is general purpose EVM in profile 0
[    0.952117]  da8xx_lcdc.0: alias fck already exists
[    0.957733] da8xx_lcdc da8xx_lcdc.0: GLCD: Found TFC_S9700RTWV35TR_01B panel
[    0.981323] Console: switching to colour frame buffer device 100x30
[    0.996765] TSC connected to alpha GP EVM
[    1.002319] omap-gpmc omap-gpmc: GPMC revision 6.0
[    1.007324] Registering NAND on CS0
[    1.011657]  omap_i2c.2: alias fck already exists
[    1.016967] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz
[    1.023620] tsl2550 2-0039: standard operating mode
[    1.029571]  davinci-mcasp.1: alias fck already exists
[    1.035430]  omap_hsmmc.0: alias fck already exists
[    1.040802]  omap_hsmmc.2: alias fck already exists
[    1.046356] Configure Bluetooth Enable pin...
[    1.052185] _regulator_get: 2-0018 supply Vdd not found, using dummy regulator
[    1.059783] _regulator_get: 2-0018 supply Vdd_IO not found, using dummy regulator
[    1.088256] lis3lv02d: 8 bits 3DLH sensor found
[    1.182373] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input0
[    1.193237] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.200500] omap2-nand driver initializing
[    1.205139] ONFI flash detected
[    1.208526] ONFI param page 0 valid
[    1.212188] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP)
[    1.220764] Creating 8 MTD partitions on "omap2-nand.0":
[    1.226348] 0x000000000000-0x000000020000 : "SPL"
[    1.232818] 0x000000020000-0x000000040000 : "SPL.backup1"
[    1.239746] 0x000000040000-0x000000060000 : "SPL.backup2"
[    1.246673] 0x000000060000-0x000000080000 : "SPL.backup3"
[    1.253570] 0x000000080000-0x000000260000 : "U-Boot"
[    1.260681] 0x000000260000-0x000000280000 : "U-Boot Env"
[    1.267547] 0x000000280000-0x000000780000 : "Kernel"
[    1.276092] 0x000000780000-0x000010000000 : "File System"
[    1.386108] OneNAND driver initializing
[    1.390808] UBI: attaching mtd7 to ubi0
[    1.394866] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    1.401397] UBI: logical eraseblock size:    126976 bytes
[    1.407043] UBI: smallest flash I/O unit:    2048
[    1.411926] UBI: sub-page size:              512
[    1.416748] UBI: VID header offset:          2048 (aligned 2048)
[    1.423004] UBI: data offset:                4096
[    3.537536] UBI: max. sequence number:       99
[    3.557556] UBI: attached mtd7 to ubi0
[    3.561492] UBI: MTD device name:            "File System"
[    3.567260] UBI: MTD device size:            248 MiB
[    3.572448] UBI: number of good PEBs:        1987
[    3.577362] UBI: number of bad PEBs:         1
[    3.581970] UBI: number of corrupted PEBs:   0
[    3.586608] UBI: max. allowed volumes:       128
[    3.591430] UBI: wear-leveling threshold:    4096
[    3.596343] UBI: number of internal volumes: 1
[    3.600952] UBI: number of user volumes:     1
[    3.605590] UBI: available PEBs:             0
[    3.610229] UBI: total number of reserved PEBs: 1987
[    3.615417] UBI: number of PEBs reserved for bad PEB handling: 19
[    3.621765] UBI: max/mean erase counter: 25/0
[    3.626312] UBI: image sequence number:  1364140599
[    3.631530] UBI: background thread "ubi_bgt0d" started, PID 570
[    3.638397] CAN device driver interface
[    3.642395] CAN bus driver for Bosch D_CAN controller 1.0
[    3.692047] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[    3.698486] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[    3.705718] davinci_mdio.0: probed
[    3.709259] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
[    3.716979] usbcore: registered new interface driver zd1201
[    3.723022] usbcore: registered new interface driver cdc_ether
[    3.729248] usbcore: registered new interface driver cdc_eem
[    3.735321] usbcore: registered new interface driver dm9601
[    3.741180] cdc_ncm: 04-Aug-2011
[    3.744720] usbcore: registered new interface driver cdc_ncm
[    3.750610] Initializing USB Mass Storage driver...
[    3.755950] usbcore: registered new interface driver usb-storage
[    3.762237] USB Mass Storage support registered.
[    3.767517] mousedev: PS/2 mouse device common for all mice
[    3.774322] input: matrix-keypad as /devices/platform/matrix-keypad/input/input1
[    3.783416] input: ti-tsc-adcc as /devices/platform/omap/tsc/input/input2
[    3.791534] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
[    3.798248] omap_rtc: already running
[    3.802246] i2c /dev entries driver
[    3.806488] Linux video capture interface: v2.00
[    3.811645] usbcore: registered new interface driver uvcvideo
[    3.817657] USB Video Class driver (1.1.1)
[    3.822845] lm75 2-0048: hwmon0: sensor 'tmp275'
[    3.830474] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    3.839019] cpuidle: using governor ladder
[    3.843811] cpuidle: using governor menu
[    3.853668] usbcore: registered new interface driver usbhid
[    3.859497] usbhid: USB HID core driver
[    3.864349] usbcore: registered new interface driver snd-usb-audio
[    3.872741] _regulator_get: 2-001b supply IOVDD not found, using dummy regulator
[    3.880493] _regulator_get: 2-001b supply DVDD not found, using dummy regulator
[    3.888214] _regulator_get: 2-001b supply AVDD not found, using dummy regulator
[    3.895904] _regulator_get: 2-001b supply DRVDD not found, using dummy regulator
[    3.906494] asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
[    3.914306] ALSA device list:
[    3.917449]   #0: AM335X EVM
[    3.920471] oprofile: hardware counters not available
[    3.925750] oprofile: using timer interrupt.
[    3.930236] nf_conntrack version 0.5.0 (1802 buckets, 7208 max)
[    3.936859] ip_tables: (C) 2000-2006 Netfilter Core Team
[    3.942565] TCP cubic registered
[    3.945922] NET: Registered protocol family 17
[    3.950561] can: controller area network core (rev 20090105 abi 8)
[    3.957122] NET: Registered protocol family 29
[    3.961761] can: raw protocol (rev 20090105)
[    3.966217] can: broadcast manager protocol (rev 20090105 t)
[    3.972198] Registering the dns_resolver key type
[    3.977203] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    3.985198] ThumbEE CPU extension supported.
[    3.989715] mux: Failed to setup hwmod io irq -22
[    3.995300] Power Management for AM33XX family
[    4.000122] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[    4.006805] Copied the M3 firmware to UMEM
[    4.011108] omap_hwmod: wkup_m3: wkup_m3: hwmod data error: OMAP4 does not support st_shift
[    4.028381] clock: disabling unused clocks to save power
[    4.036102] Detected MACID=40:5f:c2:8b:d6:b6
[    4.045867] input: gpio-keys as /devices/platform/gpio-keys/input/input3
[    4.053558] omap_rtc omap_rtc: setting system clock to 2012-04-11 08:31:59 UTC (1334133119)
[    4.064941]
[    4.064941] CPSW phy found : id is : 0x4dd074
[    4.071777] PHY 0:01 not found
[    4.125091] mmc0: new SDHC card at address e624
[    4.130523] mmcblk0: mmc0:e624 SD04G 3.69 GiB
[    4.140228]  mmcblk0: p1 p2
[    6.063293] PHY: 0:00 - Link is Up - 100/Half
[    6.092620] Sending DHCP requests ., OK
[    6.113067] IP-Config: Got DHCP answer from 0.0.0.0, my address is 158.218.104.196
[    6.121398] IP-Config: Complete:
[    6.124786]      device=eth0, addr=158.218.104.196, mask=255.255.255.0, gw=158.218.104.1,
[    6.133087]      host=158.218.104.196, domain=am.dhcp.ti.com, nis-domain=(none),
[    6.140808]      bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
[    6.253448] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    6.259735] UBIFS: file system size:   199225344 bytes (194556 KiB, 189 MiB, 1569 LEBs)
[    6.268127] UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
[    6.275756] UBIFS: media format:       w4/r0 (latest is w4/r0)
[    6.281829] UBIFS: default compressor: lzo
[    6.286102] UBIFS: reserved for root:  0 bytes (0 KiB)
[    6.293670] VFS: Mounted root (ubifs filesystem) on device 0:13.
[    6.300354] Freeing init memory: 244K
[    6.304779] Failed to execute /init.  Attempting defaults...
INIT: version 2.86 booting
[    6.667297] UBI: scrubbed PEB 23 (LEB 0:21), data moved to PEB 680
[    6.835296] UBI: run torture test for PEB 162
[    7.162445] UBI: PEB 162 passed torture test, do not mark it as bad
[    7.302917] UBI: run torture test for PEB 162
[    7.629150] UBI: PEB 162 passed torture test, do not mark it as bad
[    7.753234] UBI: run torture test for PEB 162
[    8.079589] UBI: PEB 162 passed torture test, do not mark it as bad
[    8.219238] UBI: scrubbed PEB 666 (LEB 0:23), data moved to PEB 162
[    8.397125] UBI: scrubbed PEB 682 (LEB 0:116), data moved to PEB 666
[    8.533630] UBI: run torture test for PEB 682
[    8.863555] UBI: PEB 682 passed torture test, do not mark it as bad
[    9.007232] UBI: run torture test for PEB 682
[    9.334716] UBI: PEB 682 passed torture test, do not mark it as bad
[    9.462677] UBI: run torture test for PEB 682
[    9.789459] UBI: PEB 682 passed torture test, do not mark it as bad
[    9.923095] UBI: run torture test for PEB 682
[   10.249755] UBI: PEB 682 passed torture test, do not mark it as bad
[   10.383270] UBI: scrubbed PEB 164 (LEB 0:113), data moved to PEB 682
Please wait: booting...
Starting udev
[   10.693115] UBI: scrubbed PEB 675 (LEB 0:97), data moved to PEB 164
[   10.848876] udevd (707): /proc/707/oom_adj is deprecated, please use /proc/707/oom_score_adj instead.
[   14.652862] FAT-fs (mmcblk0): bogus number of reserved sectors
[   14.658966] FAT-fs (mmcblk0): Can't find a valid FAT filesystem
[   15.301116] kjournald starting.  Commit interval 5 seconds
[   15.307006] EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended
[   15.328308] EXT3-fs (mmcblk0p2): using internal journal
[   15.333831] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[   15.388519] alignment: ignoring faults is unsafe on this CPU.  Defaulting to fixup mode.
Root filesystem already rw, not remounting
Caching udev devnodes
ALSA: Restoring mixer settings...
Configuring network interfaces... udhcpc (v1.13.2) started
[   16.237609] UBI: run torture test for PEB 675
[   16.564453] UBI: PEB 675 passed torture test, do not mark it as bad
[   16.692687] UBI: run torture test for PEB 675
[   17.021575] UBI: PEB 675 passed torture test, do not mark it as bad
[   17.201354] UBI: scrubbed PEB 130 (LEB 0:46), data moved to PEB 675
Sending discover...
Sending select for 158.218.104.196...
Lease of 158.218.104.196 obtained, lease time 3600
adding dns 158.218.108.21
adding dns 157.170.32.67
done.
Setting up IP spoofing protection: rp_filter.
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting telnet daemon.
Starting syslogd/klogd: done
Starting thttpd.
[   18.550506] UBI: run torture test for PEB 130
[   18.878234] UBI: PEB 130 passed torture test, do not mark it as bad
[   18.989959] UBI: run torture test for PEB 130
[   19.316131] UBI: PEB 130 passed torture test, do not mark it as bad
[   19.429260] UBI: scrubbed PEB 139 (LEB 0:112), data moved to PEB 130

 _____                    _____           _         _
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
              |___|                    |___|

Arago Project http://arago-project.org am335x-evm ttyO0

Arago 2011.09 am335x-evm ttyO0

am335x-evm login:

 

  • Bin,

    Can you keep rebooting the board for some time (say around 100) and check for any UBI checksum or ECC failures? This log could be because of corrected/recovered data with ECC's help. 

    Which is the ECC algorithm used here? If it is BCH8 then try switching to Hamming code and see whether the same logs are occurring again or not.

  • Renjith,

    I didn't set any ECC so I guess it is using default. I flashed UBIFS from Linux kernel (booted using NFS and then from Linux prompt I did "flash_eraseall /dev/mtd7" and "ubiformat /dev/mtd7 -f ubi.img -s 512 -O 2048".

    Please advice how to change ECC to Hamming code.

    BTW, if the board is power-cycled when using UBIFS, it will fail to boot from UBIFS again (error below) and I have to reflash UBIFS again in this case.

    [    6.925602] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [    6.933115] Please append a correct "root=" boot option; here are the available partitions:
    [    6.941887] b300         3872256 mmcblk0  driver: mmcblk
    [    6.947441]   b301           72261 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
    [    6.955813]   b302         3799372 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
    [    6.964256] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [    6.972890] Backtrace:
    [    6.975471] [<c00178f8>] (dump_backtrace+0x0/0x110) from [<c0410f10>] (dump_stack+0x18/0x1c)
    [    6.984289]  r6:c717b000 r5:c05a9e44 r4:c0618f88 r3:c05dbd08
    [    6.990228] [<c0410ef8>] (dump_stack+0x0/0x1c) from [<c0410f80>] (panic+0x6c/0x1a0)
    [    6.998299] [<c0410f14>] (panic+0x0/0x1a0) from [<c057ccb4>] (mount_block_root+0x184/0x228)
    [    7.007027]  r3:c05dbd08 r2:00000000 r1:c701df78 r0:c04e4d50
    [    7.012954]  r7:00008000
    [    7.015603] [<c057cb30>] (mount_block_root+0x0/0x228) from [<c057cfd0>] (prepare_namespace+0xac/0x1d4)
    [    7.025395] [<c057cf24>] (prepare_namespace+0x0/0x1d4) from [<c057c90c>] (kernel_init+0x124/0x130)
    [    7.034754]  r5:c05b801c r4:c05b801c
    [    7.038505] [<c057c7e8>] (kernel_init+0x0/0x130) from [<c00402cc>] (do_exit+0x0/0x67c)
    [    7.046778]  r5:c057c7e8 r4:00000000

    Thanks,

    Bin

  • Bin,

    Can you change the command to "ubiformat /dev/mtd7 -f ubi.img -s 2048 -O 2048" and try? 

    You can change it to hamming code by changing inside the corresponding board file or board-flash.c. Search for BCH inside the file, and there you can change the macro to hamming code. 

    Please send the complete boot logs for the error that you are seeing.

  • Renjith,

    After changing to use your new ubiformat command, I don't see "scrubbed FEB...." or "run torture test ..." any more. But power-cycle the board still failed to reboot with error below. I also attached the complete boot log. The log contains 2 times of boot, 1st is I did "reboot" (which was OK), 2nd is I did power cycle(which failed).

    Will Hamming code ECC solve this power cycle issue?

    Thanks,

    Bin

     

    [   10.011700] UBIFS: recovery needed
    [   10.050210] UBIFS error (pid 1): replay_log_leb: log error detected while replaying the log at LEB 3:0
    [   10.060695] List of all partitions:
    [   10.064381] 1f00             128 mtdblock0  (driver?)
    [   10.069656] 1f01             128 mtdblock1  (driver?)
    [   10.075148] 1f02             128 mtdblock2  (driver?)
    [   10.080444] 1f03             128 mtdblock3  (driver?)
    [   10.085717] 1f04            1920 mtdblock4  (driver?)
    [   10.091004] 1f05             128 mtdblock5  (driver?)
    [   10.096276] 1f06            5120 mtdblock6  (driver?)
    [   10.101602] 1f07          254464 mtdblock7  (driver?)
    [   10.106880] b300         3872256 mmcblk0  driver: mmcblk
    [   10.112448]   b301           72261 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
    [   10.120818]   b302         3799372 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
    [   10.129166] No filesystem could mount root, tried:  ubifs
    [   10.134853] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [   10.143486] Backtrace:
    [   10.146068] [<c00178f8>] (dump_backtrace+0x0/0x110) from [<c0410f10>] (dump_stack+0x18/0x1c)
    [   10.154884]  r6:c72ea006 r5:c05a9e44 r4:c0618f88 r3:c05dbd08
    [   10.160820] [<c0410ef8>] (dump_stack+0x0/0x1c) from [<c0410f80>] (panic+0x6c/0x1a0)
    [   10.168853] [<c0410f14>] (panic+0x0/0x1a0) from [<c057cd3c>] (mount_block_root+0x20c/0x228)
    [   10.177575]  r3:c701df4c r2:c701df78 r1:c701df78 r0:c04e4d50
    [   10.183520]  r7:00008000
    [   10.186171] [<c057cb30>] (mount_block_root+0x0/0x228) from [<c057cfd0>] (prepare_namespace+0xac/0x1d4)
    [   10.195935] [<c057cf24>] (prepare_namespace+0x0/0x1d4) from [<c057c90c>] (kernel_init+0x124/0x130)
    [   10.205295]  r5:c05b801c r4:c05b801c
    [   10.209045] [<c057c7e8>] (kernel_init+0x0/0x130) from [<c00402cc>] (do_exit+0x0/0x67c)
    [   10.217313]  r5:c057c7e8 r4:00000000

     

  • Bin,

    If you are using BCH8, I've seen couple of issues in the implementation of it. I'm not 100% sure as you are using 3.2 kernel. Could you please send me the following files to renjith.thomas@pathpartnertech.com?

    • arch/arm/mach-omap2/board-am335xevm.c
    • arch/arm/mach-omap2/board-flash.c
    • arch/arm/mach-omap2/gpmc.c
    • drivers/mtd/nand/nand_base.c
    • drivers/mtd/nand/omap2.c
  • Bin,

    I have sent the files. Please let me know whether it works for you or not.

  • Renjith,

    With the changes in following files you gave me:

    • arch/arm/mach-omap2/gpmc.c
    • drivers/mtd/nand/nand_base.c
    • drivers/mtd/nand/omap2.c

    I rebuilt the kernel and re-flashed UBIFS, now kernel boots OK after Power cycle (I tried 3 times). The PSP version I am using is http://software-dl.ti.com/dsps/dsps_public_sw/psp/LinuxPSP/AM335x_04_06/04_06_00_07//exports/AM335X-LINUX-PSP-04.06.00.07.tgz 

    I have checked latest AM335X PSP http://software-dl.ti.com/dsps/dsps_public_sw/psp/LinuxPSP/AM335x_04_06/04_06_00_08//exports/AM335X-LINUX-PSP-04.06.00.08.tgz and found that these 3 files in 04.06.00.08 don't have your changes either.

    If the fixes you gave me are must to make NAND UBIFS driver work properly, they need to be pushed into next PSP release.

    Thanks,

    Bin

  • Good to know that it works. Can mark this query as answered?

  • Renjith,

    Thanks for your help. I have passed your changes to PSP team for them to review so they can include it in future releases.

    Bin

  • Hi Ranjith,

    On looking at the patch you submitted, it seems that BCH8 error correction feature is Removed.

    Ecc Vector Calculation must be done for DATA area + ECC bytes. In case of no errors, ecc vector is zero (reported).

    In case of error, non-zero ecc vector (reported) should be passed to ELM module for error correction.

    Above method is tested & confirmed for 8-bit error correction.

    In your patch ecc vector is calculated only for DATA area.

    Since we are using HW method for error correction (through ELM module), by passing wrong ecc vector to ELM module,

    BCH8 Error Correction is removed. 

    Because of this,  whenever error is there, it says uncorrectable error (which should have been corrected).

    With your patch, we don't see the scrub error ("UBI: scrubbed PEB xx (LEB 0:yy), data moved to PEB z".)

    However, upon any errors, error is not corrected and we see uncorrectable error.

    Without this patch, this data is getting corrected & reporting as correctable error.

    So data moving to another block..


    However a part of your patch is valid as shown below.

    Setting info->mtd.subpage_sft = 0;

    and using

    ubiformat /dev/mtd7 -f ubi.img -s 2048 -O 2048

    seems to be valid.

    Also you mentioned in one post that "If you are using BCH8, I've seen couple of issues in the implementation of it.".

    Can you please specify the issues you are seeing.

    Thanks, Avinash




    Hi bin,

    Also UBIFS power recycle issue, please look at

    http://processors.wiki.ti.com/index.php/UBIFS_Support#Using_UBIFS_image_as_root_file_system

    Thanks,

    Avinash

  • Avinash,

    I have not removed BCH8 error correction code. I have only removed the read_bch function which is different from correction. 

    Avinash Philip said:

    Ecc Vector Calculation must be done for DATA area + ECC bytes

    In the earlier implementation, you were doing this calculation only during read, and write was the default write function. Why was only read overidden from the standard read_page function whereas write was not. So what was happening earlier that it was correcting the bits in almost all reads. This really caught when UBIFS does a checksum calculation. And very rarely if the number of errors crosses 8 bits it used to report ECC 

    As far as I understand ECC is calculated for only the 512 bytes data and not for ECC bytes. If that is the case, how will you do the same calculation during write as there is not ECC bytes available at that time? 

    I hope I have clarified your point. 

    Also info->mtd.subpage_sft = 0; is not a good way of disabling sub-pages. This is just a temporary hack.

  • Renjith,

    Renjith Thomas said:
    In the earlier implementation, you were doing this calculation only during read, and write was the default write function. Why was only read overidden from the standard read_page function whereas write was not. So what was happening earlier that it was correcting the bits in almost all reads. This really caught when UBIFS does a checksum calculation. And very rarely if the number of errors crosses 8 bits it used to report ECC 

    BCH8 error correction using ELM hardware module support is added recently to omap nand driver.

    This requires custom read command to handle read sequence.

    Read seaquence with ELM module error correction is

    GPMC ecc engine enabnle -> read 512 byte data -> Read oob bytes (13) -> calculate ECC.

    This way for non error sectors calculated ecc vector reported as zero. For sectors with error present,

    non-zero calculated ecc vector reported. This vector we are passing to ELM module for processing.

    Standard read sequence is

    GPMC ecc engine enabnle -> read 512 byte data -> calculate ECC.

    Here we were comaparing read & calculated ecc vectors & matches if no error present.

    But here calculated ecc vector is different from the custom read method. So this ecc vector can't given to ELM module for processing.

    For better understanding can you experiment with manually introduce bit errors (less than 8-bit) in one sector (512 byte) and see really error

    correction is happening or not?

    Renjith Thomas said:
    As far as I understand ECC is calculated for only the 512 bytes data and not for ECC bytes. If that is the case, how will you do the same calculation during write as there is not ECC bytes available at that time?

    You were correct. So we don't have any custom write support.

    Thanks Avinash

  • Avinash,

    I don't have time to try introducing bit errors manually. It will be better if you can find out someone at your end. People are already using our changes for UBIFS and so far I haven't received any incident where ECC errors are not corrected or data corruption occurred.

    Regards,
    Renjith 

  •  I backed off all changes from Path Partner and Avinash. And then I applied patch from https://patchwork.kernel.org/patch/1225181/ on DM385 PSP ENG_REL1 and also on AM335X PSP 4.6.0.7. With this patch, there is NO need to do sync after the first time boots up with UBIFS and following power-cycle still can boot up with UBIFS successfully on both EVMs. So it seems this patch solved the empty space fillup issue.

  • Hi Renjith,

     Can you please send these files to me, plz?

     mail: ustc.jiangwei@gmail.com.

     Thanks.

    Wei Jiang

  • Wei,

    Actually the changes Renjith gave me were abandoned by TI PSP team since it broke ECC. Just want you know that.

    With PSP 4.6.0.8, I only applied following patch to use UBIFS. However, I didn't do any intensive UBIFS test so don't know if nay other issues.

    https://patchwork.kernel.org/patch/1245721/

    Regards,

    Bin