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.

Cann't boot ubifs from nand flash when Use DVRRDK 04.00.00.03

Other Parts Discussed in Thread: PMP, TVP5158

Hello:
 
    We use DVRRDK 04.00.00.03, write uboot, boot log, uImage, ubifs to Nand Flash.

    Hardware:  DM8168 EVM board

    uboot command:
 setenv logoreadaddr '0x81000000'
 mw.b 0x81000000 0xFF 0x260000;tftp 0x81000000 uboot_NAND_DM816X_TI_EVM;nandecc hw 2;nand erase 0x0 0x260000;nand write.i 0x81000000 0x0 0x260000
 mw.b 0x81000000 0xFF 0x300000;tftp 0x81000000 samplelogo_640x480.bmp;nand erase 0x00280000 0x300000;nand write 0x81000000 0x00280000 0x300000
 mw.b 0x81000000 0xFF 0x300000;tftp 0x81000000 uImage_DM816X_TI_EVM;nand erase 0x00580000 0x440000;nand write.i 0x81000000 0x00580000 0x300000
 mw.b 0x81000000 0xFF 0x4C00000;tftp 0x81000000 ubi_128_DM816X_TI_EVM.img;nand erase 0x009C0000 0xC820000;nand write 0x81000000 0x009C0000 0x4C00000
 setenv bootcmd ' nand read ${logoreadaddr} 0x280000 0x300000; logo on ${logoreadaddr} 0xA0000000 0xBEA00000 40 60;nand read 0x81000000 0x00580000 0x300000;bootm 0x81000000';
 setenv bootargs 'console=ttyO2,115200n8 noinitrd mem=116M rootwait=1 rw ubi.mtd=8,2048 rootfstype=ubifs root=ubi0:rootfs init=/init vram=20M notifyk.vpssm3_sva=0xBEE00000 stdin=serial ddr_mem=1024M'
   
   

  when start the system, it print error message:
  

 NAND read: device 0 offset 0x280000, size 0x300000
 3145728 bytes read: OK
VPDMA Firmware Version = 0x4d00018d

NAND read: device 0 offset 0x580000, size 0x300000
 3145728 bytes read: OK
