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.

Linux/TMS320DM8148: Not able to mount ubifs file system on my Dm814x custom board .

Part Number: TMS320DM8148

Tool/software: Linux

This is my boot log.

                                                                               
NAND read: device 0 offset 0x280000, size 0x300000                              
 3145728 bytes read: OK                                                         
## Booting kernel from Legacy Image at 81800000 ...                             
   Image Name:   Linux-2.6.37+                                                  
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    2759972 Bytes = 2.6 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+ (root@ammarzafar) (gcc version 4.3.3 (Sourcery G++ Lite 27
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f                 
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache               
Machine: ti8148evm                                                              
vram size = 52428800 at 0x0                                                     
bootconsole [earlycon0] enabled                                                 
ti81xx_reserve: ### Reserved DDR region @89500000                               
reserved size = 52428800 at 0x0                                                 
FB: Reserving 52428800 bytes SDRAM for VRAM                                     
Memory policy: ECC disabled, Data cache writeback                               
OMAP chip is TI8148 3.0                                                         
SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000                        
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 25044      
Kernel command line: console=ttyO0,115200,quiet mem=150M@0x80000000 vram=50M tif
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: 98MB 1MB = 99MB total                                                   
Memory: 94088k/94088k available, 59512k reserved, 0K highmem                    
Virtual kernel memory layout:                                                   
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)                               
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)                               
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)                               
    vmalloc : 0xc9800000 - 0xf8000000   ( 744 MB)                               
    lowmem  : 0xc0000000 - 0xc9600000   ( 150 MB)                               
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)                               
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)                               
      .init : 0xc0008000 - 0xc0042000   ( 232 kB)                               
      .text : 0xc0042000 - 0xc053f000   (5108 kB)                               
      .data : 0xc0540000 - 0xc058cb40   ( 307 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 20000000 Hz                                 
Console: colour dummy device 80x30                                              
Calibrating delay loop... 799.53 BogoMIPS (lpj=3997696)                         
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 0x89500000 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                                                  
omap_mux_init: Add partition: #1: core, flags: 4                                
NOR: Can't request GPMC CS                                                      
Cannot clk_get ck_32                                                            
Debugfs: Only enabling/disabling deep sleep and wakeup timer is supported now   
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 @0xc9820000                                   
ti81xx_pcie: forcing link width - x1                                            
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                                                   
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 4ea2080b                                                         
registerd cppi-dma Intr @ IRQ 17                                                
Cppi41 Init Done                                                                
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz                                    
pcf857x: probe of 1-0021 failed with error -121                                 
omap_i2c omap_i2c.3: bus 3 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                                             
usb2phy: computed values rxcalib(15)DACs(28 12 14)                              
usb2phy: override computed values rxcalib(15)DACs(28 12 14)                     
usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f6e5976               
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 c981e000 using DMA, IRQ 18   
musb-hdrc musb-hdrc.1: dma type: dma-cppi41                                     
MUSB controller-1 revision 4ea20800                                             
usb2phy: computed values rxcalib(15)DACs(30 14 14)                              
usb2phy: override computed values rxcalib(15)DACs(30 14 14)                     
usb2phy_config: musb(1) rxcalib done, rxcalib read value 6f6f5d76               
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 c9826800 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                                         
squashfs: version 4.0 (2009/01/31) Phillip Lougher                              
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.                            
msgmni has been set to 183                                                      
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                
console [ttyO0] enabled, bootconsole disabled                                   
console [ttyO0] enabled, bootconsole disabled                                   
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                
omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3                
omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4                
omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5                
brd: module loaded                                

                          
loop: module loaded                                                             
omap2-nand driver initializing                                                  
ONFI param page 0 valid                                                         
ONFI flash detected                                                             
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-b)
omap2-nand: detected x16 NAND flash                                             
Creating 6 MTD partitions on "omap2-nand.0":                                    
0x000000000000-0x000000020000 : "U-Boot-min"                                    
0x000000020000-0x000000260000 : "U-Boot"                                        
0x000000260000-0x000000280000 : "U-Boot Env"                                    
0x000000280000-0x0000006c0000 : "Kernel"                                        
0x0000006c0000-0x00000cee0000 : "File System"                                   
0x00000cee0000-0x000010000000 : "Reserved"                                      
UBI: attaching mtd4 to ubi0                                                     
UBI: physical eraseblock size:   131072 bytes (128 KiB)                         
UBI: logical eraseblock size:    129024 bytes                                   
UBI: smallest flash I/O unit:    2048                                           
UBI: sub-page size:              512                                            
UBI: VID header offset:          512 (aligned 512)                              
UBI: data offset:                2048                                           
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512            
UBI error: validate_ec_hdr: bad EC header                                       
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0                      
UBI error: ubi_init: cannot attach mtd4                              

           
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                
CAN device driver interface                                                     
CAN bus driver for Bosch D_CAN controller 1.0                                   
usbcore: registered new interface driver cdc_ether                              
usbcore: registered new interface driver dm9601                                 
usbcore: registered new interface driver cdc_acm                                
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adaptes
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                                     
qt602240_ts 1-004a: __qt602240_read_reg: i2c transfer failed                    
qt602240_ts: probe of 1-004a failed with error -5                               
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 00
usbcore: registered new interface driver snd-usb-audio                          
asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok                           
asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok                                    
ALSA device list:                                                               
  #0: TI81XX EVM                                                                
