We are currently developing a Digital Video Encoder based on DM365 and using Appro 5.1 SDK. We have modified the Appro 5.1 SDK u-boot and kernel. Following are the changes done:
1. In u-boot added support for ethernet PHY(RTL8201)
2. In kernel changed NAND partion.NAND partition used is:
0x000000000000-0x000000200000 : "bootloader"
0x000000200000-0x000000400000 : "params"
0x000000400000-0x000000900000 : "kernel"
0x000000900000-0x000002900000 : "filesystem"
0x000002900000-0x000003000000 : "config"
0x000003000000-0x000003500000 : "kernel_recovery"
0x000003500000-0x000004500000 : "filesystem_recovery"
0x000004500000-0x000004f00000 : "syslog"
Details of NAND flash used:
Part number - K9F1G08X0C
Page size-2KB
Block size-128KB
Spare area - 4K
3. UBIFS filesystem is created using commands:
mkfs.ubifs -r filesys_dm365 -m 2048 -e 126976 -c 313 -o ubifs.img
ubinize -o ipnc_dm365_ubifs -m 2048 -p 128KiB dm365_ubinize.cfg
4.Bootargs used is:
setenv 256mbootargs 'set bootargs mem=45M console=ttyS0,115200n8 ip=off rw ubi.mtd=3,2048 rootfstype=ubifs root=ubi0:rootfs cmemk.phys_start=0x82d00000 cmemk.phys_end=0x87f00000 cmemk.phys_start_1=0x00001000 cmemk.phys_end_1=0x00008000 cmemk.pools_1=1x28672 cmemk.allowOverlap=1 cmemk.useHeapIfPoolUnavailable=1 nohz=off highres=off clocksource=acpi_pm lpj=739328 eth=$(ethaddr)'
We have successfully compiled the u-boot, kernel and UBIFS filesystem. When trying to do NAND boot after flashing the kernel and filesystem(flashing is done after giving "nand scrub") getting following issues:
1. following blocks are shown as bad blocks:
0x000000400000 - 0x0000007e0000
0x000002140000 - 0x0000023e0000
2. Getting errors:
UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 0:2048, read 512 bytes
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
[ 6.030715] Please append a correct "root=" boot option; here are the available partitions:
[ 6.039151] 1f00 2048 mtdblock0 (driver?)
[ 6.044404] 1f01 2048 mtdblock1 (driver?)
[ 6.049514] 1f02 5120 mtdblock2 (driver?)
[ 6.054724] 1f03 32768 mtdblock3 (driver?)
[ 6.059833] 1f04 7168 mtdblock4 (driver?)
[ 6.065025] 1f05 5120 mtdblock5 (driver?)
[ 6.070196] 1f06 16384 mtdblock6 (driver?)
[ 6.075307] 1f07 10240 mtdblock7 (driver?)
[ 6.080471] 1f08 50176 mtdblock8 (driver?)
[ 6.085574] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 6.093923] Backtrace:
[ 6.096412] Function entered at [<c002e4ec>] from [<c033475c>]
[ 6.102321] r7:00008000 r6:c2813000 r5:c00238f0 r4:c03dea60
[ 6.108062] Function entered at [<c0334744>] from [<c03347c8>]
[ 6.113969] Function entered at [<c0334760>] from [<c0008fc0>]
[ 6.119829] r3:00000000 r2:00000000 r1:c2825f78 r0:c0355a9e
[ 6.125619] Function entered at [<c0008ddc>] from [<c000916c>]
[ 6.131528] Function entered at [<c00090d8>] from [<c00084b4>]
[ 6.137389] r5:c002308c r4:c03de298
[ 6.141062] Function entered at [<c00083a4>] from [<c0042e78>]
[ 6.146919] r5:c00083a4 r4:00000000
We are able to boot with NFS but "bad block" issue is present.
Any help will be appreciated.