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.

mkfs.ubifs

Other Parts Discussed in Thread: TPS65910

Hello

i want to make a ubifs.

I have the MT29F1G08ABAEAW NAND, with 2048 bytes page size  and Block size= 64 pages =128K ; so i did :

sudo mkfs.ubifs /home/pengwyn/ti-sdk-am335x-evm-05.06.00.00/targetNFS –F -m 2048 -e 126976 -c 8406 -o ubifs.img
 For -e i used LEB_SIZE = $BLOCK_SIZE - (2 x $PAGE_SIZE)
= 131072-2*2048= 126976
Total size of NAND= 1Gb = 1073741824=0x40000000
The file sytem is put at 0x00600000, so the result size for file system in NAND is :40000000-0x00600000=3FA00000=1067450368
1067450368/126976=8406= parameter for -c
the result is a file of 1.7Mb for a file system of 74,6Mb.
1° Is it normal ?
2° is my mkfs.ubifs command OK ?

Because when i flash this ubifs, it doesn't work :
u-boot# mw.b 0x84000000 0xFF 0x500000 
 u-boot# mmc rescan
 u-boot# fatload mmc 0 0x84000000 ubifs.img
u-boot# nand erase 0x00600000 0x500000
 u-boot# nand write 0x84000000 0x00600000 0x1B2000

0x1B2000 is the size of my ubifs.img

