I have build the images for DM365 using the latest SDK IPNC RDK 5.1.0
I'm using a DM365 based custom board. The NAND flash used is MT29F1G08ABADAWP
I am using UBIFS.
When I boot the kernel I'm facing the error:
UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
The command for make ubifs is:
$(UBIFS_PATH)/mkfs.ubifs -r $(TARGET_FS) -m 2048 -e 129024 -c 250 -o ubifs.img
$(UBIFS_PATH)/ubinize -o $(SYSTEM_CFG)_$(HARDWARE_CFG)_ubifs -m 2048 -p 128KiB $(HARDWARE_CFG)_ubinize.cfg
The dm365_ubinize.cfg is as follows:
[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=30MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
I have made the partition as 32 MB for filesystem.
Here are the kernel boot logs
Loading from NAND 128MiB 3,3V 8-bit, offset 0x400000
Image Name: Linux-2.6.37_IPNC_DM365_5.1.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3440032 Bytes = 3.3 MB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.37_IPNC_DM365_5.1.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3440032 Bytes = 3.3 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
[ 0.000000] Linux version 2.6.37_IPNC_DM365_5.1.0 (ashwin@Desktop-work) (gcc version 4.3.3 (GCC) ) #8 PREEMPT Wed Mar 26 12:54:15 IST 2014
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: DaVinci DM36x IPNC
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] DaVinci dm36x_rev1.2 variant 0x8
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 12192
[ 0.000000] Kernel command line: mem=48M console=ttyS0,115200n8 noinitrd ip=192.168.1.2 rw ubi.mtd=3,512 rootfstype=ubifs root=ubi0:rootfs c
memk.phys_start=0x83000000 cmemk.phys_end=0x88000000 cmemk.phys_start_1=0x00001000 cmemk.phys_end_1=0x00008000 cmemk.pools_1=1x28672 cmemk.allo
wOverlap=1 cmemk.useHeapIfPoolUnavailable=1 nohz=off highres=off clocksource=acpi_pm lpj=739328 eth=00:01:02:03:04:05
[ 0.000000] TI DaVinci EMAC: kernel boot params Ethernet address: 00:01:02:03:04:05
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 48MB = 48MB total
[ 0.000000] Memory: 45184k/45184k available, 3968k 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] DMA : 0xff000000 - 0xffe00000 ( 14 MB)
[ 0.000000] vmalloc : 0xc3800000 - 0xfea00000 ( 946 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3000000 ( 48 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .init : 0xc0008000 - 0xc0028000 ( 128 kB)
[ 0.000000] .text : 0xc0028000 - 0xc032c000 (3088 kB)
[ 0.000000] .data : 0xc032c000 - 0xc034fda0 ( 144 kB)
[ 0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptable hierarchical RCU implementation.
[ 0.000000] RCU-based detection of stalled CPUs is disabled.
[ 0.000000] Verbose stalled-CPUs detection is disabled.
[ 0.000000] NR_IRQS:245
[ 0.000000] Console: colour dummy device 80x30
[ 0.000404] Calibrating delay loop (skipped) preset value.. 147.86 BogoMIPS (lpj=739328)
[ 0.000489] pid_max: default: 32768 minimum: 301
[ 0.000886] Mount-cache hash table entries: 512
[ 0.001915] CPU: Testing write buffer coherency: ok
[ 0.007884] DaVinci: 8 gpio irqs
[ 0.008722] NET: Registered protocol family 16
[ 0.138530] bio: create slab <bio-0> at 0
[ 0.145040] SCSI subsystem initialized
[ 0.150404] usbcore: registered new interface driver usbfs
[ 0.152154] usbcore: registered new interface driver hub
[ 0.153315] usbcore: registered new device driver usb
[ 0.157463] vpss vpss: dm365_vpss vpss probed
[ 0.157552] vpss vpss: dm365_vpss vpss probe success
[ 0.160436] Advanced Linux Sound Architecture Driver Version 1.0.23.
[ 0.163046] Switching to clocksource timer0_1
[ 0.245233] NET: Registered protocol family 2
[ 0.245649] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.246747] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.246951] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.247083] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.247127] TCP reno registered
[ 0.247182] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.247273] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.247956] NET: Registered protocol family 1
[ 0.338089] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.343103] msgmni has been set to 88
[ 0.346759] io scheduler noop registered (default)
[ 0.348686] CSL: Module install successful, device major num = 254
[ 0.348752] CSL: Module version 0.10.00, built on Mar 25 2014 15:54:16
[ 0.348827] I2C: Module install successful, device major num = 253
[ 0.348888] DMA: Module install successful, device major num = 252
[ 0.348929] DRV: Module install successful
[ 0.348967] DRV: Module built on Mar 25 2014 15:54:17
[ 0.349007] DRV: EDMACC.QUEPRI = 00002777
[ 0.349040] DRV: SYSTEM.MSTPRI0 = 00440011
[ 0.349073] DRV: SYSTEM.MSTPRI1 = 00000444
[ 0.349105] DRV: ISP.BCR = 00000002
[ 0.349137] DRV: SYSTEM.MISC = 00000399
[ 0.349171] EDMAK module: built on Mar 25 2014 at 15:54:04
[ 0.349216] Reference Linux version 2.6.37
[ 0.349255] File /home/ashwin/rakesh/Linux-installed-IPNC-Win-retrieved/IPNC_RDK_DM36x_V5.1.0/Source/dvsdk_ipnctools/linuxutils_2_26_02_05
/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
[ 0.351432] IRQK module: built on Mar 25 2014 at 15:54:04
[ 0.351500] Reference Linux version 2.6.37
[ 0.351543] File /home/ashwin/rakesh/Linux-installed-IPNC-Win-retrieved/IPNC_RDK_DM36x_V5.1.0/Source/dvsdk_ipnctools/linuxutils_2_26_02_05
/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
[ 0.353474] irqk initialized
[ 0.353574] CMEMK module: built on Mar 25 2014 at 15:54:02
[ 0.353630] Reference Linux version 2.6.37
[ 0.353671] File /home/ashwin/rakesh/Linux-installed-IPNC-Win-retrieved/IPNC_RDK_DM36x_V5.1.0/Source/dvsdk_ipnctools/linuxutils_2_26_02_05
/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[ 0.360805] allocated heap buffer 0xc4000000 of size 0x5000000
[ 0.360866] heap fallback enabled - will try heap if pool buffer is not available
[ 0.360926] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 0.360977] CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
[ 0.361174] cmemk initialized
[ 0.361251] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.386092] serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
[ 0.909716] console [ttyS0] enabled
[ 0.935790] serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
[ 0.947087] brd: module loaded
[ 0.961760] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung )
[ 0.971350] nand_bbt: ECC error while reading bad block table
[ 0.977520] Creating 9 MTD partitions on "davinci_nand.0":
[ 0.983212] 0x000000000000-0x000000200000 : "bootloader"
[ 0.993963] 0x000000200000-0x000000400000 : "params"
[ 1.004324] 0x000000400000-0x000000900000 : "kernel"
[ 1.014783] 0x000000900000-0x000002900000 : "filesystem"
[ 1.025916] 0x000002900000-0x000003000000 : "config"
[ 1.036675] 0x000003000000-0x000003500000 : "kernel_recovery"
[ 1.048275] 0x000003500000-0x000004500000 : "filesystem_recovery"
[ 1.060641] 0x000004500000-0x000004f00000 : "syslog"
[ 1.071472] 0x000004f00000-0x000008000000 : "data1"
[ 1.082075] davinci_nand davinci_nand.0: controller rev. 2.3
[ 1.091827] UBI: attaching mtd3 to ubi0
[ 1.095720] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.102405] UBI: logical eraseblock size: 129024 bytes
[ 1.107840] UBI: smallest flash I/O unit: 2048
[ 1.112719] UBI: sub-page size: 512
[ 1.117372] UBI: VID header offset: 512 (aligned 512)
[ 1.123340] UBI: data offset: 2048
[ 1.128798] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
[ 1.138834] UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
[ 1.146355] UBI error: validate_ec_hdr: bad EC header
[ 1.151500] UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
[ 1.158368] UBI error: ubi_init: cannot attach mtd3
[ 1.220136] davinci_mdio davinci_mdio.0: davinci mdio revision 1.4
[ 1.226376] davinci_mdio davinci_mdio.0: detected phy mask fffeffff
[ 1.234547] davinci_mdio.0: probed
[ 1.238023] davinci_mdio davinci_mdio.0: phy[16]: device 0:10, driver unknown
[ 1.246240] i2c /dev entries driver
[ 1.252628] Linux media interface: v0.10
[ 1.257488] Linux video capture interface: v2.00
[ 1.265131] vpbe-osd vpbe-osd: OSD sub device probe success
[ 1.272029] vpbe-venc vpbe-venc: VENC sub device probe success
[ 1.279172] vpbe-v4l2 vpbe-v4l2: vpbe v4l2 device registered
[ 1.285337] Setting default output to Composite
[ 1.289915] Setting default mode to ntsc
[ 1.294196] vpbe-v4l2 vpbe-v4l2: Trying to register VPBE display device.
[ 1.301042] vpbe-v4l2 vpbe-v4l2: layer=c289e000,layer->video_dev=c289e0e8
[ 1.308924] vpbe-v4l2 vpbe-v4l2: Trying to register VPBE display device.
[ 1.315961] vpbe-v4l2 vpbe-v4l2: layer=c2924400,layer->video_dev=c29244e8
[ 1.325152] watchdog watchdog: heartbeat 60 sec
[ 1.336731] Error: Driver 'davinci-mcbsp' is already registered, aborting...
[ 1.347751] asoc: cq93vc-hifi <-> davinci-vcif mapping ok
[ 1.357910] ALSA device list:
[ 1.361306] #0: DaVinci DM365 EVM
[ 1.366478] TCP cubic registered
[ 1.369767] NET: Registered protocol family 17
[ 1.442756] net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:10, id=8201)
[ 1.510122] IP-Config: Guessing netmask 255.255.255.0
[ 1.515807] IP-Config: Complete:
[ 1.518907] device=eth0, addr=192.168.1.2, mask=255.255.255.0, gw=255.255.255.255,
[ 1.527025] host=192.168.1.2, domain=, nis-domain=(none),
[ 1.532961] bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
[ 1.541750] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
[ 1.548846] Please append a correct "root=" boot option; here are the available partitions:
[ 1.557385] 1f00 2048 mtdblock0 (driver?)
[ 1.562595] 1f01 2048 mtdblock1 (driver?)
[ 1.567703] 1f02 5120 mtdblock2 (driver?)
[ 1.572892] 1f03 32768 mtdblock3 (driver?)
[ 1.578000] 1f04 7168 mtdblock4 (driver?)
[ 1.583175] 1f05 5120 mtdblock5 (driver?)
[ 1.588281] 1f06 16384 mtdblock6 (driver?)
[ 1.593455] 1f07 10240 mtdblock7 (driver?)
[ 1.598561] 1f08 50176 mtdblock8 (driver?)
[ 1.603741] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.612092] Backtrace:
[ 1.614583] Function entered at [<c002c4ec>] from [<c02c0044>]
[ 1.620493] r7:00008000 r6:c2813000 r5:c0022a90 r4:c0350580
[ 1.626232] Function entered at [<c02c002c>] from [<c02c00b0>]
[ 1.632140] Function entered at [<c02c0048>] from [<c0008f84>]
[ 1.638002] r3:00000000 r2:00000000 r1:c2825f78 r0:c02dc881
[ 1.643794] Function entered at [<c0008d20>] from [<c00090dc>]
[ 1.649654] Function entered at [<c0009048>] from [<c00084b4>]
[ 1.655562] r5:c002222c r4:c034fdb8
[ 1.659185] Function entered at [<c00083a4>] from [<c0040e64>]
[ 1.665089] r5:c00083a4 r4:00000000