## Booting kernel from Legacy Image at 81000000 ...
   Image Name:   Linux-2.6.37
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2569084 Bytes = 2.5 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.37 (x0161644@bangvideoapps01) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Fri May 3 18:24:18 IST 2013
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: ti8168evm
vram size = 20971520 at 0x0
ti81xx_reserve: ### Reserved DDR region @87300000
reserved size = 20971520 at 0x0
FB: Reserving 20971520 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP chip is TI8168 1.1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 24088
Kernel command line: console=ttyO2,115200n8 noinitrd mem=116M rootwait=1 rw ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs init=/init vram=20M notifyk.vpssm3_sva=0xBEE00000 stdin=serial ddr_mem=1024M
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: 94MB 1MB = 95MB total
Memory: 90684k/90684k available, 28100k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc7800000 - 0xf8000000   ( 776 MB)
    lowmem  : 0xc0000000 - 0xc7400000   ( 116 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc0041000   ( 228 kB)
      .text : 0xc0041000 - 0xc04e2000   (4740 kB)
      .data : 0xc04e2000 - 0xc052c280   ( 297 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:407
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 IRQ400
Trying to install interrupt handler for IRQ401
Trying to install interrupt handler for IRQ402
Trying to install interrupt handler for IRQ403
Trying to install interrupt handler for IRQ404
Trying to install interrupt handler for IRQ405
Trying to install interrupt handler for IRQ406
Trying to install type control for IRQ407
Trying to set irq flags for IRQ407
OMAP clockevent source: GPTIMER1 at 27000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 1199.30 BogoMIPS (lpj=5996544)
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 0x87300000 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_mux_init: Add partition: #1: core, flags: 0
_omap_mux_get_by_name: Could not find signal i2c2_scl.i2c2_scl
_omap_mux_get_by_name: Could not find signal i2c2_sda.i2c2_sda
NOR: Can't request GPMC CS
registered ti816x_gpio_vr device
registered ti816x_sr device
Cannot clk_get ck_32
pm_dbg_init: only OMAP3 supported
registered ti81xx_vpss device
registered ti81xx_vidout device
registered ti81xx on-chip HDMI device
registered ti81xx_fb device
registered ti81xx_vin device
ti81xx_pcie: Invoking PCI BIOS...
ti81xx_pcie: Setting up Host Controller...
ti81xx_pcie: Register base mapped @0xc7820000
ti81xx_pcie: Starting PCI scan...
PCI: bus0: Fast back to back transfers enabled
ti81xx_pcie: PCI scan done.
bio: create slab <bio-0> at 0
regulator: VFB: 800 <--> 1025 mV at 1010 mV
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
USBSS revision 4ea20808
registerd cppi-dma Intr @ IRQ 17
Cppi41 Init Done
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
omap_i2c omap_i2c.2: bus 2 rev4.0 at 100 kHz
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource gp timer
musb-hdrc: version 6.0, host, debug=0
musb-hdrc musb-hdrc.0: dma type: dma-cppi41
MUSB controller-0 revision 4ea20800
musb-hdrc: kernel must blacklist external hubs
musb-hdrc musb-hdrc.0: MUSB HDRC host driver
musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
usb usb1: SerialNumber: musb-hdrc.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc.0: USB Host mode controller at c781e000 using DMA, IRQ 18
musb-hdrc musb-hdrc.1: dma type: dma-cppi41
MUSB controller-1 revision 4ea20800
musb-hdrc: kernel must blacklist external hubs
musb-hdrc musb-hdrc.1: MUSB HDRC host driver
musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: MUSB HDRC host driver
usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
usb usb2: SerialNumber: musb-hdrc.1
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
musb-hdrc musb-hdrc.1: USB Host mode controller at c7826800 using DMA, IRQ 19
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 177
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
console [ttyO2] enabled
brd: module loaded
loop: module loaded
ahci probe: devid name is ahci
ahci CAP register dump =0x6726ff81
Modified ahci CAP register dump =0x6f26ff81
ahci ahci.0: forcing PORTS_IMPL to 0x3
ahci: SSS flag set, parallel bus scan disabled
ahci ahci.0: AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl platform mode
ahci ahci.0: flags: ncq sntf stag pm led clo only pmp pio slum part ccc
scsi0 : ahci_platform
scsi1 : ahci_platform
ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x100 irq 16
ata2: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x180 irq 16
m25p80 spi1.0: found m25p05-nonjedec, expected m25p80
m25p80 spi1.0: m25p05-nonjedec (64 Kbytes)
Creating 4 MTD partitions on "spi_flash":
0x000000000000-0x000000040000 : "U-Boot"
mtd: partition "U-Boot" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
0x000000010000-0x000000012000 : "U-Boot Env"
mtd: partition "U-Boot Env" is out of reach -- disabled
0x000000000000-0x000000280000 : "Kernel"
mtd: partition "Kernel" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
0x000000010000-0x000000010000 : "File System"
mtd: partition "File System" is out of reach -- disabled
omap2-nand driver initializing
UBI error: ubi_init: UBI error: cannot initialize UBI, error -19
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask fffffff9
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver unknown
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver dm9601
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v1.0.0)
OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
notify_init : notify drivercreated  for  remote proc id 2 at physical Address 0xbee00000
usbcore: registered new interface driver snd-usb-audio
Registered tvp5158 audio codec
asoc: tvp5158-hifi <-> davinci-mcasp.0 mapping ok
asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok
ALSA device list:
  #0: TI81XX SOUND0
  #1: TI81XX SOUND1
TCP cubic registered
NET: Registered protocol family 17
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.
smartreflex smartreflex: Driver initialized
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
ata1: SATA link down (SStatus 0 SControl 300)
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD8GB 7.42 GiB
 mmcblk0: p1 p2
ata2: SATA link down (SStatus 0 SControl 300)
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              64 mtdblock0  (driver?)
1f02              64 mtdblock2  (driver?)
b300         7782400 mmcblk0  driver: mmcblk
  b301           72261 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
  b302         7703167 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Backtrace:
[<c004efac>] (dump_backtrace+0x0/0x110) from [<c03a01dc>] (dump_stack+0x18/0x1c)
 r6:00008000 r5:c5814000 r4:c052ce98 r3:60000013
[<c03a01c4>] (dump_stack+0x0/0x1c) from [<c03a023c>] (panic+0x5c/0x178)
[<c03a01e0>] (panic+0x0/0x178) from [<c0009184>] (mount_block_root+0x1c4/0x204)
 r3:00000000 r2:00000000 r1:c5825f78 r0:c0460985
 r7:c002f424
[<c0008fc0>] (mount_block_root+0x0/0x204) from [<c000940c>] (prepare_namespace+0x94/0x1cc)
[<c0009378>] (prepare_namespace+0x0/0x1cc) from [<c0008d70>] (kernel_init+0x114/0x154)
 r5:c002e9ec r4:c002e9ec
[<c0008c5c>] (kernel_init+0x0/0x154) from [<c0077780>] (do_exit+0x0/0x5d0)
 r5:c0008c5c r4:00000000

 I also chang the ubi.mtd=8,2048  to ubi.mtd=4,2048  for test, it is the same error message.


 

  • Hello,

        we find the kernel message has no nand flash info. Then we do a next test:

       1) use DVRRDK 3.0 uboot, downlaod dvrrdk 4.0 kernel through tftp,   mount nfs filesystem;

       2)use DVRRDK 4.0 uboot, downlaod dvrrdk 4.0 kernel through tftp,   mount nfs filesystem;

       To suprised, we find that at the same hardware,  1) find nand flash, and can print nand flash partition info. 2) did not find nand flash.

        1) log message

       m25p80 spi1.0: m25p05-nonjedec (64 Kbytes)
    Creating 4 MTD partitions on "spi_flash":
    0x000000000000-0x000000040000 : "U-Boot"
    mtd: partition "U-Boot" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
    0x000000010000-0x000000012000 : "U-Boot Env"
    mtd: partition "U-Boot Env" is out of reach -- disabled
    0x000000000000-0x000000280000 : "Kernel"
    mtd: partition "Kernel" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
    0x000000010000-0x000000010000 : "File System"
    mtd: partition "File System" is out of reach -- disabled
    omap2-nand driver initializing
    ONFI param page 0 valid
    ONFI flash detected
    NAND device: Maf ID: 0x2c, Chip ID: 0xca (Micron, NAND 256MiB 3,3V 16-bit)
     erasesize: 0x20000, writesize: 2048, oobsize: 64
    omap2-nand: detected x16 NAND flash
    Creating 6 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000260000 : "U-Boot"
    0x000000260000-0x000000280000 : "U-Boot Env"
    0x000000280000-0x000000580000 : "U-Boot Logo"
    0x000000580000-0x0000009c0000 : "Kernel"
    0x0000009c0000-0x00000d1e0000 : "File System"
    0x00000d1e0000-0x000010000000 : "Reserved"
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    davinci_mdio davinci_mdio.0: detected phy mask fffffffd
    davinci_mdio.0: probed

     

    2) log message

    m25p80 spi1.0: m25p05-nonjedec (64 Kbytes)
    Creating 4 MTD partitions on "spi_flash":
    0x000000000000-0x000000040000 : "U-Boot"
    mtd: partition "U-Boot" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
    0x000000010000-0x000000012000 : "U-Boot Env"
    mtd: partition "U-Boot Env" is out of reach -- disabled
    0x000000000000-0x000000280000 : "Kernel"
    mtd: partition "Kernel" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
    0x000000010000-0x000000010000 : "File System"
    mtd: partition "File System" is out of reach -- disabled
    omap2-nand driver initializing
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    davinci_mdio davinci_mdio.0: detected phy mask fffffffd
    davinci_mdio.0: probed

     

  • Did you do 'nand scrub' before flashing u-boot and ubifs? It is mandatory. See install guide for this. On our side we are able to flash Ne EVM and boot while UBIFS is flashed with RDK 4.0 binaries. Kindly mention evm revision you are using. It should be REV C onwards. 

     

  • Hi, Yogesh

         I do 'nand scrub' before flashing u-boot and ubifs, it is the same situation.

        Our evm revision is REV G.

  • Ok. Thanks for confirmation .

    1. In your 2nd post you are saying if you use RDK 3.0 uboot NAND is detected and pratition info is printed but on same evm with RDK 4.0 nand partitions are not printed. Is nand getting detected in uboot (RDK 4.0) if you type 'nand info'? Also, please confirm your switch setting for RDK 4.0

    NAND BOOT MODE  SW1[10:1] ---> 00100 10010 SW-4[1:0] 10 [NAND/SPI]

    Please do not use mixed combination of RDK 3.0 and 4.0 uboot and kernel.  

    2. With above switch setting if problem still persists put printk in kernel and ensure follwoing is getting executed with parameters as shown below

    File - ti_tools\linux-dvr-rdk\arch\arm\mach-omap2\board-ti8168evm.c 

    function

    static void __init ti8168_evm_init(void)
    {

    .....

     /* nand initialisation */

    board_nand_init(ti816x_nand_partitions,
     ARRAY_SIZE(ti816x_nand_partitions), 0, NAND_OMAP_BUS_16);

    ....

    }

     confirm  NAND_OMAP_BUS_16 is being passed to  board_nand_init

     

  • Hi, Yogesh

         Mabe I made some mistake.

         I  use a new nand flash,  first burn uboot, then reset the system. under the new uboot enviroment, burn uImage, ubifs,  then it can run correct.

        Thanks for your help.

       

  • Ok. Good to know.