netem: version 1.2                                                              
TCP cubic registered                                                            
NET: Registered protocol family 17                                              
can: controller area network core (rev 20090105 abi 8)                          
NET: Registered protocol family 29                                              
can: raw protocol (rev 20090105)                                                
can: broadcast manager protocol (rev 20090105 t)                                
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=74:da:ea:a:82:4c                                                 
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)  
                                                                                
CPSW phy found : id is : 0x221622                                               
PHY 0:01 not found                                                              
IP-Config: Complete:                                                            
     device=eth0, addr=192.168.10.2, mask=255.255.255.0, gw=192.168.10.1,       
     host=Z3-DM814x, domain=, nis-domain=(none),                                
     bootserver=192.168.10.201, rootserver=192.168.10.201, rootpath=            
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          204928 mtdblock4  (driver?)                                       
1f05           50304 mtdblock5  (driver?)                                       
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)  
Backtrace:                                                                      
[<c0050bf4>] (dump_backtrace+0x0/0x110) from [<c03ed304>] (dump_stack+0x18/0x1c)
 r7:c5c14000 r6:c007a2bc r5:c002ff64 r4:c058d750                                
[<c03ed2ec>] (dump_stack+0x0/0x1c) from [<c03ed368>] (panic+0x60/0x17c)         
[<c03ed308>] (panic+0x0/0x17c) from [<c00092b4>] (mount_block_root+0x1e0/0x220)
 r3:00000000 r2:00000000 r1:c5c23f78 r0:c04b7bbc                                
[<c00090d4>] (mount_block_root+0x0/0x220) from [<c0009454>] (prepare_namespace+)
[<c00093c0>] (prepare_namespace+0x0/0x1d4) from [<c00087c4>] (kernel_init+0x114)
 r5:c00086b0 r4:c058cb40                                                        
[<c00086b0>] (kernel_init+0x0/0x154) from [<c007a2bc>] (do_exit+0x0/0x5e4)      
 r5:c00086b0 r4:00000000      

  • My nand is MT29F2G16AADWP_16Bit

    This is the command i use to make ubifs .
    (/root/z3/sysapps/mtd-utils-host/mkfs.ubifs/mkfs.ubifs --squash-uids -v -r /root/z3/filesys/fs/. -m 2048 -e 126976 -c 2047 -o ubifs.img && /root/z3/sysapps/mtd-utils-host/ubi-utils/ubinize -o ubifs-image -m 2048 -p 128KiB -s 2048 ubinize.cfg)

    This is Build log

    mkfs.ubifs
        root:         /root/z3/filesys/fs/./
        min_io_size:  2048
        leb_size:     126976
        max_leb_cnt:  2047
        output:       ubifs.img
        jrn_size:     8388608
        reserved:     0
        compr:        lzo
        keyhash:      r5
        fanout:       8
        orph_lebs:    1
        space_fixup:  0
        super lebs:   1
        master lebs:  2
        log_lebs:     5
        lpt_lebs:     2
        orph_lebs:    1
        main_lebs:    607
        gc lebs:      1
        index lebs:   9
        leb_cnt:      618
        UUID:         34E84710-B743-4B22-9522-957C85327C7D
    Success!

    and this is ubifs config

    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=180MiB
    vol_type=dynamic
    vol_name=rootfs
    vol_flags=autoresize

    and booting from NFS

    root@dm814x-evm:~# mtdinfo /dev/mtd4                                            
    mtd4                                                                            
    Name:                           File System                                     
    Type:                           nand                                            
    Eraseblock size:                131072 bytes, 128.0 KiB                         
    Amount of eraseblocks:          1601 (209846272 bytes, 200.1 MiB)               
    Minimum input/output unit size: 2048 bytes                                      
    Sub-page size:                  512 bytes                                       
    OOB size:                       64 bytes                                        
    Character device major/minor:   90:8                                            
    Bad blocks are allowed:         true                                            
    Device is writable:             true                                            
                                                                                    
    root@dm814x-evm:/# ubiformat /dev/mtd4 -f ubi.img -s 512 -O 2048
    ubiformat: mtd4 (nand), size 209846272 bytes (200.1 MiB), 1601 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
    libscan: scanning eraseblock 1600 -- 100 % complete  
    ubiformat: 1601 eraseblocks have valid erase counter, mean value is 0
    ubiformat: formatting eraseblock 1600 -- 100 % complete

  • i changed this
    root@dm814x-evm:/# ubiformat /dev/mtd4 -f ubi.img -s 512 -O 2048

    to

    root@dm814x-evm:/# ubiformat /dev/mtd4 -f ubi.img -s 2048


    and update bootargs to

    ubi.mtd=4,2048 root=ubi0:rootfs
    for solving issue.

    BR
    Ammar Zafar

  • Hi Ammar,

    Thanks for sharing the solution.

    Regards,
    Pavel