Thank for any help




  • Trichet, please stop opening multiple threads on the same issue.

    The required calculations are pretty well explained here: http://processors.wiki.ti.com/index.php/UBIFS_Support

    I have further explained and provided an example in this thread here: http://e2e.ti.com/support/arm/sitara_arm/f/791/p/268305/941327.aspx#941327

    Also here: http://e2e.ti.com/support/arm/sitara_arm/f/791/p/241113/857751.aspx#857751

    Best regards,
    Miroslav

  • Hello

    sorry to have openned several threads; i didn't know on whic forum to post that...

    So i continue on this forum ?

    I followed your thread, but get same problem, have you any idea ?

    mkfs.ubifs command

    sudo mkfs.ubifs /home/pengwyn/ti-sdk-am335x-evm-05.06.00.00/targetNFS –F -m 2048 -e 126976  -c 849 -o ubifs.img

     

    -m 2048 is the minimum I/O unit = 2KB for the NAND used in the EVM
    -e 126976 is the LEB size which is PEB size minus 2 min. I/O units for overhead = 128K - 2*2K = 124K
    -c 849 is the max file system size in LEBs and it is calculated below (result is marked in red so that it is easy to spot)

    SP - PEB size = 128KB
    SL - LEB size = 124KB
    P - total PEBs on device/partition = 1024MB / 128KB = 8192
    B - PEBs reserved for bad PEB handling = 1% of P = ~81
    O - = SP - SL = 4KB

    UBI overhead = (81+4)*SP+O*(P-B-4) = (81+4)*128KB+4KB*(8192-81-4) =10880+32428=43308KB== ~338PEBs

    This leaves: 8192 - 338 = 7854 PEBs = 105312KB = ~981MB available data

    => 105312KB /SL = 62208KB/124KB = ~849 LEBs

    2° ubinize.cfg file

    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=981MiB
    vol_type=static
    vol_name=rootfs

    ubinize command

    sudo ubinize -o ubi.img -m 2048 -p 128KiB -O 2048 ubinize.cfg

    -m 2048 is the minimum flash I/O unit size (page)
    -p 128KiB is the size of one PEB
    -O 2048 is the VID header offset

    -m 2048 is the minimum flash I/O unit size (page)
    -p 128KiB is the size of one PEB
    -O 2048 is the VID header offset

    4° update kernel board file

                            {

                                                   .name           = "SPL",

                                                   .offset         = 0,                                                                                                                   

                                                   .size           = 1 * SZ_128K,                                                 

                            },

                            {

                                                   .name           = "SPL.backup1",

                                                   .offset         = MTDPART_OFS_APPEND,                      

                                                   .size           = 1 * SZ_128K,                                                 

                            },

                            {

                                                   .name           = "SPL.backup2",

                                                   .offset         = MTDPART_OFS_APPEND,                      

                                                   .size           = 1 * SZ_128K,                                                 

                            },

                            {

                                                   .name           = "SPL.backup3",

                                                   .offset         = MTDPART_OFS_APPEND,                      

                                                   .size           = 1 * SZ_128K,                                                 

                            },

                            {

                                                   .name           = "U-Boot",

                                                   .offset         = MTDPART_OFS_APPEND,  

                                                   .size           = 3 * SZ_128K,                                                 

                            },

                            {

                                                   .name           = "U-Boot Env",

                                                   .offset         = MTDPART_OFS_APPEND,  

                                                   .size           = 1 * SZ_128K,                                                 

                            },

                            {

                                                   .name           = "Kernel",

                                                   .offset         = MTDPART_OFS_APPEND,  

                                                   .size           = 40 * SZ_128K,                                                                      

                            },

                            {

                                                   .name           = "File System",

                                                   .offset         = MTDPART_OFS_APPEND,  

                                                   .size           = MTDPART_SIZ_FULL,

                            },

     

    5° program the NAND

    mmc rescan
    fatload mmc 0 0x84000000 ubi.img
    nand erase 0x00600000 0x1E0000
    nand write 0x84000000 0x00600000 0x1E0000
     

    setenv mtdparts mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),384k(u-boot),128k(u-boot-env),5m(kernel1),80m(rootfs1)

    -Boot# mtdparts                                                               

    device nand0 <omap2-nand.0>, # parts = 8                                       

     #: name                size            offset          mask_flags             

     0: SPL                 0x00020000      0x00000000      0                      

     1: SPL.backup1         0x00020000      0x00020000      0                      

     2: SPL.backup2         0x00020000      0x00040000      0                      

     3: SPL.backup3         0x00020000      0x00060000      0                      

     4: u-boot              0x00060000      0x00080000      0                      

     5: u-boot-env          0x00020000      0x000e0000      0                      

     6: kernel1             0x00500000      0x00100000      0                      

     7: rootfs1             0x05000000      0x00600000      0                      

                                                                                   

    active partition: nand0,0 - (SPL) 0x00020000 @ 0x00000000                      

                                                                                    

    defaults:                                                                      

    mtdids  : nand0=omap2-nand.0                                                   

    mtdparts: mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),12

    8k(SPL.backup3),384k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)   

    6° run the NAND

    setenv nandsrcaddr 0x00100000
    setenv nandroot ubi0:rootfs rw ubi.mtd=7,2048
    run nandboot

    7° get the error :

    [    2.633850] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)

    [    2.641082] Please append a correct "root=" boot option; here are the availab

    le partitions:                                                                 

    [    2.649627] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno

    wn-block(0,0)                                                                   

    regards

  • Please attach a log file with the complete boot log.

    Best regards,
    Miroslav

  • Hello

    thank you for your reply

    I'm wondering if i shouldn't have made modification in linux files to support my NAND (MT29F1G08ABAEA). The NAND is a bit diferent from EVM one (1Gb total size, 128K block, 2K page).

    Do you know what files must be modified in the linux part ?

    I have modified u-boot for this NAND :

    6114.ucr.h

    Here is the boot log :

                                                                                   
    NAND read: device 0 offset 0x100000, size 0x500000                              
     5242880 bytes read: OK                                                         
    ## Booting kernel from Legacy Image at 80007fc0 ...                             
       Image Name:   Linux-3.2.0                                                    
       Image Type:   ARM Linux Kernel Image (uncompressed)                          
       Data Size:    3157888 Bytes = 3 MiB                                          
       Load Address: 80008000                                                       
       Entry Point:  80008000                                                       
       Verifying Checksum ... OK                                                    
       XIP Kernel Image ... OK                                                      
    OK                                                                              
                                                                                    
    Starting kernel ...                                                             
                                                                                    
    Uncompressing Linux... done, booting the kernel.                                
    [    0.000000] Linux version 3.2.0 (pengwyn@pengwyn-desktop) (gcc version 4.5.3
    20110311 (prerelease) (GCC) ) #176 Mon Jun 30 14:49:08 CEST 2014                
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d  
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio
    n cache                                                                         
    [    0.000000] Machine: am335xevm                                               
    [    0.000000] Memory policy: ECC disabled, Data cache writeback                
    [    0.000000] AM335X ES2.0 (neon )                                             
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag
    es: 130048                                                                      
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw u
    bi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none                      
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)              
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)  
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)   
    [    0.000000] Memory: 512MB = 512MB total                                      
    [    0.000000] Memory: 513148k/513148k available, 11140k 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 : 0xe0800000 - 0xff000000   ( 488 MB)                
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)                
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)                
    [    0.000000]       .text : 0xc0008000 - 0xc059e000   (5720 kB)                
    [    0.000000]       .init : 0xc059e000 - 0xc05dc000   ( 248 kB)                
    [    0.000000]       .data : 0xc05dc000 - 0xc0646cb0   ( 428 kB)                
    [    0.000000]        .bss : 0xc0646cd4 - 0xc0672184   ( 174 kB)                
    [    0.000000] NR_IRQS:396                                                      
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrup
    ts                                                                              
    [    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 13
    1071999ms                                                                       
    [    0.000000] Console: colour dummy device 80x30                               
    [    0.000183] Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)          
    [    0.047149] pid_max: default: 32768 minimum: 301                             
    [    0.047302] Security Framework initialized                                   
    [    0.047424] Mount-cache hash table entries: 512                              
    [    0.047851] CPU: Testing write buffer coherency: ok                          
    [    0.068847] omap_hwmod: gfx: failed to hardreset                             
    [    0.085021] omap_hwmod: pruss: failed to hardreset                           
    [    0.086334] print_constraints: dummy:                                        
    [    0.086730] NET: Registered protocol family 16                               
    [    0.089263] OMAP GPIO hardware version 0.1                                   
    [    0.092132] UCR : Version V1.0                                               
    [    0.092407] omap_mux_init: Add partition: #1: core, flags: 0                 
    [    0.094543]  omap_i2c.1: alias fck already exists                            
    [    0.094818]  omap_i2c.2: alias fck already exists                            
    [    0.095642]  d_can.1: alias fck already exists                               
    [    0.096252]  omap2_mcspi.1: alias fck already exists                         
    [    0.096527]  omap2_mcspi.2: alias fck already exists                         
    [    0.097656]  edma.0: alias fck already exists                                
    [    0.097686]  edma.0: alias fck already exists                                
    [    0.097717]  edma.0: alias fck already exists                                
    [    0.131378] bio: create slab <bio-0> at 0                                    
    [    0.134155] SCSI subsystem initialized                                       
    [    0.136138] usbcore: registered new interface driver usbfs                   
    [    0.136505] usbcore: registered new interface driver hub                     
    [    0.136749] usbcore: registered new device driver usb                        
    [    0.136901] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3   
    [    0.137237] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1   
    [    0.153656] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz                   
    [    0.155059] tps65910 1-002d: JTAGREVNUM 0x0                                  
    [    0.157531] print_constraints: VRTC:                                         
    [    0.158996] print_constraints: VIO: at 1500 mV                               
    [    0.161346] print_constraints: VDD1: 600 <--> 1500 mV at 1100 mV normal      
    [    0.163635] print_constraints: VDD2: 600 <--> 1500 mV at 1100 mV normal      
    [    0.164703] print_constraints: VDD3: 5000 mV                                 
    [    0.166168] print_constraints: VDIG1: at 1800 mV                             
    [    0.167633] print_constraints: VDIG2: at 1800 mV                             
    [    0.169097] print_constraints: VPLL: at 1800 mV                              
    [    0.170562] print_constraints: VDAC: at 1800 mV                              
    [    0.171997] print_constraints: VAUX1: at 1800 mV                             
    [    0.173461] print_constraints: VAUX2: at 3300 mV                             
    [    0.174926] print_constraints: VAUX33: at 3300 mV                            
    [    0.176391] print_constraints: VMMC: at 3300 mV                              
    [    0.177001] tps65910 1-002d: No interrupt support, no core IRQ               
    [    0.192382] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz                   
    [    0.193145] pcf857x: probe of 2-0020 failed with error -121                  
    [    0.193695] i2c i2c-2: Invalid 7-bit I2C address 0xa0                        
    [    0.193695] i2c i2c-2: Can't create device at 0xa0                           
    [    0.194915] Advanced Linux Sound Architecture Driver Version 1.0.24.         
    [    0.196289] Switching to clocksource gp timer                                
    [    0.215270] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)             
    [    0.215454] musb-hdrc musb-hdrc.0: dma type: pio                             
    [    0.215850] MUSB0 controller's USBSS revision = 4ea20800                     
    [    0.215881] musb0: Enabled SW babble control                                 
    [    0.216705] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using
    PIO, IRQ 18                                                                     
    [    0.216888] musb-hdrc musb-hdrc.1: dma type: pio                             
    [    0.217254] MUSB1 controller's USBSS revision = 4ea20800                     
    [    0.217285] musb1: Enabled SW babble control                                 
    [    0.217468] musb-hdrc musb-hdrc.1: MUSB HDRC host driver                     
    [    0.217559] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus numbe
    r 1                                                                             
    [    0.217712] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002    
    [    0.217712] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=
    1                                                                               
    [    0.217742] usb usb1: Product: MUSB HDRC host driver                         
    [    0.217742] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd                     
    [    0.217773] usb usb1: SerialNumber: musb-hdrc.1                              
    [    0.218719] hub 1-0:1.0: USB hub found                                       
    [    0.218750] hub 1-0:1.0: 1 port detected                                     
    [    0.219421] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using
     PIO, IRQ 19                                                                    
    [    0.219909] NET: Registered protocol family 2                                
    [    0.220092] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)  
    [    0.220458] TCP established hash table entries: 16384 (order: 5, 131072 bytes
    )                                                                               
    [    0.220825] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)       
    [    0.221038] TCP: Hash tables configured (established 16384 bind 16384)       
    [    0.221069] TCP reno registered                                              
    [    0.221099] UDP hash table entries: 256 (order: 0, 4096 bytes)               
    [    0.221099] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)          
    [    0.221343] NET: Registered protocol family 1                                
    [    0.221649] RPC: Registered named UNIX socket transport module.              
    [    0.221649] RPC: Registered udp transport module.                            
    [    0.221649] RPC: Registered tcp transport module.                            
    [    0.221679] RPC: Registered tcp NFSv4.1 backchannel transport module.        
    [    0.221954] NetWinder Floating Point Emulator V0.97 (double precision)       
    [    0.241271] VFS: Disk quotas dquot_6.5.2                                     
    [    0.241363] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)       
    [    0.242004] msgmni has been set to 1002                                      
    [    0.245697] alg: No test for stdrng (krng)                                   
    [    0.246551] io scheduler noop registered                                     
    [    0.246551] io scheduler deadline registered                                 
    [    0.246643] io scheduler cfq registered (default)                            
    [    0.248596] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.895690] console [ttyO0] enabled                                          
    [    0.899932] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.907653] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.915283] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.922943] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.930603] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.938873] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00     
    [    0.957275] brd: module loaded                                               
    [    0.966308] loop: module loaded                                              
    [    0.969757] i2c-core: driver [tsl2550] using legacy suspend method           
    [    0.976013] i2c-core: driver [tsl2550] using legacy resume method            
    [    0.982269] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write  
    [    0.989349] UCR Board                                                        
    [    0.991638] Board name: UCR                                                  
    [    0.994537] Board version: #1.0                                              
    [    0.997741] The board is UCR.                                                
    [    1.001708]  omap_hsmmc.0: alias fck already exists                          
    [    1.007110]  omap_hsmmc.1: alias fck already exists                          
    [    1.013732] registered am33xx_sr device                                      
    [    1.019836] mtdoops: mtd device (mtddev=name/number) must be supplied        
    [    1.026855] omap2-nand driver initializing                                   
    [    1.031250] OneNAND driver initializing                                      
    [    1.036224] UBI error: ubi_init: UBI error: cannot initialize UBI, error -19
    [    1.045104] vcan: Virtual CAN interface driver                               
    [    1.049621] CAN device driver interface                                      
    [    1.053497] CAN bus driver for Bosch D_CAN controller 1.0                    
    [    1.059997] d_can d_can.1: device registered (irq=55, irq_obj=56)            
    [    1.116973] usb 1-1: new high-speed USB device number 2 using musb-hdrc      
    [    1.123748] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6           
    [    1.130035] davinci_mdio davinci_mdio.0: detected phy mask effeffff          
    [    1.137939] davinci_mdio.0: probed                                           
    [    1.141387] davinci_mdio davinci_mdio.0: phy[16]: device 0:10, driver Marvell
     88E3018                                                                        
    [    1.149353] davinci_mdio davinci_mdio.0: phy[28]: device 0:1c, driver Marvell
     88E1118                                                                        
    [    1.157714] usbcore: registered new interface driver cdc_ether               
    [    1.163818] usbcore: registered new interface driver cdc_eem                 
    [    1.169738] usbcore: registered new interface driver dm9601                  
    [    1.175445] cdc_ncm: 04-Aug-2011                                             
    [    1.178924] usbcore: registered new interface driver cdc_ncm                 
    [    1.184661] Initializing USB Mass Storage driver...                          
    [    1.189910] usbcore: registered new interface driver usb-storage             
    [    1.195983] USB Mass Storage support registered.                             
    [    1.201141] usbcore: registered new interface driver usbserial               
    [    1.207244] USB Serial support registered for generic                        
    [    1.267150] usb 1-1: New USB device found, idVendor=0424, idProduct=2513     
    [    1.273925] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    1.282165] hub 1-1:1.0: USB hub found                                       
    [    1.286041] hub 1-1:1.0: 3 ports detected                                    
    [    1.291320] usbcore: registered new interface driver usbserial_generic       
    [    1.297973] usbserial: USB Serial Driver core                                
    [    1.302551] USB Serial support registered for FTDI USB Serial Device         
    [    1.309417] usbcore: registered new interface driver ftdi_sio                
    [    1.315216] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver               
    [    1.321746] mousedev: PS/2 mouse device common for all mice                  
    [    1.328521] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0     
    [    1.335784] i2c /dev entries driver                                          
    [    1.340087] Linux video capture interface: v2.00                             
    [    1.345153] usbcore: registered new interface driver uvcvideo                
    [    1.350982] USB Video Class driver (1.1.1)                                   
    [    2.366973] omap_i2c omap_i2c.2: timeout waiting for bus ready               
    [    2.372894] lm75: probe of 2-0048 failed with error -121                     
    [    2.381378] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec             
    [    2.392303] cpuidle: using governor ladder                                   
    [    2.397094] cpuidle: using governor menu                                     
    [    2.404998] omap4_aes_mod_init: loading AM33X AES driver                     
    [    2.410552] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02                
    [    2.417022] omap4_aes_probe: probe() done                                    
    [    2.421356] omap4_sham_mod_init: loading AM33X SHA/MD5 driver                
    [    2.427368] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03          
    [    2.439331] omap4_sham_probe: probe() done                                   
    [    2.446166] usbcore: registered new interface driver usbhid                  
    [    2.451904] usbhid: USB HID core driver                                      
    [    2.456481] usbcore: registered new interface driver snd-usb-audio           
    [    2.464508] ALSA device list:                                                
    [    2.467559]   No soundcards found.                                           
    [    2.471038] oprofile: hardware counters not available                        
    [    2.476165] oprofile: using timer interrupt.                                 
    [    2.480560] nf_conntrack version 0.5.0 (8017 buckets, 32068 max)             
    [    2.487274] ip_tables: (C) 2000-2006 Netfilter Core Team                     
    [    2.492797] TCP cubic registered                                             
    [    2.496093] NET: Registered protocol family 17                               
    [    2.500640] can: controller area network core (rev 20090105 abi 8)           
    [    2.507049] NET: Registered protocol family 29                               
    [    2.511596] can: raw protocol (rev 20090105)                                 
    [    2.515930] can: broadcast manager protocol (rev 20090105 t)                 
    [    2.521759] Registering the dns_resolver key type                            
    [    2.526611] VFP support v0.3: implementor 41 architecture 3 part 30 variant c
     rev 3                                                                          
    [    2.534454] ThumbEE CPU extension supported.                                 
    [    2.538879] mux: Failed to setup hwmod io irq -22                            
    [    2.544311] Power Management for AM33XX family                               
    [    2.549072] Trying to load am335x-pm-firmware.bin (60 secs timeout)          
    [    2.555572] Copied the M3 firmware to UMEM                                   
    [    2.559936] smartreflex smartreflex: am33xx_sr_probe: Smartreflex requires ES
     1.0                                                                            
    [    2.567626] smartreflex: probe of smartreflex failed with error -22          
    [    2.574493] sr_init: platform driver register failed                         
    [    2.583160] clock: disabling unused clocks to save power                     
    [    2.603149] Detected MACID=1c:ba:8c:b7:27:3e                                 
    [    2.608581] cpsw: Detected MACID = 1c:ba:8c:b7:27:40                         
    [    2.614807] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:01
    UTC (946684801)                                                                 
    [    2.623870] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [    2.631103] Please append a correct "root=" boot option; here are the availab
    le partitions:                                                                  
    [    2.639648] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
    wn-block(0,0)                                                                   
    [    2.648071] Backtrace:                                                       
    [    2.650604] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0421438>] (dump_s
    tack+0x18/0x1c)                                                                 
    [    2.659210]  r6:d8123000 r5:c05cceec r4:c0647c88 r3:c05fdac8                 
    [    2.664978] [<c0421420>] (dump_stack+0x0/0x1c) from [<c04214a8>] (panic+0x6c/
    0x1a0)                                                                          
    [    2.672821] [<c042143c>] (panic+0x0/0x1a0) from [<c059ecb4>] (mount_block_roo
    t+0x184/0x228)                                                                  
    [    2.681335]  r3:00000000 r2:00000000 r1:d802df78 r0:c04fd440                 
    [    2.687133]  r7:00008000                                                     
    [    2.689697] [<c059eb30>] (mount_block_root+0x0/0x228) from [<c059efd0>] (prep
    are_namespace+0xac/0x1d4)                                                       
    [    2.699218] [<c059ef24>] (prepare_namespace+0x0/0x1d4) from [<c059e90c>] (ker
    nel_init+0x124/0x130)                                                           
    [    2.708343]  r5:c05db150 r4:c05db150                                         
    [    2.712005] [<c059e7e8>] (kernel_init+0x0/0x130) from [<c00414cc>] (do_exit+0
    x0/0x67c)                                                                       
    [    2.720092]  r5:c059e7e8 r4:00000000             

    best regards

  • Hello,

    i found that i didn't call evm_nand_init in linux board file; now here's the log :

    do you know what may be wrong ?

    Thanks

    USB Host mode controller at 47401800 using PIO, IRQ 0                           
    Net:   cpsw                                                                     
    Hit any key to stop autoboot:  0                                                
    Card did not respond to voltage select!                                         
    Booting from nand ...                                                           
                                                                                    
    NAND read: device 0 offset 0x100000, size 0x500000                              
     5242880 bytes read: OK                                                         
    ## Booting kernel from Legacy Image at 80007fc0 ...                             
       Image Name:   Linux-3.2.0                                                    
       Image Type:   ARM Linux Kernel Image (uncompressed)                          
       Data Size:    3157984 Bytes = 3 MiB                                          
       Load Address: 80008000                                                       
       Entry Point:  80008000                                                       
       Verifying Checksum ... OK                                                    
       XIP Kernel Image ... OK                                                      
    OK                                                                              
                                                                                    
    Starting kernel ...                                                             
                                                                                    
    Uncompressing Linux... done, booting the kernel.                                
    [    0.000000] Linux version 3.2.0 (pengwyn@pengwyn-desktop) (gcc version 4.5.3
    20110311 (prerelease) (GCC) ) #177 Tue Jul 1 07:56:12 CEST 2014                 
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d  
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio
    n cache                                                                         
    [    0.000000] Machine: am335xevm                                               
    [    0.000000] Memory policy: ECC disabled, Data cache writeback                
    [    0.000000] AM335X ES2.0 (neon )                                             
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag
    es: 130048                                                                      
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw u
    bi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none                      
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)              
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)  
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)   
    [    0.000000] Memory: 512MB = 512MB total                                      
    [    0.000000] Memory: 513148k/513148k available, 11140k 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 : 0xe0800000 - 0xff000000   ( 488 MB)                
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)                
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)                
    [    0.000000]       .text : 0xc0008000 - 0xc059e000   (5720 kB)                
    [    0.000000]       .init : 0xc059e000 - 0xc05dc000   ( 248 kB)                
    [    0.000000]       .data : 0xc05dc000 - 0xc0646cb0   ( 428 kB)                
    [    0.000000]        .bss : 0xc0646cd4 - 0xc0672184   ( 174 kB)                
    [    0.000000] NR_IRQS:396                                                      
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrup
    ts                                                                              
    [    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 13
    1071999ms                                                                       
    [    0.000000] Console: colour dummy device 80x30                               
    [    0.000183] Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)          
    [    0.047149] pid_max: default: 32768 minimum: 301                             
    [    0.047332] Security Framework initialized                                   
    [    0.047424] Mount-cache hash table entries: 512                              
    [    0.047851] CPU: Testing write buffer coherency: ok                          
    [    0.068786] omap_hwmod: gfx: failed to hardreset                             
    [    0.084960] omap_hwmod: pruss: failed to hardreset                           
    [    0.086273] print_constraints: dummy:                                        
    [    0.086700] NET: Registered protocol family 16                               
    [    0.089233] OMAP GPIO hardware version 0.1                                   
    [    0.092132] UCR : Version V1.0                                               
    [    0.092407] omap_mux_init: Add partition: #1: core, flags: 0                 
    [    0.094573]  omap_i2c.1: alias fck already exists                            
    [    0.094818]  omap_i2c.2: alias fck already exists                            
    [    0.095642]  d_can.1: alias fck already exists                               
    [    0.096282]  omap2_mcspi.1: alias fck already exists                         
    [    0.096527]  omap2_mcspi.2: alias fck already exists                         
    [    0.097656]  edma.0: alias fck already exists                                
    [    0.097686]  edma.0: alias fck already exists                                
    [    0.097717]  edma.0: alias fck already exists                                
    [    0.131256] bio: create slab <bio-0> at 0                                    
    [    0.134033] SCSI subsystem initialized                                       
    [    0.135986] usbcore: registered new interface driver usbfs                   
    [    0.136352] usbcore: registered new interface driver hub                     
    [    0.136596] usbcore: registered new device driver usb                        
    [    0.136749] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3   
    [    0.137084] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1   
    [    0.153625] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz                   
    [    0.155029] tps65910 1-002d: JTAGREVNUM 0x0                                  
    [    0.157501] print_constraints: VRTC:                                         
    [    0.158996] print_constraints: VIO: at 1500 mV                               
    [    0.161315] print_constraints: VDD1: 600 <--> 1500 mV at 1100 mV normal      
    [    0.163635] print_constraints: VDD2: 600 <--> 1500 mV at 1100 mV normal      
    [    0.164703] print_constraints: VDD3: 5000 mV                                 
    [    0.166137] print_constraints: VDIG1: at 1800 mV                             
    [    0.167602] print_constraints: VDIG2: at 1800 mV                             
    [    0.169067] print_constraints: VPLL: at 1800 mV                              
    [    0.170532] print_constraints: VDAC: at 1800 mV                              
    [    0.171966] print_constraints: VAUX1: at 1800 mV                             
    [    0.173461] print_constraints: VAUX2: at 3300 mV                             
    [    0.174896] print_constraints: VAUX33: at 3300 mV                            
    [    0.176361] print_constraints: VMMC: at 3300 mV                              
    [    0.177001] tps65910 1-002d: No interrupt support, no core IRQ               
    [    0.192352] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz                   
    [    0.193115] pcf857x: probe of 2-0020 failed with error -121                  
    [    0.193664] i2c i2c-2: Invalid 7-bit I2C address 0xa0                        
    [    0.193664] i2c i2c-2: Can't create device at 0xa0                           
    [    0.194885] Advanced Linux Sound Architecture Driver Version 1.0.24.         
    [    0.196258] Switching to clocksource gp timer                                
    [    0.215209] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)             
    [    0.215423] musb-hdrc musb-hdrc.0: dma type: pio                             
    [    0.215789] MUSB0 controller's USBSS revision = 4ea20800                     
    [    0.215820] musb0: Enabled SW babble control                                 
    [    0.216674] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using
    PIO, IRQ 18                                                                     
    [    0.216857] musb-hdrc musb-hdrc.1: dma type: pio                             
    [    0.217224] MUSB1 controller's USBSS revision = 4ea20800                     
    [    0.217224] musb1: Enabled SW babble control                                 
    [    0.217437] musb-hdrc musb-hdrc.1: MUSB HDRC host driver                     
    [    0.217529] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus numbe
    r 1                                                                             
    [    0.217681] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002    
    [    0.217681] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=
    1                                                                               
    [    0.217712] usb usb1: Product: MUSB HDRC host driver                         
    [    0.217712] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd                     
    [    0.217742] usb usb1: SerialNumber: musb-hdrc.1                              
    [    0.218658] hub 1-0:1.0: USB hub found                                       
    [    0.218719] hub 1-0:1.0: 1 port detected                                     
    [    0.219390] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using
     PIO, IRQ 19                                                                    
    [    0.219879] NET: Registered protocol family 2                                
    [    0.220092] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)  
    [    0.220428] TCP established hash table entries: 16384 (order: 5, 131072 bytes
    )                                                                               
    [    0.220794] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)       
    [    0.221008] TCP: Hash tables configured (established 16384 bind 16384)       
    [    0.221038] TCP reno registered                                              
    [    0.221038] UDP hash table entries: 256 (order: 0, 4096 bytes)               
    [    0.221069] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)          
    [    0.221313] NET: Registered protocol family 1                                
    [    0.221588] RPC: Registered named UNIX socket transport module.              
    [    0.221618] RPC: Registered udp transport module.                            
    [    0.221618] RPC: Registered tcp transport module.                            
    [    0.221649] RPC: Registered tcp NFSv4.1 backchannel transport module.        
    [    0.221923] NetWinder Floating Point Emulator V0.97 (double precision)       
    [    0.241180] VFS: Disk quotas dquot_6.5.2                                     
    [    0.241271] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)       
    [    0.241943] msgmni has been set to 1002                                      
    [    0.245605] alg: No test for stdrng (krng)                                   
    [    0.246429] io scheduler noop registered                                     
    [    0.246459] io scheduler deadline registered                                 
    [    0.246551] io scheduler cfq registered (default)                            
    [    0.248504] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.895355] console [ttyO0] enabled                                          
    [    0.899597] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.907318] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.914947] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.922607] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.930236] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.938476] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00     
    [    0.956756] brd: module loaded                                               
    [    0.965850] loop: module loaded                                              
    [    0.969299] i2c-core: driver [tsl2550] using legacy suspend method           
    [    0.975555] i2c-core: driver [tsl2550] using legacy resume method            
    [    0.981842] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write  
    [    0.988891] UCR Board                                                        
    [    0.991180] Board name: UCR                                                  
    [    0.994110] Board version: #1.0                                              
    [    0.997283] The board is UCR.                                                
    [    1.001251]  omap_hsmmc.0: alias fck already exists                          
    [    1.006622]  omap_hsmmc.1: alias fck already exists                          
    [    1.012908] omap-gpmc omap-gpmc: GPMC revision 6.0                           
    [    1.017791] Registering NAND on CS0                                          
    [    1.022979] registered am33xx_sr device                                      
    [    1.029083] mtdoops: mtd device (mtddev=name/number) must be supplied        
    [    1.036193] omap2-nand driver initializing                                   
    [    1.040740] ONFI flash detected                                              
    [    1.044036] ONFI param page 0 valid                                          
    [    1.047607] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron MT29F1G
    08ABAEAWP)                                                                      
    [    1.056091] Creating 8 MTD partitions on "omap2-nand.0":                     
    [    1.061523] 0x000000000000-0x000000020000 : "SPL"                            
    [    1.068176] 0x000000020000-0x000000040000 : "SPL.backup1"                    
    [    1.075256] 0x000000040000-0x000000060000 : "SPL.backup2"                    
    [    1.082336] 0x000000060000-0x000000080000 : "SPL.backup3"                    
    [    1.089294] 0x000000080000-0x0000000e0000 : "U-Boot"                         
    [    1.095886] 0x0000000e0000-0x000000100000 : "U-Boot Env"                     
    [    1.102813] 0x000000100000-0x000000600000 : "Kernel"                         
    [    1.111328] 0x000000600000-0x000008000000 : "File System"                    
    [    1.166351] usb 1-1: new high-speed USB device number 2 using musb-hdrc      
    [    1.174804] OneNAND driver initializing                                      
    [    1.179595] UBI: attaching mtd7 to ubi0                                      
    [    1.183471] UBI: physical eraseblock size:   131072 bytes (128 KiB)          
    [    1.189849] UBI: logical eraseblock size:    126976 bytes                    
    [    1.195312] UBI: smallest flash I/O unit:    2048                            
    [    1.200073] UBI: VID header offset:          2048 (aligned 2048)             
    [    1.206176] UBI: data offset:                4096                            
    [    1.368377] usb 1-1: New USB device found, idVendor=0424, idProduct=2513     
    [    1.375183] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    1.398345] hub 1-1:1.0: USB hub found                                       
    [    1.407165] hub 1-1:1.0: 3 ports detected                                    
    [    1.775451] UBI: max. sequence number:       0                               
    [    1.790924] UBI error: vtbl_check: volume table check failed: record 0, error
     9                                                                              
    [    1.798675] UBI error: ubi_init: cannot attach mtd7                          
    [    1.805358] vcan: Virtual CAN interface driver                               
    [    1.809906] CAN device driver interface                                      
    [    1.813781] CAN bus driver for Bosch D_CAN controller 1.0                    
    [    1.820251] d_can d_can.1: device registered (irq=55, irq_obj=56)            
    [    1.876892] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6           
    [    1.883148] davinci_mdio davinci_mdio.0: detected phy mask effeffff          
    [    1.890960] davinci_mdio.0: probed                                           
    [    1.894409] davinci_mdio davinci_mdio.0: phy[16]: device 0:10, driver Marvell
     88E3018                                                                        
    [    1.902374] davinci_mdio davinci_mdio.0: phy[28]: device 0:1c, driver Marvell
     88E1118                                                                        
    [    1.910736] usbcore: registered new interface driver cdc_ether               
    [    1.916870] usbcore: registered new interface driver cdc_eem                 
    [    1.922790] usbcore: registered new interface driver dm9601                  
    [    1.928497] cdc_ncm: 04-Aug-2011                                             
    [    1.931976] usbcore: registered new interface driver cdc_ncm                 
    [    1.937713] Initializing USB Mass Storage driver...                          
    [    1.942962] usbcore: registered new interface driver usb-storage             
    [    1.949066] USB Mass Storage support registered.                             
    [    1.954162] usbcore: registered new interface driver usbserial               
    [    1.960266] USB Serial support registered for generic                        
    [    1.965576] usbcore: registered new interface driver usbserial_generic       
    [    1.972198] usbserial: USB Serial Driver core                                
    [    1.976776] USB Serial support registered for FTDI USB Serial Device         
    [    1.983612] usbcore: registered new interface driver ftdi_sio                
    [    1.989440] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver               
    [    1.995849] mousedev: PS/2 mouse device common for all mice                  
    [    2.002624] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0     
    [    2.009948] i2c /dev entries driver                                          
    [    2.014221] Linux video capture interface: v2.00                             
    [    2.019348] usbcore: registered new interface driver uvcvideo                
    [    2.025146] USB Video Class driver (1.1.1)                                   
    [    3.047058] omap_i2c omap_i2c.2: timeout waiting for bus ready               
    [    3.052978] lm75: probe of 2-0048 failed with error -121                     
    [    3.061492] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec             
    [    3.072479] cpuidle: using governor ladder                                   
    [    3.077239] cpuidle: using governor menu                                     
    [    3.085174] omap4_aes_mod_init: loading AM33X AES driver                     
    [    3.090759] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02                
    [    3.097229] omap4_aes_probe: probe() done                                    
    [    3.101562] omap4_sham_mod_init: loading AM33X SHA/MD5 driver                
    [    3.107574] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03          
    [    3.119567] omap4_sham_probe: probe() done                                   
    [    3.126464] usbcore: registered new interface driver usbhid                  
    [    3.132171] usbhid: USB HID core driver                                      
    [    3.136779] usbcore: registered new interface driver snd-usb-audio           
    [    3.144866] ALSA device list:                                                
    [    3.147949]   No soundcards found.                                           
    [    3.151397] oprofile: hardware counters not available                        
    [    3.156555] oprofile: using timer interrupt.                                 
    [    3.160919] nf_conntrack version 0.5.0 (8017 buckets, 32068 max)             
    [    3.167633] ip_tables: (C) 2000-2006 Netfilter Core Team                     
    [    3.173156] TCP cubic registered                                             
    [    3.176452] NET: Registered protocol family 17                               
    [    3.181030] can: controller area network core (rev 20090105 abi 8)           
    [    3.187438] NET: Registered protocol family 29                               
    [    3.191986] can: raw protocol (rev 20090105)                                 
    [    3.196319] can: broadcast manager protocol (rev 20090105 t)                 
    [    3.202148] Registering the dns_resolver key type                            
    [    3.207031] VFP support v0.3: implementor 41 architecture 3 part 30 variant c
     rev 3                                                                          
    [    3.214813] ThumbEE CPU extension supported.                                 
    [    3.219238] mux: Failed to setup hwmod io irq -22                            
    [    3.224700] Power Management for AM33XX family                               
    [    3.229461] Trying to load am335x-pm-firmware.bin (60 secs timeout)          
    [    3.235961] Copied the M3 firmware to UMEM                                   
    [    3.240325] smartreflex smartreflex: am33xx_sr_probe: Smartreflex requires ES
     1.0                                                                            
    [    3.248016] smartreflex: probe of smartreflex failed with error -22          
    [    3.254882] sr_init: platform driver register failed                         
    [    3.263610] clock: disabling unused clocks to save power                     
    [    3.283477] Detected MACID=1c:ba:8c:b7:27:3e                                 
    [    3.288940] cpsw: Detected MACID = 1c:ba:8c:b7:27:40                         
    [    3.295196] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:01
    UTC (946684801)                                                                 
    [    3.304290] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [    3.311492] Please append a correct "root=" boot option; here are the availab
    le partitions:                                                                  
    [    3.320037] 1f00             128 mtdblock0  (driver?)                        
    [    3.325195] 1f01             128 mtdblock1  (driver?)                        
    [    3.330383] 1f02             128 mtdblock2  (driver?)                        
    [    3.335510] 1f03             128 mtdblock3  (driver?)                        
    [    3.340698] 1f04             384 mtdblock4  (driver?)                        
    [    3.345825] 1f05             128 mtdblock5  (driver?)                        
    [    3.350982] 1f06            5120 mtdblock6  (driver?)                        
    [    3.356140] 1f07          124928 mtdblock7  (driver?)                        
    [    3.361297] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
    wn-block(0,0)                                                                   
    [    3.369750] Backtrace:                                                       
    [    3.372253] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0421438>] (dump_s
    tack+0x18/0x1c)                                                                 
    [    3.380859]  r6:d8123000 r5:c05cceec r4:c0647c88 r3:c05fdac8                 
    [    3.386657] [<c0421420>] (dump_stack+0x0/0x1c) from [<c04214a8>] (panic+0x6c/
    0x1a0)                                                                          
    [    3.394470] [<c042143c>] (panic+0x0/0x1a0) from [<c059ecb4>] (mount_block_roo
    t+0x184/0x228)                                                                  
    [    3.402984]  r3:c05fdac8 r2:00000000 r1:d802df78 r0:c04fd440                 
    [    3.408782]  r7:00008000                                                     
    [    3.411376] [<c059eb30>] (mount_block_root+0x0/0x228) from [<c059efd0>] (prep
    are_namespace+0xac/0x1d4)                                                       
    [    3.420867] [<c059ef24>] (prepare_namespace+0x0/0x1d4) from [<c059e90c>] (ker
    nel_init+0x124/0x130)                                                           
    [    3.430023]  r5:c05db150 r4:c05db150                                         
    [    3.433685] [<c059e7e8>] (kernel_init+0x0/0x130) from [<c00414c8>] (do_exit+0
    x0/0x67c)                                                                       
    [    3.441741]  r5:c059e7e8 r4:00000000              

  • Hi Trichet,

    The evm_nand_init() function is part of the def_cfg structure. For the GP EVM it looks like this:

        {evm_nand_init, DEV_ON_DGHTR_BRD,
            (PROFILE_ALL & ~PROFILE_2 & ~PROFILE_3)},

    This means that it will be called for each CPLD profile except 2 & 3. I don't know if you have a CPLD switch on your board or an EEPROM, but you should make sure that the current profile is part of the allowed profiles. Otherwise, this function won't get called.

    Best regards,
    Miroslav

  • Hello

    the evm_nand_init function is called.

    Do you think the following log is OK for my MT29F1G08ABAEA NAND (regarding the way i built the ubi file) ?

    [    1.174926] OneNAND driver initializing                                     

    [    1.179687] UBI: attaching mtd7 to ubi0                                     

    [    1.183593] UBI: physical eraseblock size:   131072 bytes (128 KiB)         

    [    1.189971] UBI: logical eraseblock size:    126976 bytes                   

    [    1.195434] UBI: smallest flash I/O unit:    2048                           

    [    1.200195] UBI: VID header offset:          2048 (aligned 2048)            

    [    1.206268] UBI: data offset:                4096                           

    regards

  • Hello

    the problem is certainly here in the log :

    [    1.775451] UBI: max. sequence number:       0                               
    [    1.790924] UBI error: vtbl_check: volume table check failed: record 0, error

    Have you any idea ?

    Thanks a lot

    regards

  • You didn't copy the whole error message. Which error number is this?

    Best regards,
    Miroslav

  • Hi,

    the error is number 9

    [    1.174926] OneNAND driver initializing                                      
    [    1.179687] UBI: attaching mtd7 to ubi0                                      
    [    1.183593] UBI: physical eraseblock size:   131072 bytes (128 KiB)          
    [    1.189971] UBI: logical eraseblock size:    126976 bytes                    
    [    1.195434] UBI: smallest flash I/O unit:    2048                            
    [    1.200195] UBI: VID header offset:          2048 (aligned 2048)             
    [    1.206268] UBI: data offset:                4096                            
    [    1.369018] usb 1-1: New USB device found, idVendor=0424, idProduct=2513     
    [    1.375823] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    1.407196] hub 1-1:1.0: USB hub found                                       
    [    1.411071] hub 1-1:1.0: 3 ports detected                                    
    [    1.775634] UBI: max. sequence number:       0                               
    [    1.791107] UBI error: vtbl_check: volume table check failed: record 0, error
     9                                                                              
    [    1.798889] UBI error: ubi_init: cannot attach mtd7                          
    [

  • Here is an excerpt from the source code:

           if (reserved_pebs > ubi->good_peb_count) {
                dbg_err("too large reserved_pebs %d, good PEBs %d",
                    reserved_pebs, ubi->good_peb_count);
                err = 9;
                goto bad;
            }

    Enable CONFIG_UBIFS_FS_DEBUG in your kernel configuration to see more information. This probably means your UBIFS volume is larger than what is available on your NAND flash.

    Best regards,
    Miroslav

  • When you create your UBI image, reserve more blocks for bad block handling. Round to the larger integer, not the smaller.

    P - total PEBs on device/partition = 1024MB / 128KB = 8192
    B - PEBs reserved for bad PEB handling = 1% of P = ~81

    This should be 82, not 81.

    Check all your calculations again, but first enable the debug messages and inspect them.

    Best regards,
    Miroslav

  • Hi

    thanks, your are right, i change my calculations:

    mkfs.ubifs command

    sudo mkfs.ubifs /home/pengwyn/ti-sdk-am335x-evm-05.06.00.00/targetNFS –F -m 2048 -e 126976  -c 8106 -o ubifs.img

     

    -m 2048 is the minimum I/O unit = 2KB for the NAND used in the EVM
    -e 126976 is the LEB size which is PEB size minus 2 min. I/O units for overhead = 128K - 2*2K = 124K
    -c 8106 is the max file system size in LEBs and it is calculated below (result is marked in red so that it is easy to spot)

    SP - PEB size = 128KB
    SL - LEB size = 124KB
    P - total PEBs on device/partition = 1024MB / 128KB = 8192
    B - PEBs reserved for bad PEB handling = 1% of P = ~82
    O - = SP - SL = 4KB

    UBI overhead = (82+4)*SP+O*(P-B-4) = (82+4)*128KB+4KB*(8192-82-4) = 11008+ 32424= 43432KB== ~339PEBs

    This leaves: 8192 - 339 = 7853 PEBs = 1005184KB = ~981MB available data

    => 1005184KB /SL = 1005184KB/124KB = ~8106 LEBs

    2° ubinize.cfg file

    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=981MiB
    vol_type=static
    vol_name=rootfs

    ubinize command

    sudo ubinize -o ubi.img -m 2048 -p 128KiB -O 2048 ubinize.cfg

    -m 2048 is the minimum flash I/O unit size (page)
    -p 128KiB is the size of one PEB
    -O 2048 is the VID header offset

    -m 2048 is the minimum flash I/O unit size (page)
    -p 128KiB is the size of one PEB
    -O 2048 is the VID header offset

    And i validated the debug in the kernel, but get the same results....:

    Starting kernel ...                                                             
                                                                                    
    Uncompressing Linux... done, booting the kernel.                                
    [    0.000000] Linux version 3.2.0 (pengwyn@pengwyn-desktop) (gcc version 4.5.3
    20110311 (prerelease) (GCC) ) #178 Tue Jul 1 09:36:50 CEST 2014                 
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d  
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio
    n cache                                                                         
    [    0.000000] Machine: am335xevm                                               
    [    0.000000] Memory policy: ECC disabled, Data cache writeback                
    [    0.000000] AM335X ES2.0 (neon )                                             
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag
    es: 130048                                                                      
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw u
    bi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none                      
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)              
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)  
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)   
    [    0.000000] Memory: 512MB = 512MB total                                      
    [    0.000000] Memory: 512960k/512960k available, 11328k 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 : 0xe0800000 - 0xff000000   ( 488 MB)                
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)                
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)                
    [    0.000000]       .text : 0xc0008000 - 0xc05c9000   (5892 kB)                
    [    0.000000]       .init : 0xc05c9000 - 0xc0607000   ( 248 kB)                
    [    0.000000]       .data : 0xc0608000 - 0xc0675c38   ( 440 kB)                
    [    0.000000]        .bss : 0xc0675c5c - 0xc06a1204   ( 174 kB)                
    [    0.000000] NR_IRQS:396                                                      
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrup
    ts                                                                              
    [    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 13
    1071999ms                                                                       
    [    0.000000] Console: colour dummy device 80x30                               
    [    0.000183] Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)          
    [    0.047149] pid_max: default: 32768 minimum: 301                             
    [    0.047302] Security Framework initialized                                   
    [    0.047424] Mount-cache hash table entries: 512                              
    [    0.047851] CPU: Testing write buffer coherency: ok                          
    [    0.068756] omap_hwmod: gfx: failed to hardreset                             
    [    0.084960] omap_hwmod: pruss: failed to hardreset                           
    [    0.086242] print_constraints: dummy:                                        
    [    0.086669] NET: Registered protocol family 16                               
    [    0.089202] OMAP GPIO hardware version 0.1                                   
    [    0.092102] UCR : Version V1.0                                               
    [    0.092376] omap_mux_init: Add partition: #1: core, flags: 0                 
    [    0.094512]  omap_i2c.1: alias fck already exists                            
    [    0.094787]  omap_i2c.2: alias fck already exists                            
    [    0.095611]  d_can.1: alias fck already exists                               
    [    0.096221]  omap2_mcspi.1: alias fck already exists                         
    [    0.096466]  omap2_mcspi.2: alias fck already exists                         
    [    0.097595]  edma.0: alias fck already exists                                
    [    0.097625]  edma.0: alias fck already exists                                
    [    0.097656]  edma.0: alias fck already exists                                
    [    0.131317] bio: create slab <bio-0> at 0                                    
    [    0.134124] SCSI subsystem initialized                                       
    [    0.136108] usbcore: registered new interface driver usbfs                   
    [    0.136474] usbcore: registered new interface driver hub                     
    [    0.136718] usbcore: registered new device driver usb                        
    [    0.136871] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3   
    [    0.137207] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1   
    [    0.138580] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz                   
    [    0.140014] tps65910 1-002d: JTAGREVNUM 0x0                                  
    [    0.142486] print_constraints: VRTC:                                         
    [    0.143951] print_constraints: VIO: at 1500 mV                               
    [    0.146331] print_constraints: VDD1: 600 <--> 1500 mV at 1100 mV normal      
    [    0.148620] print_constraints: VDD2: 600 <--> 1500 mV at 1100 mV normal      
    [    0.149688] print_constraints: VDD3: 5000 mV                                 
    [    0.151153] print_constraints: VDIG1: at 1800 mV                             
    [    0.152618] print_constraints: VDIG2: at 1800 mV                             
    [    0.154083] print_constraints: VPLL: at 1800 mV                              
    [    0.155548] print_constraints: VDAC: at 1800 mV                              
    [    0.157012] print_constraints: VAUX1: at 1800 mV                             
    [    0.158508] print_constraints: VAUX2: at 3300 mV                             
    [    0.159942] print_constraints: VAUX33: at 3300 mV                            
    [    0.161407] print_constraints: VMMC: at 3300 mV                              
    [    0.162017] tps65910 1-002d: No interrupt support, no core IRQ               
    [    0.162231] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz                   
    [    0.162994] pcf857x: probe of 2-0020 failed with error -121                  
    [    0.163574] i2c i2c-2: Invalid 7-bit I2C address 0xa0                        
    [    0.163604] i2c i2c-2: Can't create device at 0xa0                           
    [    0.164825] Advanced Linux Sound Architecture Driver Version 1.0.24.         
    [    0.166168] Switching to clocksource gp timer                                
    [    0.185394] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)             
    [    0.185607] musb-hdrc musb-hdrc.0: dma type: pio                             
    [    0.186004] MUSB0 controller's USBSS revision = 4ea20800                     
    [    0.186035] musb0: Enabled SW babble control                                 
    [    0.186828] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using
    PIO, IRQ 18                                                                     
    [    0.187011] musb-hdrc musb-hdrc.1: dma type: pio                             
    [    0.187377] MUSB1 controller's USBSS revision = 4ea20800                     
    [    0.187408] musb1: Enabled SW babble control                                 
    [    0.187622] musb-hdrc musb-hdrc.1: MUSB HDRC host driver                     
    [    0.187713] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus numbe
    r 1                                                                             
    [    0.187835] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002    
    [    0.187866] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=
    1                                                                               
    [    0.187866] usb usb1: Product: MUSB HDRC host driver                         
    [    0.187896] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd                     
    [    0.187896] usb usb1: SerialNumber: musb-hdrc.1                              
    [    0.188842] hub 1-0:1.0: USB hub found                                       
    [    0.188903] hub 1-0:1.0: 1 port detected                                     
    [    0.189575] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using
     PIO, IRQ 19                                                                    
    [    0.190063] NET: Registered protocol family 2                                
    [    0.190277] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)  
    [    0.190612] TCP established hash table entries: 16384 (order: 5, 131072 bytes
    )                                                                               
    [    0.190979] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)       
    [    0.191192] TCP: Hash tables configured (established 16384 bind 16384)       
    [    0.191223] TCP reno registered                                              
    [    0.191223] UDP hash table entries: 256 (order: 0, 4096 bytes)               
    [    0.191253] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)          
    [    0.191467] NET: Registered protocol family 1                                
    [    0.191772] RPC: Registered named UNIX socket transport module.              
    [    0.191802] RPC: Registered udp transport module.                            
    [    0.191802] RPC: Registered tcp transport module.                            
    [    0.191833] RPC: Registered tcp NFSv4.1 backchannel transport module.        
    [    0.192108] NetWinder Floating Point Emulator V0.97 (double precision)       
    [    0.211395] VFS: Disk quotas dquot_6.5.2                                     
    [    0.211486] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)       
    [    0.212127] msgmni has been set to 1001                                      
    [    0.215759] alg: No test for stdrng (krng)                                   
    [    0.216613] io scheduler noop registered                                     
    [    0.216644] io scheduler deadline registered                                 
    [    0.216735] io scheduler cfq registered (default)                            
    [    0.218658] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.865447] console [ttyO0] enabled                                          
    [    0.869689] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.877410] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.885009] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.892669] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.900299] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.908538] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00     
    [    0.927062] brd: module loaded                                               
    [    0.936187] loop: module loaded                                              
    [    0.939636] i2c-core: driver [tsl2550] using legacy suspend method           
    [    0.945892] i2c-core: driver [tsl2550] using legacy resume method            
    [    0.952178] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write  
    [    0.959228] UCR Board                                                        
    [    0.961517] Board name: UCR                                                  
    [    0.964416] Board version: #1.0                                              
    [    0.967620] The board is UCR.                                                
    [    0.971588]  omap_hsmmc.0: alias fck already exists                          
    [    0.977020]  omap_hsmmc.1: alias fck already exists                          
    [    0.983245] omap-gpmc omap-gpmc: GPMC revision 6.0                           
    [    0.988159] Registering NAND on CS0                                          
    [    0.993377] registered am33xx_sr device                                      
    [    0.999481] mtdoops: mtd device (mtddev=name/number) must be supplied        
    [    1.006591] omap2-nand driver initializing                                   
    [    1.011108] ONFI flash detected                                              
    [    1.014404] ONFI param page 0 valid                                          
    [    1.017974] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron MT29F1G
    08ABAEAWP)                                                                      
    [    1.026306] Creating 8 MTD partitions on "omap2-nand.0":                     
    [    1.031738] 0x000000000000-0x000000020000 : "SPL"                            
    [    1.038543] 0x000000020000-0x000000040000 : "SPL.backup1"                    
    [    1.045623] 0x000000040000-0x000000060000 : "SPL.backup2"                    
    [    1.052734] 0x000000060000-0x000000080000 : "SPL.backup3"                    
    [    1.059692] 0x000000080000-0x0000000e0000 : "U-Boot"                         
    [    1.066284] 0x0000000e0000-0x000000100000 : "U-Boot Env"                     
    [    1.073181] 0x000000100000-0x000000600000 : "Kernel"                         
    [    1.081695] 0x000000600000-0x000008000000 : "File System"                    
    [    1.136657] usb 1-1: new high-speed USB device number 2 using musb-hdrc      
    [    1.145080] OneNAND driver initializing                                      
    [    1.149841] UBI: attaching mtd7 to ubi0                                      
    [    1.153747] UBI: physical eraseblock size:   131072 bytes (128 KiB)          
    [    1.160125] UBI: logical eraseblock size:    126976 bytes                    
    [    1.165588] UBI: smallest flash I/O unit:    2048                            
    [    1.170349] UBI: VID header offset:          2048 (aligned 2048)             
    [    1.176422] UBI: data offset:                4096                            
    [    1.317840] usb 1-1: New USB device found, idVendor=0424, idProduct=2513     
    [    1.324615] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    1.357086] hub 1-1:1.0: USB hub found                                       
    [    1.360961] hub 1-1:1.0: 3 ports detected                                    
    [    1.746124] UBI: max. sequence number:       0                               
    [    1.761596] UBI error: vtbl_check: too large reserved_pebs 8102, good PEBs 97
    6                                                                               
    [    1.768920] UBI error: vtbl_check: volume table check failed: record 0, error
     9                                                                              
    [    1.776733] UBI error: ubi_attach_mtd_dev: failed to attach by scanning, erro
    r -22                                                                           
    [    1.784484] UBI error: ubi_init: cannot attach mtd7                          
    [    1.791168] vcan: Virtual CAN interface driver                               
    [    1.795684] CAN device driver interface                                      
    [    1.799591] CAN bus driver for Bosch D_CAN controller 1.0                    
    [    1.806030] d_can d_can.1: device registered (irq=55, irq_obj=56)            
    [    1.856842] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6           
    [    1.863128] davinci_mdio davinci_mdio.0: detected phy mask effeffff          
    [    1.870910] davinci_mdio.0: probed                                           
    [    1.874359] davinci_mdio davinci_mdio.0: phy[16]: device 0:10, driver Marvell
     88E3018                                                                        
    [    1.882324] davinci_mdio davinci_mdio.0: phy[28]: device 0:1c, driver Marvell
     88E1118                                                                        
    [    1.890686] usbcore: registered new interface driver cdc_ether               
    [    1.896820] usbcore: registered new interface driver cdc_eem                 
    [    1.902740] usbcore: registered new interface driver dm9601                  
    [    1.908447] cdc_ncm: 04-Aug-2011                                             
    [    1.911926] usbcore: registered new interface driver cdc_ncm                 
    [    1.917663] Initializing USB Mass Storage driver...                          
    [    1.922912] usbcore: registered new interface driver usb-storage             
    [    1.928985] USB Mass Storage support registered.                             
    [    1.934112] usbcore: registered new interface driver usbserial               
    [    1.940216] USB Serial support registered for generic                        
    [    1.945495] usbcore: registered new interface driver usbserial_generic       
    [    1.952117] usbserial: USB Serial Driver core                                
    [    1.956695] USB Serial support registered for FTDI USB Serial Device         
    [    1.963531] usbcore: registered new interface driver ftdi_sio                
    [    1.969360] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver               
    [    1.975799] mousedev: PS/2 mouse device common for all mice                  
    [    1.982543] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0     
    [    1.989898] i2c /dev entries driver                                          
    [    1.994171] Linux video capture interface: v2.00                             
    [    1.999267] usbcore: registered new interface driver uvcvideo                
    [    2.005096] USB Video Class driver (1.1.1)                                   
    [    3.026855] omap_i2c omap_i2c.2: timeout waiting for bus ready               
    [    3.032806] lm75: probe of 2-0048 failed with error -121                     
    [    3.041534] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec             
    [    3.052490] cpuidle: using governor ladder                                   
    [    3.057250] cpuidle: using governor menu                                     
    [    3.065185] omap4_aes_mod_init: loading AM33X AES driver                     
    [    3.070770] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02                
    [    3.077239] omap4_aes_probe: probe() done                                    
    [    3.081573] omap4_sham_mod_init: loading AM33X SHA/MD5 driver                
    [    3.087585] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03          
    [    3.099609] omap4_sham_probe: probe() done                                   
    [    3.106506] usbcore: registered new interface driver usbhid                  
    [    3.112213] usbhid: USB HID core driver                                      
    [    3.116851] usbcore: registered new interface driver snd-usb-audio           
    [    3.124908] ALSA device list:                                                
    [    3.127990]   No soundcards found.                                           
    [    3.131439] oprofile: hardware counters not available                        
    [    3.136596] oprofile: using timer interrupt.                                 
    [    3.140960] nf_conntrack version 0.5.0 (8015 buckets, 32060 max)             
    [    3.147674] ip_tables: (C) 2000-2006 Netfilter Core Team                     
    [    3.153198] TCP cubic registered                                             
    [    3.156494] NET: Registered protocol family 17                               
    [    3.161071] can: controller area network core (rev 20090105 abi 8)           
    [    3.167480] NET: Registered protocol family 29                               
    [    3.172027] can: raw protocol (rev 20090105)                                 
    [    3.176361] can: broadcast manager protocol (rev 20090105 t)                 
    [    3.182189] Registering the dns_resolver key type                            
    [    3.187072] VFP support v0.3: implementor 41 architecture 3 part 30 variant c
     rev 3                                                                          
    [    3.194885] ThumbEE CPU extension supported.                                 
    [    3.199310] mux: Failed to setup hwmod io irq -22                            
    [    3.204742] Power Management for AM33XX family                               
    [    3.209503] Trying to load am335x-pm-firmware.bin (60 secs timeout)          
    [    3.216003] Copied the M3 firmware to UMEM                                   
    [    3.220367] smartreflex smartreflex: am33xx_sr_probe: Smartreflex requires ES
     1.0                                                                            
    [    3.228027] smartreflex: probe of smartreflex failed with error -22          
    [    3.234924] sr_init: platform driver register failed                         
    [    3.243713] clock: disabling unused clocks to save power                     
    [    3.263793] Detected MACID=1c:ba:8c:b7:27:3e                                 
    [    3.269256] cpsw: Detected MACID = 1c:ba:8c:b7:27:40                         
    [    3.275482] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:01
    UTC (946684801)                                                                 
    [    3.284576] UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", erro
    r -19                                                                           
    [    3.292327] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [    3.299530] Please append a correct "root=" boot option; here are the availab
    le partitions:                                                                  
    [    3.308074] 1f00             128 mtdblock0  (driver?)                        
    [    3.313232] 1f01             128 mtdblock1  (driver?)                        
    [    3.318389] 1f02             128 mtdblock2  (driver?)                        
    [    3.323547] 1f03             128 mtdblock3  (driver?)                        
    [    3.328704] 1f04             384 mtdblock4  (driver?)                        
    [    3.333862] 1f05             128 mtdblock5  (driver?)                        
    [    3.339019] 1f06            5120 mtdblock6  (driver?)                        
    [    3.344177] 1f07          124928 mtdblock7  (driver?)                        
    [    3.349334] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
    wn-block(0,0)                                                                   
    [    3.357757] Backtrace:                                                       
    [    3.360290] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c043de4c>] (dump_s
    tack+0x18/0x1c)                                                                 
    [    3.368896]  r6:d8

  • Hi

    according to debug i put a smaller value for -c parameter of  mkfs.ubifs  command

    Now i have no error on UBI detection, but file system can't be mounted.

    1) My ubi.img is 2Mb size for a 74,6Mb file system : do you think this may be correct ?

    2) is my way of programming correct :

    U-Boot# mmc rescan                                                              
    U-Boot# fatload mmc 0 0x84000000 MLO                                            
    reading MLO                                                                     
                                                                                    
    84301 bytes read                                                                
    U-Boot# nand erase.chip                                                         
                                                                                    
    NAND erase.chip: device 0 whole chip                                            
    Erasing at 0x7fe0000 -- 100% complete.                                          
    OK                                                                              
    U-Boot# nand write 0x84000000 0x0 0x1494D                                       
                                                                                    
    NAND write: device 0 offset 0x0, size 0x1494d                                   
     84301 bytes written: OK                                                        
    U-Boot# mmc rescan                                                              
    U-Boot# fatload mmc 0 0x84000000 u-boot.img                                     
    reading u-boot.img                                                              
                                                                                    
    341296 bytes read                                                               
    U-Boot# nand write 0x84000000 0x80000 0x53530                                   
                                                                                    
    NAND write: device 0 offset 0x80000, size 0x53530                               
     341296 bytes written: OK                                                       
    U-Boot# mmc rescan                                                              
    U-Boot# fatload mmc 0 0x84000000 uImage                                         
    reading uImage                                                                  
                                                                                    
    3238312 bytes read                                                              
    U-Boot# nand write 0x84000000 0x00100000 0x3169A8                               
                                                                                    
    NAND write: device 0 offset 0x100000, size 0x3169a8                             
     3238312 bytes written: OK                                                      
    U-Boot# mw.b 0x84000000 0xFF 0x200000                                           
    U-Boot# mmc rescan                                                              
    U-Boot# fatload mmc 0 0x84000000 ubi.img                                        
    reading ubi.img                                                                 
                                                                                    
    2097152 bytes read                                                              
    U-Boot# nand write 0x84000000 0x600000 0x200000                                 
                                                                                    
    NAND write: device 0 offset 0x600000, size 0x200000                             
     2097152 bytes written: OK                                                      
    U-Boot#

    Thanks a lot

    The log is :

    [    1.746398] UBI: max. sequence number:       0                               
    [    1.764892] UBI: attached mtd7 to ubi0                                       
    [    1.768768] UBI: MTD device name:            "File System"                   
    [    1.774291] UBI: MTD device size:            122 MiB                         
    [    1.779327] UBI: number of good PEBs:        976                             
    [    1.783996] UBI: number of bad PEBs:         0                               
    [    1.788513] UBI: number of corrupted PEBs:   0                               
    [    1.792999] UBI: max. allowed volumes:       128                             
    [    1.797668] UBI: wear-leveling threshold:    4096                            
    [    1.802429] UBI: number of internal volumes: 1                               
    [    1.806945] UBI: number of user volumes:     1                               
    [    1.811431] UBI: available PEBs:             71                              
    [    1.816009] UBI: total number of reserved PEBs: 905                          
    [    1.820953] UBI: number of PEBs reserved for bad PEB handling: 9             
    [    1.827056] UBI: max/mean erase counter: 0/0                                 
    [    1.831359] UBI: image sequence number:  0                                   
    [    1.835632] UBI: background thread "ubi_bgt0d" started, PID 596              
    [    1.858001] vcan: Virtual CAN interface driver                               
    [    1.862518] CAN device driver interface                                      
    [    1.866394] CAN bus driver for Bosch D_CAN controller 1.0                    
    [    1.886993] d_can d_can.1: device registered (irq=55, irq_obj=56)            
    [    1.956817] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6           
    [    1.963073] davinci_mdio davinci_mdio.0: detected phy mask effeffff          
    [    1.987792] davinci_mdio.0: probed                                           
    [    1.991241] davinci_mdio davinci_mdio.0: phy[16]: device 0:10, driver Marvell
     88E3018                                                                        
    [    1.999206] davinci_mdio davinci_mdio.0: phy[28]: device 0:1c, driver Marvell
     88E1118                                                                        
    [    2.027069] usbcore: registered new interface driver cdc_ether               
    [    2.036895] usbcore: registered new interface driver cdc_eem                 
    [    2.056823] usbcore: registered new interface driver dm9601                  
    [    2.062500] cdc_ncm: 04-Aug-2011                                             
    [    2.077148] usbcore: registered new interface driver cdc_ncm                 
    [    2.082885] Initializing USB Mass Storage driver...                          
    [    2.096923] usbcore: registered new interface driver usb-storage             
    [    2.102996] USB Mass Storage support registered.                             
    [    2.117187] usbcore: registered new interface driver usbserial               
    [    2.126892] USB Serial support registered for generic                        
    [    2.136962] usbcore: registered new interface driver usbserial_generic       
    [    2.143554] usbserial: USB Serial Driver core                                
    [    2.156890] USB Serial support registered for FTDI USB Serial Device         
    [    2.177001] usbcore: registered new interface driver ftdi_sio                
    [    2.182800] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver               
    [    2.197143] mousedev: PS/2 mouse device common for all mice                  
    [    2.217620] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0     
    [    2.237182] i2c /dev entries driver                                          
    [    2.241455] Linux video capture interface: v2.00                             
    [    2.257141] usbcore: registered new interface driver uvcvideo                
    [    2.262939] USB Video Class driver (1.1.1)                                   
    [    3.286834] omap_i2c omap_i2c.2: timeout waiting for bus ready               
    [    3.292785] lm75: probe of 2-0048 failed with error -121                     
    [    3.301452] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec             
    [    3.312438] cpuidle: using governor ladder                                   
    [    3.317199] cpuidle: using governor menu                                     
    [    3.325164] omap4_aes_mod_init: loading AM33X AES driver                     
    [    3.330718] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02                
    [    3.337188] omap4_aes_probe: probe() done                                    
    [    3.341522] omap4_sham_mod_init: loading AM33X SHA/MD5 driver                
    [    3.347564] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03          
    [    3.359527] omap4_sham_probe: probe() done                                   
    [    3.366424] usbcore: registered new interface driver usbhid                  
    [    3.372131] usbhid: USB HID core driver                                      
    [    3.376739] usbcore: registered new interface driver snd-usb-audio           
    [    3.384796] ALSA device list:                                                
    [    3.387847]   No soundcards found.                                           
    [    3.391296] oprofile: hardware counters not available                        
    [    3.396453] oprofile: using timer interrupt.                                 
    [    3.400848] nf_conntrack version 0.5.0 (8015 buckets, 32060 max)             
    [    3.407531] ip_tables: (C) 2000-2006 Netfilter Core Team                     
    [    3.413085] TCP cubic registered                                             
    [    3.416381] NET: Registered protocol family 17                               
    [    3.420928] can: controller area network core (rev 20090105 abi 8)           
    [    3.427368] NET: Registered protocol family 29                               
    [    3.431915] can: raw protocol (rev 20090105)                                 
    [    3.436248] can: broadcast manager protocol (rev 20090105 t)                 
    [    3.442077] Registering the dns_resolver key type                            
    [    3.446960] VFP support v0.3: implementor 41 architecture 3 part 30 variant c
     rev 3                                                                          
    [    3.454772] ThumbEE CPU extension supported.                                 
    [    3.459197] mux: Failed to setup hwmod io irq -22                            
    [    3.464630] Power Management for AM33XX family                               
    [    3.469421] Trying to load am335x-pm-firmware.bin (60 secs timeout)          
    [    3.475891] Copied the M3 firmware to UMEM                                   
    [    3.480285] smartreflex smartreflex: am33xx_sr_probe: Smartreflex requires ES
     1.0                                                                            
    [    3.487945] smartreflex: probe of smartreflex failed with error -22          
    [    3.494812] sr_init: platform driver register failed                         
    [    3.503601] clock: disabling unused clocks to save power                     
    [    3.523773] Detected MACID=1c:ba:8c:b7:27:3e                                 
    [    3.529266] cpsw: Detected MACID = 1c:ba:8c:b7:27:40                         
    [    3.535491] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:02
    UTC (946684802)                                                                 
    [    3.987823] UBIFS: static UBI volume - read-only mode                        
    [    3.992980] UBIFS error (pid 1): mount_ubifs: cannot mount read-write - read-
    only media                                                                      
    [    4.001525] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [    4.008758] Please append a correct "root=" boot option; here are the availab
    le partitions:                                                                  
    [    4.017303] 1f00             128 mtdblock0  (driver?)                        
    [    4.022460] 1f01             128 mtdblock1  (driver?)                        
    [    4.027648] 1f02             128 mtdblock2  (driver?)                        
    [    4.032775] 1f03             128 mtdblock3  (driver?)                        
    [    4.037963] 1f04             384 mtdblock4  (driver?)                        
    [    4.043121] 1f05             128 mtdblock5  (driver?)                        
    [    4.048278] 1f06            5120 mtdblock6  (driver?)                        
    [    4.053436] 1f07          124928 mtdblock7  (driver?)                        
    [    4.058593] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
    wn-block(0,0)                                                                   
    [    4.067016] Backtrace:                                                       
    [    4.069580] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c043de4c>] (dump_s
    tack+0x18/0x1c)                                                                 
    [    4.078186]  r6:d8123000 r5:c05f7f94 r4:c0676c08 r3:c0629ac8                 
    [    4.083984] [<c043de34>] (dump_stack+0x0/0x1c) from [<c043debc>] (panic+0x6c/
    0x1a0)                                                                          
    [    4.091796] [<c043de50>] (panic+0x0/0x1a0) from [<c05c9cb4>] (mount_block_roo
    t+0x184/0x228)                                                                  
    [    4.100311]  r3:c0629ac8 r2:00000000 r1:d802df78 r0:c051d260                 
    [    4.106109]  r7:00008000                                                     
    [    4.108703] [<c05c9b30>] (mount_block_root+0x0/0x228) from [<c05c9fd0>] (prep
    are_namespace+0xac/0x1d4)                                                       
    [    4.118194] [<c05c9f24>] (prepare_namespace+0x0/0x1d4) from [<c05c990c>] (ker
    nel_init+0x124/0x130)                                                           
    [    4.127349]  r5:c06061f0 r4:c06061f0                                         
    [    4.131011] [<c05c97e8>] (kernel_init+0x0/0x130) from [<c00414c8>] (do_exit+0
    x0/0x67c)                                                                       
    [    4.139099]  r5:c05c97e8 r4:00000000                                         

  • Are you sure your offsets are correct?

    Please post your nand_partitions structure from your board config file and also your mtdparts U-Boot variable.

    Best regards,
    Miroslav

  • Hi

    thanks for the reply

    here's the information :

    U-Boot# mtdparts                                                                
                                                                                    
    device nand0 <omap2-nand.0>, # parts = 8                                        
     #: name                size            offset          mask_flags              
     0: SPL                 0x00020000      0x00000000      0                       
     1: SPL.backup1         0x00020000      0x00020000      0                       
     2: SPL.backup2         0x00020000      0x00040000      0                       
     3: SPL.backup3         0x00020000      0x00060000      0                       
     4: u-boot              0x00060000      0x00080000      0                       
     5: u-boot-env          0x00020000      0x000e0000      0                       
     6: kernel              0x00500000      0x00100000      0                       
     7: rootfs              0x07a00000      0x00600000      0                       
                                                                                    
    active partition: nand0,0 - (SPL) 0x00020000 @ 0x00000000                       
                                                                                    
    defaults:                                                                       
    mtdids  : nand0=omap2-nand.0                                                    
    mtdparts: mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),12
    8k(SPL.backup3),384k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)              
    U-Boot#

    board info file

    /*+------------+-->0x00000000-> SPL start         (SPL copy on 1st block)
    |            |
    |            |-->0x0001FFFF-> SPL end
    |            |-->0x00020000-> SPL.backup1 start (SPL copy on 2nd block)
    |            |
    |            |-->0x0003FFFF-> SPL.backup1 end
    |            |-->0x00040000-> SPL.backup2 start (SPL copy on 3rd block)
    |            |
    |            |-->0x0005FFFF-> SPL.backup2 end
    |            |-->0x00060000-> SPL.backup3 start (SPL copy on 4th block)
    |            |
    |            |-->0x0007FFFF-> SPL.backup3 end
    |            |-->0x00080000-> U-Boot start
    |            |                                    
    |            |-->0x000DFFFF-> U-Boot end
    |            |-->0x000E0000-> ENV start
    |            |
    |            |
    |            |-->0x000FFFFF-> ENV end
    |            |-->0x00100000-> Linux Kernel start
    |            |
    |            |
    |            |
    |            |
    |            |-->0x005FFFFF-> Linux Kernel end
    |            |-->0x00600000-> File system start
    */
        {
            .name           = "SPL",
            .offset         = 0,                    
            .size           = 1 * SZ_128K,            
        },
        {
            .name           = "SPL.backup1",
            .offset         = MTDPART_OFS_APPEND,    
            .size           = 1 * SZ_128K,            
        },
        {
            .name           = "SPL.backup2",
            .offset         = MTDPART_OFS_APPEND,    
            .size           = 1 * SZ_128K,            
        },
        {
            .name           = "SPL.backup3",
            .offset         = MTDPART_OFS_APPEND,    
            .size           = 1 * SZ_128K,            
        },
        {
            .name           = "U-Boot",
            .offset         = MTDPART_OFS_APPEND,   
            .size           = 3 * SZ_128K,            
        },
        {
            .name           = "U-Boot Env",
            .offset         = MTDPART_OFS_APPEND,   
            .size           = 1 * SZ_128K,            
        },
        {
            .name           = "Kernel",
            .offset         = MTDPART_OFS_APPEND,   
            .size           = 40 * SZ_128K,            
        },
        {
            .name           = "File System",
            .offset         = MTDPART_OFS_APPEND,   
            .size           = MTDPART_SIZ_FULL,
        },

  • Hello again

    on EVM based board we can see in log :

    [    5.261322] UBI: image sequence number:  643012977

    but on my log :
        
    [    1.150024] UBI: attaching mtd7 to ubi0                                      
    [    1.153900] UBI: physical eraseblock size:   131072 bytes (128 KiB)          
    [    1.160278] UBI: logical eraseblock size:    126976 bytes                    
    [    1.165740] UBI: smallest flash I/O unit:    2048                            
    [    1.170501] UBI: VID header offset:          2048 (aligned 2048)             
    [    1.176605] UBI: data offset:                4096                            
    [    1.318542] usb 1-1: New USB device found, idVendor=0424, idProduct=2513     
    [    1.325347] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    1.357269] hub 1-1:1.0: USB hub found                                       
    [    1.361724] hub 1-1:1.0: 3 ports detected                                    
    [    1.746398] UBI: max. sequence number:       0                               
    [    1.764892] UBI: attached mtd7 to ubi0                                       
    [    1.768737] UBI: MTD device name:            "File System"                   
    [    1.774291] UBI: MTD device size:            122 MiB                         
    [    1.779327] UBI: number of good PEBs:        976                             
    [    1.783996] UBI: number of bad PEBs:         0                               
    [    1.788482] UBI: number of corrupted PEBs:   0                               
    [    1.792999] UBI: max. allowed volumes:       128                             
    [    1.797668] UBI: wear-leveling threshold:    4096                            
    [    1.802429] UBI: number of internal volumes: 1                               
    [    1.806915] UBI: number of user volumes:     1                               
    [    1.811401] UBI: available PEBs:             38                              
    [    1.815979] UBI: total number of reserved PEBs: 938                          
    [    1.820922] UBI: number of PEBs reserved for bad PEB handling: 9             
    [    1.827026] UBI: max/mean erase counter: 0/0                                 
    [    1.831329] UBI: image sequence number:  0                                   
    [    1.835601] UBI: background thread "ubi_bgt0d" started, PID 596              
    [    1.

    i'm wondering if my ubi.img is good (2Mb for a file system of 74,6M) ?

    thank you

    thanks

  • Trichet,

    I just noticed that your UBIFS is only 2MB. This isn't normal. Usually the UBIFS is around 2/3 of the uncompressed file system size. Can you try with the UBI image that comes with your SDK?

    Best regards,
    Miroslav

  • Hi,

    thanks, i have changed my command (run just upper targetNFS repertory) :

    sudo mkfs.ubifs --root=targetNFS –F -m 2048 -e 126976  -c 900 -v  -o ubifs.img

    and i get a 48,2Mb file for ubifs.img

    1) is this the good way to copy the ubifs.img to NAND :

    U-Boot# mw.b 0x84000000 0xFF 0x7A00000                                          
    U-Boot# mmc rescan                                                              
    U-Boot# fatload mmc 0 0x84000000 ubi.img                                        
    reading ubi.img                                                                 
                                                                                    
    50593792 bytes read                                                             
    U-Boot# nand erase 0x600000 0x7A00000                                           
                                                                                    
    NAND erase: device 0 offset 0x600000, size 0x7a00000                            
    Erasing at 0x7fe0000 -- 100% complete.                                          
    OK                                                                              
    U-Boot# nand write 0x84000000 0x600000 0x3040000                                
                                                                                    
    NAND write: device 0 offset 0x600000, size 0x3040000                            
     50593792 bytes written: OK   

    but get allways error :

      2) HAve you any clue for the error still there ?

                                                                                
    Starting kernel ...                                                             
                                                                                    
    Uncompressing Linux... done, booting the kernel.                                
    [    0.000000] Linux version 3.2.0 (pengwyn@pengwyn-desktop) (gcc version 4.5.3
    20110311 (prerelease) (GCC) ) #178 Tue Jul 1 09:36:50 CEST 2014                 
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d  
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio
    n cache                                                                         
    [    0.000000] Machine: am335xevm                                               
    [    0.000000] Memory policy: ECC disabled, Data cache writeback                
    [    0.000000] AM335X ES2.0 (neon )                                             
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag
    es: 130048                                                                      
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw u
    bi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none                      
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)              
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)  
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)   
    [    0.000000] Memory: 512MB = 512MB total                                      
    [    0.000000] Memory: 512960k/512960k available, 11328k 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 : 0xe0800000 - 0xff000000   ( 488 MB)                
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)                
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)                
    [    0.000000]       .text : 0xc0008000 - 0xc05c9000   (5892 kB)                
    [    0.000000]       .init : 0xc05c9000 - 0xc0607000   ( 248 kB)                
    [    0.000000]       .data : 0xc0608000 - 0xc0675c38   ( 440 kB)                
    [    0.000000]        .bss : 0xc0675c5c - 0xc06a1204   ( 174 kB)                
    [    0.000000] NR_IRQS:396                                                      
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrup
    ts                                                                              
    [    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 13
    1071999ms                                                                       
    [    0.000000] Console: colour dummy device 80x30                               
    [    0.000152] Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)          
    [    0.047180] pid_max: default: 32768 minimum: 301                             
    [    0.047332] Security Framework initialized                                   
    [    0.047424] Mount-cache hash table entries: 512                              
    [    0.047851] CPU: Testing write buffer coherency: ok                          
    [    0.068756] omap_hwmod: gfx: failed to hardreset                             
    [    0.084930] omap_hwmod: pruss: failed to hardreset                           
    [    0.086242] print_constraints: dummy:                                        
    [    0.086639] NET: Registered protocol family 16                               
    [    0.089172] OMAP GPIO hardware version 0.1                                   
    [    0.092071] UCR : Version V1.0                                               
    [    0.092315] omap_mux_init: Add partition: #1: core, flags: 0                 
    [    0.094451]  omap_i2c.1: alias fck already exists                            
    [    0.094726]  omap_i2c.2: alias fck already exists                            
    [    0.095520]  d_can.1: alias fck already exists                               
    [    0.096191]  omap2_mcspi.1: alias fck already exists                         
    [    0.096435]  omap2_mcspi.2: alias fck already exists                         
    [    0.097595]  edma.0: alias fck already exists                                
    [    0.097595]  edma.0: alias fck already exists                                
    [    0.097625]  edma.0: alias fck already exists                                
    [    0.131317] bio: create slab <bio-0> at 0                                    
    [    0.134094] SCSI subsystem initialized                                       
    [    0.136108] usbcore: registered new interface driver usbfs                   
    [    0.136474] usbcore: registered new interface driver hub                     
    [    0.136688] usbcore: registered new device driver usb                        
    [    0.136871] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3   
    [    0.137207] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1   
    [    0.138580] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz                   
    [    0.140014] tps65910 1-002d: JTAGREVNUM 0x0                                  
    [    0.142486] print_constraints: VRTC:                                         
    [    0.143981] print_constraints: VIO: at 1500 mV                               
    [    0.146331] print_constraints: VDD1: 600 <--> 1500 mV at 1100 mV normal      
    [    0.148651] print_constraints: VDD2: 600 <--> 1500 mV at 1100 mV normal      
    [    0.149688] print_constraints: VDD3: 5000 mV                                 
    [    0.151153] print_constraints: VDIG1: at 1800 mV                             
    [    0.152618] print_constraints: VDIG2: at 1800 mV                             
    [    0.154052] print_constraints: VPLL: at 1800 mV                              
    [    0.155548] print_constraints: VDAC: at 1800 mV                              
    [    0.157012] print_constraints: VAUX1: at 1800 mV                             
    [    0.158477] print_constraints: VAUX2: at 3300 mV                             
    [    0.159942] print_constraints: VAUX33: at 3300 mV                            
    [    0.161407] print_constraints: VMMC: at 3300 mV                              
    [    0.162048] tps65910 1-002d: No interrupt support, no core IRQ               
    [    0.162231] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz                   
    [    0.162994] pcf857x: probe of 2-0020 failed with error -121                  
    [    0.163604] i2c i2c-2: Invalid 7-bit I2C address 0xa0                        
    [    0.163635] i2c i2c-2: Can't create device at 0xa0                           
    [    0.164855] Advanced Linux Sound Architecture Driver Version 1.0.24.         
    [    0.166229] Switching to clocksource gp timer                                
    [    0.185424] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)             
    [    0.185607] musb-hdrc musb-hdrc.0: dma type: pio                             
    [    0.186035] MUSB0 controller's USBSS revision = 4ea20800                     
    [    0.186065] musb0: Enabled SW babble control                                 
    [    0.186859] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using
    PIO, IRQ 18                                                                     
    [    0.187042] musb-hdrc musb-hdrc.1: dma type: pio                             
    [    0.187408] MUSB1 controller's USBSS revision = 4ea20800                     
    [    0.187408] musb1: Enabled SW babble control                                 
    [    0.187622] musb-hdrc musb-hdrc.1: MUSB HDRC host driver                     
    [    0.187713] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus numbe
    r 1                                                                             
    [    0.187835] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002    
    [    0.187866] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=
    1                                                                               
    [    0.187896] usb usb1: Product: MUSB HDRC host driver                         
    [    0.187896] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd                     
    [    0.187927] usb usb1: SerialNumber: musb-hdrc.1                              
    [    0.188873] hub 1-0:1.0: USB hub found                                       
    [    0.188934] hub 1-0:1.0: 1 port detected                                     
    [    0.189605] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using
     PIO, IRQ 19                                                                    
    [    0.190063] NET: Registered protocol family 2                                
    [    0.190277] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)  
    [    0.190643] TCP established hash table entries: 16384 (order: 5, 131072 bytes
    )                                                                               
    [    0.191009] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)       
    [    0.191223] TCP: Hash tables configured (established 16384 bind 16384)       
    [    0.191253] TCP reno registered                                              
    [    0.191253] UDP hash table entries: 256 (order: 0, 4096 bytes)               
    [    0.191284] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)          
    [    0.191497] NET: Registered protocol family 1                                
    [    0.191802] RPC: Registered named UNIX socket transport module.              
    [    0.191802] RPC: Registered udp transport module.                            
    [    0.191833] RPC: Registered tcp transport module.                            
    [    0.191833] RPC: Registered tcp NFSv4.1 backchannel transport module.        
    [    0.192108] NetWinder Floating Point Emulator V0.97 (double precision)       
    [    0.211395] VFS: Disk quotas dquot_6.5.2                                     
    [    0.211486] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)       
    [    0.212158] msgmni has been set to 1001                                      
    [    0.215820] alg: No test for stdrng (krng)                                   
    [    0.216674] io scheduler noop registered                                     
    [    0.216674] io scheduler deadline registered                                 
    [    0.216766] io scheduler cfq registered (default)                            
    [    0.218719] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.865600] console [ttyO0] enabled                                          
    [    0.869842] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.877563] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.885192] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.892852] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.900512] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.908721] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00     
    [    0.927276] brd: module loaded                                               
    [    0.936370] loop: module loaded                                              
    [    0.939819] i2c-core: driver [tsl2550] using legacy suspend method           
    [    0.946075] i2c-core: driver [tsl2550] using legacy resume method            
    [    0.952362] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write  
    [    0.959411] UCR Board                                                        
    [    0.961700] Board name: UCR                                                  
    [    0.964630] Board version: #1.0                                              
    [    0.967803] The board is UCR.                                                
    [    0.971771]  omap_hsmmc.0: alias fck already exists                          
    [    0.977203]  omap_hsmmc.1: alias fck already exists                          
    [    0.983398] omap-gpmc omap-gpmc: GPMC revision 6.0                           
    [    0.988311] Registering NAND on CS0                                          
    [    0.993499] registered am33xx_sr device                                      
    [    0.999603] mtdoops: mtd device (mtddev=name/number) must be supplied        
    [    1.006744] omap2-nand driver initializing                                   
    [    1.011291] ONFI flash detected                                              
    [    1.014587] ONFI param page 0 valid                                          
    [    1.018127] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron MT29F1G
    08ABAEAWP)                                                                      
    [    1.026489] Creating 8 MTD partitions on "omap2-nand.0":                     
    [    1.031921] 0x000000000000-0x000000020000 : "SPL"                            
    [    1.038665] 0x000000020000-0x000000040000 : "SPL.backup1"                    
    [    1.045745] 0x000000040000-0x000000060000 : "SPL.backup2"                    
    [    1.052856] 0x000000060000-0x000000080000 : "SPL.backup3"                    
    [    1.059814] 0x000000080000-0x0000000e0000 : "U-Boot"                         
    [    1.066406] 0x0000000e0000-0x000000100000 : "U-Boot Env"                     
    [    1.073333] 0x000000100000-0x000000600000 : "Kernel"                         
    [    1.081848] 0x000000600000-0x000008000000 : "File System"                    
    [    1.136840] usb 1-1: new high-speed USB device number 2 using musb-hdrc      
    [    1.145233] OneNAND driver initializing                                      
    [    1.150054] UBI: attaching mtd7 to ubi0                                      
    [    1.153930] UBI: physical eraseblock size:   131072 bytes (128 KiB)          
    [    1.160308] UBI: logical eraseblock size:    126976 bytes                    
    [    1.165771] UBI: smallest flash I/O unit:    2048                            
    [    1.170532] UBI: VID header offset:          2048 (aligned 2048)             
    [    1.176635] UBI: data offset:                4096                            
    [    1.318328] usb 1-1: New USB device found, idVendor=0424, idProduct=2513     
    [    1.325103] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    1.348144] hub 1-1:1.0: USB hub found                                       
    [    1.357269] hub 1-1:1.0: 3 ports detected                                    
    [    1.929565] UBI: max. sequence number:       0                               
    [    1.948333] UBI: attached mtd7 to ubi0                                       
    [    1.952117] UBI: MTD device name:            "File System"                   
    [    1.957733] UBI: MTD device size:            122 MiB                         
    [    1.962738] UBI: number of good PEBs:        976                             
    [    1.967437] UBI: number of bad PEBs:         0                               
    [    1.971923] UBI: number of corrupted PEBs:   0                               
    [    1.976409] UBI: max. allowed volumes:       128                             
    [    1.981079] UBI: wear-leveling threshold:    4096                            
    [    1.985839] UBI: number of internal volumes: 1                               
    [    1.990356] UBI: number of user volumes:     1                               
    [    1.994842] UBI: available PEBs:             38                              
    [    1.999450] UBI: total number of reserved PEBs: 938                          
    [    2.004364] UBI: number of PEBs reserved for bad PEB handling: 9             
    [    2.010467] UBI: max/mean erase counter: 0/0                                 
    [    2.014770] UBI: image sequence number:  0                                   
    [    2.019042] UBI: background thread "ubi_bgt0d" started, PID 596              
    [    2.038177] vcan: Virtual CAN interface driver                               
    [    2.042663] CAN device driver interface                                      
    [    2.046569] CAN bus driver for Bosch D_CAN controller 1.0                    
    [    2.067047] d_can d_can.1: device registered (irq=55, irq_obj=56)            
    [    2.137023] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6           
    [    2.143310] davinci_mdio davinci_mdio.0: detected phy mask effeffff          
    [    2.168121] davinci_mdio.0: probed                                           
    [    2.171569] davinci_mdio davinci_mdio.0: phy[16]: device 0:10, driver Marvell
     88E3018                                                                        
    [    2.179534] davinci_mdio davinci_mdio.0: phy[28]: device 0:1c, driver Marvell
     88E1118                                                                        
    [    2.207122] usbcore: registered new interface driver cdc_ether               
    [    2.217376] usbcore: registered new interface driver cdc_eem                 
    [    2.237030] usbcore: registered new interface driver dm9601                  
    [    2.242706] cdc_ncm: 04-Aug-2011                                             
    [    2.257019] usbcore: registered new interface driver cdc_ncm                 
    [    2.262725] Initializing USB Mass Storage driver...                          
    [    2.277038] usbcore: registered new interface driver usb-storage             
    [    2.283111] USB Mass Storage support registered.                             
    [    2.297241] usbcore: registered new interface driver usbserial               
    [    2.306976] USB Serial support registered for generic                        
    [    2.316955] usbcore: registered new interface driver usbserial_generic       
    [    2.323577] usbserial: USB Serial Driver core                                
    [    2.337158] USB Serial support registered for FTDI USB Serial Device         
    [    2.356964] usbcore: registered new interface driver ftdi_sio                
    [    2.362792] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver               
    [    2.377227] mousedev: PS/2 mouse device common for all mice                  
    [    2.397033] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0     
    [    2.404327] i2c /dev entries driver                                          
    [    2.417694] Linux video capture interface: v2.00                             
    [    2.427185] usbcore: registered new interface driver uvcvideo                
    [    2.433013] USB Video Class driver (1.1.1)                                   
    [    3.466888] omap_i2c omap_i2c.2: timeout waiting for bus ready               
    [    3.472839] lm75: probe of 2-0048 failed with error -121                     
    [    3.481445] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec             
    [    3.492401] cpuidle: using governor ladder                                   
    [    3.497161] cpuidle: using governor menu                                     
    [    3.505157] omap4_aes_mod_init: loading AM33X AES driver                     
    [    3.510711] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02                
    [    3.517181] omap4_aes_probe: probe() done                                    
    [    3.521514] omap4_sham_mod_init: loading AM33X SHA/MD5 driver                
    [    3.527526] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03          
    [    3.539611] omap4_sham_probe: probe() done                                   
    [    3.546508] usbcore: registered new interface driver usbhid                  
    [    3.552215] usbhid: USB HID core driver                                      
    [    3.556823] usbcore: registered new interface driver snd-usb-audio           
    [    3.564880] ALSA device list:                                                
    [    3.567962]   No soundcards found.                                           
    [    3.571411] oprofile: hardware counters not available                        
    [    3.576568] oprofile: using timer interrupt.                                 
    [    3.580932] nf_conntrack version 0.5.0 (8015 buckets, 32060 max)             
    [    3.587646] ip_tables: (C) 2000-2006 Netfilter Core Team                     
    [    3.593200] TCP cubic registered                                             
    [    3.596466] NET: Registered protocol family 17                               
    [    3.601043] can: controller area network core (rev 20090105 abi 8)           
    [    3.607452] NET: Registered protocol family 29                               
    [    3.611999] can: raw protocol (rev 20090105)                                 
    [    3.616333] can: broadcast manager protocol (rev 20090105 t)                 
    [    3.622161] Registering the dns_resolver key type                            
    [    3.627044] VFP support v0.3: implementor 41 architecture 3 part 30 variant c
     rev 3                                                                          
    [    3.634857] ThumbEE CPU extension supported.                                 
    [    3.639282] mux: Failed to setup hwmod io irq -22                            
    [    3.644714] Power Management for AM33XX family                               
    [    3.649475] Trying to load am335x-pm-firmware.bin (60 secs timeout)          
    [    3.655975] Copied the M3 firmware to UMEM                                   
    [    3.660369] smartreflex smartreflex: am33xx_sr_probe: Smartreflex requires ES
     1.0                                                                            
    [    3.668029] smartreflex: probe of smartreflex failed with error -22          
    [    3.674926] sr_init: platform driver register failed                         
    [    3.683715] clock: disabling unused clocks to save power                     
    [    3.703826] Detected MACID=1c:ba:8c:b7:27:3e                                 
    [    3.709350] cpsw: Detected MACID = 1c:ba:8c:b7:27:40                         
    [    3.715545] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:01
    UTC (946684801)                                                                 
    [   15.839477] UBIFS: static UBI volume - read-only mode                        
    [   15.844635] UBIFS error (pid 1): mount_ubifs: cannot mount read-write - read-
    only media                                                                      
    [   15.853179] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [   15.860382] Please append a correct "root=" boot option; here are the availab
    le partitions:                                                                  
    [   15.868957] 1f00             128 mtdblock0  (driver?)                        
    [   15.874084] 1f01             128 mtdblock1  (driver?)                        
    [   15.879272] 1f02             128 mtdblock2  (driver?)                        
    [   15.884399] 1f03             128 mtdblock3  (driver?)                        
    [   15.889587] 1f04             384 mtdblock4  (driver?)                        
    [   15.894714] 1f05             128 mtdblock5  (driver?)                        
    [   15.899871] 1f06            5120 mtdblock6  (driver?)                        
    [   15.905029] 1f07          124928 mtdblock7  (driver?)                        
    [   15.910186] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
    wn-block(0,0)                                                                   
    [   15.918609] Backtrace:                                                       
    [   15.921142] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c043de4c>] (dump_s
    tack+0x18/0x1c)                                                                 
    [   15.929748]  r6:d8123000 r5:c05f7f94 r4:c0676c08 r3:c0629ac8                 
    [   15.935546] [<c043de34>] (dump_stack+0x0/0x1c) from [<c043debc>] (panic+0x6c/
    0x1a0)                                                                          
    [   15.943359] [<c043de50>] (panic+0x0/0x1a0) from [<c05c9cb4>] (mount_block_roo
    t+0x184/0x228)                                                                  
    [   15.951873]  r3:c0629ac8 r2:00000000 r1:d802df78 r0:c051d260                 
    [   15.957672]  r7:00008000                                                     
    [   15.960266] [<c05c9b30>] (mount_block_root+0x0/0x228) from [<c05c9fd0>] (prep
    are_namespace+0xac/0x1d4)                                                       
    [   15.969757] [<c05c9f24>] (prepare_namespace+0x0/0x1d4) from [<c05c990c>] (ker
    nel_init+0x124/0x130)                                                           
    [   15.978881]  r5:c06061f0 r4:c06061f0                                         
    [   15.982543] [<c05c97e8>] (kernel_init+0x0/0x130) from [<c00414c8>] (do_exit+0
    x0/0x67c)                                                                       
    [   15.990631]  r5:c05c97e8 r4:00000000

    thanks

  • I am out of ideas. The only suggestion I have left is to upgrade the SDK you are using. I have already mentioned multiple times that it is very old and it may contain a lot of old bugs which should been fixed by now in the newer versions.

    The UBI layer depends on the MTD layer, which depends on the flash driver. There is also the ECC algo implementation and so on. If even one of these layers doesn't function correctly, the UBIFS is likely to have errors.

    Best regards,
    Miroslav

  • Hi

    thanks a lot for your help i appreciated very much.

    Do you know the linux files i should look at where BCH8, ECC, NAND parameters are defined ?

    Thanks

  • For SDK v6 (U-Boot 2013.01.01) only BCH8 is used by default. I think these are the related files (or at least some of them):

    drivers/mtd/nand/nand_base.c
    drivers/mtd/nand/nand_bch.c
    include/linux/bch.h
    include/linux/mtd/nand.h
    include/linux/mtd/nand_bch.h
    lib/bch.c

    Best regards,
    Miroslav

  • Hi,

    thanks for the reply

    I can't see where is defined in linux NAND parameters as for example ECC SIZE, OOB SIZE,... as we can define them in the board configuration of the u-boot (am335x_evm.h).

    How linux knows these parameters ?

    regards

  • Also chech the <u-boot>/drivers/mtd/nand/omap_gpmc.c file. In SDK v6, this is how the BCH private data looks like:

    static struct nand_ecclayout hw_bch8_nand_oob = GPMC_NAND_HW_BCH8_ECC_LAYOUT;

    static struct nand_bch_priv bch_priv = {
        .mode = NAND_ECC_HW_BCH,
        .type = ECC_BCH8,
        .nibbles = ECC_BCH8_NIBBLES
    };

    Best regards,
    Miroslav

  • Hi

    thanks a lot

    in the boot log we can see :

    [    1.016784] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron MT29F1G08ABAEAWP) 

    It means that the NAND is well recognized .

    1) Can we deduce that reading NAND from linux is OK ?

    2) is there a way to know under linux prompt if NAND reading is OK ?

    Thanks

    regards

  • Hello

    in my boot log i have :

    [   15.837829] UBIFS: static UBI volume - read-only mode                        
    [   15.842987] UBIFS error (pid 1): mount_ubifs: cannot mount read-write - read-
    only media                                                                      
    [   15.851531] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [   15.858734] Please append a correct "root=" boot option; here are the availab
    le partitions:                                                                  
    [   15.867279] 1f00             128 mtdblock0  (driver?)                        
    [   15.872467] 1f01             128 mtdblock1  (driver?)                        
    [   15.877624] 1f02             128 mtdblock2  (driver?)                        
    [   15.882751] 1f03             128 mtdblock3  (driver?)                        
    [   15.887939] 1f04             384 mtdblock4  (driver?)                        
    [   15.893066] 1f05             128 mtdblock5  (driver?)                        
    [   15.898254] 1f06            5120 mtdblock6  (driver?)                        
    [   15.903381] 1f07          124928 mtdblock7  (driver?)                        
    [   15.908569] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
    wn-block(0,0)                                                                   
    [  

    Do you know how i can correct that ?

    thanks

  • Trichet, which version of mkfs.ubifs are you using? Check with "mkfs.ubifs -V".

    Also check if this answer is relevant to your issue: http://e2e.ti.com/support/embedded/android/f/509/p/202971/725476.aspx#725476

    Best regards,
    Miroslav

  • Hi

    thanks for the reply

    i use Version 1.3

    I set

    setenv nandroot ubi0:rootfs ro ubi.mtd=7,2048

    instead of  :

    setenv nandroot ubi0:rootfs rw ubi.mtd=7,2048

    and i can mount the ubifs file system

    But i want it to be read/write. Do you know how on  line 1199 of \fs\ubifs\super.c  :" ubifs_err("cannot mount read-write - read-only media"); the media is declared read only ?

    Where a NAND could be declared read only ?

    Should i post this on another forum ?

    Thanks in advance

    regards

  • Please try a newer version of the mkfs.ubifs command.

    Best regards,
    Miroslav

  • Hi

    thank you for your reply. I've understoud, the ubinize.cfg file must have dynamic in it.

    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=112MiB
    vol_type=dynamic 

    vol_name=rootfs

     

    Now i can write a file in NAND, but when i reboot i have the error :

    [    3.939270] UBI error: ubi_io_read: error -74 (ECC error) while reading 12697

    6 bytes from PEB 3:4096, read 126976 bytes                                     

    [    3.950286] Backtrace:                                                      

    [    3.952819] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c043de4c>] (dump_s

    The fact of having written a file in NANd corrupts the UBIFS.

    Have you any idea of why writing may not write the good ECC ?

    Thanks

     

     

  • Did you write the file to the file system or directly to the NAND flash? Please post exact procedure.

    Best regards,
    Miroslav

  • Hello

    thanks for the reply

    I just make the commands under linux :

    touch foo.txt

    echo "test" > foo.txt

    Best regards