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.

am335x 从nand启动android,ubi读取错误

Other Parts Discussed in Thread: TPS65217

启动LOG如下,

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 3.2.0-KIWI+ (root@gtzn) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #89 Tue May 5 20:40:17 CST 2015
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES2.1 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 rootfstype=ubifs rootwait=1
[    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: 509532k/509532k available, 14756k 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 - 0xc07d2000   (7976 kB)
[    0.000000]       .init : 0xc07d2000 - 0xc0835000   ( 396 kB)
[    0.000000]       .data : 0xc0836000 - 0xc08a22b0   ( 433 kB)
[    0.000000]        .bss : 0xc08a22d4 - 0xc09fa1d0   (1376 kB)
[    0.000000] NR_IRQS:396
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] omap_dm_timer_switch_src: Switching to HW default clocksource(sys_clkin_ck) for timer1, this may impact timekeeping in low power state
[    0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000182] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.087694] pid_max: default: 32768 minimum: 301
[    0.087802] Security Framework initialized
[    0.087858] Mount-cache hash table entries: 512
[    0.088214] CPU: Testing write buffer coherency: ok
[    0.088270] ftrace: allocating 22827 entries in 68 pages
[    0.145681] omap_hwmod: pruss: failed to hardreset
[    0.146377] print_constraints: dummy:
[    0.146573] NET: Registered protocol family 16
[    0.147467] OMAP GPIO hardware version 0.1
[    0.148383] omap_mux_init: Add partition: #1: core, flags: 0
[    0.149177] am335x_evm_i2c_init
[    0.149273]  omap_i2c.1: alias fck already exists
[    0.149691]  omap2_mcspi.1: alias fck already exists
[    0.149776]  omap2_mcspi.2: alias fck already exists
[    0.149892]  edma.0: alias fck already exists
[    0.149907]  edma.0: alias fck already exists
[    0.149920]  edma.0: alias fck already exists
[    0.157836] bio: create slab <bio-0> at 0
[    0.158640] SCSI subsystem initialized
[    0.159333] usbcore: registered new interface driver usbfs
[    0.159428] usbcore: registered new interface driver hub
[    0.159546] usbcore: registered new device driver usb
[    0.159804] registerd cppi-dma Intr @ IRQ 17
[    0.159815] Cppi41 Init Done Qmgr-base(e087a000) dma-base(e0878000)
[    0.159822] Cppi41 Init Done
[    0.159852] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.159976] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.177705] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    0.178428] Advanced Linux Sound Architecture Driver Version 1.0.24.
[    0.178896] Bluetooth: Core ver 2.16
[    0.178957] NET: Registered protocol family 31
[    0.178965] Bluetooth: HCI device and connection manager initialized
[    0.178978] Bluetooth: HCI socket layer initialized
[    0.178986] Bluetooth: L2CAP socket layer initialized
[    0.179007] Bluetooth: SCO socket layer initialized
[    0.179372] cfg80211: Calling CRDA to update world regulatory domain
[    0.179963] Switching to clocksource gp timer
[    0.194682] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    0.194871] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[    0.195036] MUSB0 controller's USBSS revision = 4ea20800
[    0.195061] musb0: Enabled SW babble control
[    0.195785] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using DMA, IRQ 18
[    0.195994] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[    0.196148] MUSB1 controller's USBSS revision = 4ea20800
[    0.196168] musb1: Enabled SW babble control
[    0.196535] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.196622] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    0.196737] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.196748] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.196758] usb usb1: Product: MUSB HDRC host driver
[    0.196766] usb usb1: Manufacturer: Linux 3.2.0-KIWI+ musb-hcd
[    0.196774] usb usb1: SerialNumber: musb-hdrc.1
[    0.197178] hub 1-0:1.0: USB hub found
[    0.197201] hub 1-0:1.0: 1 port detected
[    0.197517] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using DMA, IRQ 19
[    0.197841] NET: Registered protocol family 2
[    0.198024] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.198352] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.198568] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[    0.198694] TCP: Hash tables configured (established 16384 bind 16384)
[    0.198705] TCP reno registered
[    0.198714] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.198731] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.198896] NET: Registered protocol family 1
[    0.199151] RPC: Registered named UNIX socket transport module.
[    0.199162] RPC: Registered udp transport module.
[    0.199169] RPC: Registered tcp transport module.
[    0.199176] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.199389] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.296506] ashmem: initialized
[    0.296727] VFS: Disk quotas dquot_6.5.2
[    0.296775] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.297482] fuse init (API version 7.17)
[    0.297671] msgmni has been set to 995
[    0.298508] io scheduler noop registered
[    0.298517] io scheduler deadline registered
[    0.298576] io scheduler cfq registered (default)
[    0.299394] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    0.928899] console [ttyO0] enabled
[    0.932990] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.940656] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.948254] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    0.955871] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    0.963476] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    0.971219] [drm] Initialized drm 1.1.0 20060810
[    0.980569] brd: module loaded
[    0.986187] loop: module loaded
[    0.989622] i2c-core: driver [tsl2550] using legacy suspend method
[    0.996135] i2c-core: driver [tsl2550] using legacy resume method
[    1.002568] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    1.050005] No daughter card found on AM335x EVM
[    1.054879] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    1.159990] AM335X: EVM BOARD NO EEPROM
[    1.164001] The board is a AM335x Starter Kit.
[    1.170339] tps65217 1-0024: TPS65217 ID 0xe version 1.2
[    1.177615] print_constraints: DCDC1: 900 <--> 1800 mV at 1500 mV
[    1.185849] print_constraints: DCDC2: 900 <--> 3300 mV at 1325 mV
[    1.194026] print_constraints: DCDC3: 900 <--> 1500 mV at 1125 mV
[    1.202195] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
[    1.210025] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[    1.217244] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
[    1.225392] print_constraints: LDO3: 1800 <--> 3300 mV at 1800 mV
[    1.233597] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
[    1.243000] evm_nand_init
[    1.245913] omap_init_gpmc
[    1.249029] omap-gpmc omap-gpmc: GPMC revision 6.0
[    1.254077] Registering NAND on CS0
[    1.258093]  omap_hsmmc.0: alias fck already exists
[    1.263840]  davinci-mcasp.1: alias fck already exists
[    1.269302] spi0_init
[    1.272091] lms250gf03 spi1.0: lms250gf03_probe 0 8
[    1.277288] lms250gf03_reset
[    1.559509] lms250gf03 spi1.0: lms250gf03_toggle 37
[    1.866696] Loading pn544 driver
[    1.870288] pn544_probe : requesting IRQ 250
[    1.875575] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.882617] omap2-nand driver initializing
[    1.887198] ONFI flash detected
[    1.890624] ONFI param page 0 valid
[    1.894277] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F16G08AJADAWP)
[    1.902742] NAND 80000000 80000000
[    1.906847] Creating 8 MTD partitions on "omap2-nand.0":
[    1.912461] 0x000000000000-0x000000020000 : "SPL"
[    1.918267] 0x000000020000-0x000000040000 : "SPL.backup1"
[    1.924634] 0x000000040000-0x000000060000 : "SPL.backup2"
[    1.930937] 0x000000060000-0x000000080000 : "SPL.backup3"
[    1.937221] 0x000000080000-0x000000260000 : "U-Boot"
[    1.943899] 0x000000260000-0x000000280000 : "U-Boot Env"
[    1.950340] 0x000000280000-0x000000780000 : "Kernel"
[    1.958317] 0x000000780000-0x000080000000 : "File System"
[    2.802844] OneNAND driver initializing
[    2.807316] UBI: attaching mtd7 to ubi0
[    2.811366] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    2.817914] UBI: logical eraseblock size:    126976 bytes
[    2.823562] UBI: smallest flash I/O unit:    2048
[    2.828475] UBI: VID header offset:          2048 (aligned 2048)
[    2.834756] UBI: data offset:                4096
[    2.839830] usb 1-1: New USB device found, idVendor=0bda, idProduct=b720
[    2.846856] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.854323] usb 1-1: Product: 802.11n WLAN Adapter
[    2.859326] usb 1-1: Manufacturer: Realtek
[    2.863611] usb 1-1: SerialNumber: 00e04c000001
[    8.372785] UBI error: compare_lebs: unsupported on-flash UBI format
[    8.372803]
[    8.381027] slab error in kmem_cache_destroy(): cache `ubi_scan_leb_slab': Can't free all objects
[    8.390310] Backtrace:
[    8.392900] [<c00176e8>] (dump_backtrace+0x0/0x114) from [<c05e4190>] (dump_stack+0x20/0x24)
[    8.401733]  r6:df2cc000 r5:df2ef2c0 r4:df2295c0 r3:c085efa0
[    8.407669] [<c05e4170>] (dump_stack+0x0/0x24) from [<c00d11d8>] (kmem_cache_destroy+0xc4/0x104)
[    8.416877] [<c00d1114>] (kmem_cache_destroy+0x0/0x104) from [<c0333534>] (ubi_scan+0x338/0xa14)
[    8.426069]  r4:00002000 r3:df352000
[    8.429815] [<c03331fc>] (ubi_scan+0x0/0xa14) from [<c032af48>] (ubi_attach_mtd_dev+0x41c/0xa78)
[    8.439020] [<c032ab2c>] (ubi_attach_mtd_dev+0x0/0xa78) from [<c07f0084>] (ubi_init+0x1d8/0x2d4)
[    8.448219] [<c07efeac>] (ubi_init+0x0/0x2d4) from [<c0008780>] (do_one_initcall+0x124/0x18c)
[    8.457151] [<c000865c>] (do_one_initcall+0x0/0x18c) from [<c07d2858>] (kernel_init+0x80/0x11c)
[    8.466260] [<c07d27d8>] (kernel_init+0x0/0x11c) from [<c0046e90>] (do_exit+0x0/0x6c4)
[    8.474541]  r5:c07d27d8 r4:00000000
[    8.480907] UBI error: ubi_init: cannot attach mtd7
[    8.486280] CAN device driver interface
[    8.490338] CAN bus driver for Bosch D_CAN controller 1.0
[    8.540046] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[    8.546512] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[    8.554099] davinci_mdio.0: probed
[    8.557658] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
[    8.565098] PPP generic driver version 2.4.2

  • 自己制作的ubi.img是这个现象,

    从TI网站download的预先制作好的Android JB 的ubi.img也是这个现象。

  • NAND 型号是MT29F16G08AJADAWP

    page size 2048

    block size 128K

  • 希望我写的这份总结能对你的问题有所帮助:http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/59921.aspx

  • 周工,非常感谢你的解答。

    这篇我仔细看过,img也是按照这个方法做的。

    我们出的这个现象和Flash 后1GB无法访问有关系,详细请看下面这个链接,也请帮忙解答一下。

    http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/85840.aspx

    当我强制把Flash大小改为1GB,就不会出现 UBI error: compare_lebs: unsupported on-flash UBI format这个错误了。

    但是往下走又出现了新的问题, 请问什么原因?

    [    1.936306] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F16G08AJADAWP)
    [    1.944956] NAND 40000000 40000000
    [    1.949274] Creating 8 MTD partitions on "omap2-nand.0":
    [    1.954885] 0x000000000000-0x000000020000 : "SPL"
    [    1.960864] 0x000000020000-0x000000040000 : "SPL.backup1"
    [    1.967259] 0x000000040000-0x000000060000 : "SPL.backup2"
    [    1.973625] 0x000000060000-0x000000080000 : "SPL.backup3"
    [    1.979608] usb 1-1: New USB device found, idVendor=0bda, idProduct=b720
    [    1.986645] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    1.994112] usb 1-1: Product: 802.11n WLAN Adapter
    [    1.999116] usb 1-1: Manufacturer: Realtek
    [    2.003401] usb 1-1: SerialNumber: 00e04c000001
    [    2.008796] 0x000000080000-0x000000260000 : "U-Boot"
    [    2.015415] 0x000000260000-0x000000280000 : "U-Boot Env"
    [    2.021659] 0x000000280000-0x000000780000 : "Kernel"
    [    2.029526] 0x000000780000-0x000040000000 : "File System"
    [    2.455094] OneNAND driver initializing
    [    2.459827] UBI: attaching mtd7 to ubi0
    [    2.463883] IO_INIT 20000 1fc4 3f880000
    [    2.467983] UBI: physical eraseblock size:   131072 bytes (128 KiB)
    [    2.474539] UBI: logical eraseblock size:    126976 bytes
    [    2.480185] UBI: smallest flash I/O unit:    2048
    [    2.485098] UBI: VID header offset:          2048 (aligned 2048)
    [    2.491379] UBI: data offset:                4096
    [    7.609938] UBI: max. sequence number:       0
    [    7.647723] UBI: volume 0 ("rootfs") re-sized from 7515 to 7798 LEBs
    [    7.654970] UBI: attached mtd7 to ubi0
    [    7.658891] UBI: MTD device name:            "File System"
    [    7.664651] UBI: MTD device size:            1016 MiB
    [    7.669926] UBI: number of good PEBs:        7880
    [    7.674846] UBI: number of bad PEBs:         252
    [    7.679667] UBI: number of corrupted PEBs:   0
    [    7.684313] UBI: max. allowed volumes:       128
    [    7.689134] UBI: wear-leveling threshold:    4096
    [    7.694052] UBI: number of internal volumes: 1
    [    7.698691] UBI: number of user volumes:     1
    [    7.703337] UBI: available PEBs:             0
    [    7.707976] UBI: total number of reserved PEBs: 7880
    [    7.713166] UBI: number of PEBs reserved for bad PEB handling: 78
    [    7.719532] UBI: max/mean erase counter: 1/0
    [    7.723996] UBI: image sequence number:  2086593266
    [    7.729291] CAN device driver interface
    [    7.733311] CAN bus driver for Bosch D_CAN controller 1.0
    [    7.739501] UBI: background thread "ubi_bgt0d" started, PID 51
    [    7.780124] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [    7.786585] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
    [    7.810327] davinci_mdio.0: probed
    [    7.813886] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
    [    7.821304] PPP generic driver version 2.4.2
    [    7.825906] PPP BSD Compression module registered
    [    7.830836] PPP Deflate Compression module registered
    [    7.836223] usbcore: registered new interface driver cdc_ether
    [    7.842377] usbcore: registered new interface driver cdc_eem
    [    7.848341] usbcore: registered new interface driver dm9601
    [    7.854215] usbcore: registered new interface driver cdc_subset
    [    7.860450] cdc_ncm: 04-Aug-2011
    [    7.863864] usbcore: registered new interface driver cdc_ncm
    [    7.869854] usbcore: registered new interface driver cdc_acm
    [    7.875781] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [    7.884153] Initializing USB Mass Storage driver...
    [    7.889391] usbcore: registered new interface driver usb-storage
    [    7.895678] USB Mass Storage support registered.
    [    7.900622] usbcore: registered new interface driver usbserial
    [    7.906752] USB Serial support registered for generic
    [    7.912179] usbcore: registered new interface driver usbserial_generic
    [    7.919002] usbserial: USB Serial Driver core
    [    7.923597] USB Serial support registered for GSM modem (1-port)
    [    7.930110] usbcore: registered new interface driver option
    [    7.935933] option: v0.7.2:USB Driver for GSM modems
    [    8.070825]  gadget: Mass Storage Function, version: 2009/09/11
    [    8.077020]  gadget: Number of LUNs=1
    [    8.080867]  lun0: LUN: removable file: (no medium)
    [    8.086161]  gadget: android_usb ready
    [    8.090106] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    8.095714] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
    [    8.103546] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [    8.110655] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    8.118203] usb usb2: Product: MUSB HDRC host driver
    [    8.123396] usb usb2: Manufacturer: Linux 3.2.0-KIWI+ musb-hcd
    [    8.129490] usb usb2: SerialNumber: musb-hdrc.0
    [    8.134642] hub 2-0:1.0: USB hub found
    [    8.138574] hub 2-0:1.0: 1 port detected
    [    8.160329] mousedev: PS/2 mouse device common for all mice
    [    8.170649] input: ti-tsc as /devices/platform/omap/ti_tscadc/tsc/input/input0
    [    8.179047] using rtc device, am33xx-rtc, for alarms
    [    8.184147] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
    [    8.191436] i2c /dev entries driver
    [    8.195221] Linux video capture interface: v2.00
    [    8.200334] usbcore: registered new interface driver uvcvideo
    [    8.206339] USB Video Class driver (1.1.1)
    [    8.360690] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    8.367203] device-mapper: uevent: version 1.0.3
    [    8.372223] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
    [    8.381068] Bluetooth: HCI UART driver ver 2.2
    [    8.385711] Bluetooth: HCI H4 protocol initialized
    [    8.390723] Bluetooth: HCILL protocol initialized
    [    8.431233] cpuidle: using governor ladder
    [    8.435620] cpuidle: using governor menu
    [    8.442234] usbcore: registered new interface driver usbhid
    [    8.448061] usbhid: USB HID core driver
    [    8.460267] logger: created 256K log 'log_main'
    [    8.465079] logger: created 256K log 'log_events'
    [    8.470098] logger: created 256K log 'log_radio'
    [    8.474992] logger: created 256K log 'log_system'
    [    8.480393] tiadc tiadc: attached adc driver
    [    8.485227] usbcore: registered new interface driver snd-usb-audio
    [    8.492693] _regulator_get: 1-001b supply IOVDD not found, using dummy regulator
    [    8.500514] _regulator_get: 1-001b supply DVDD not found, using dummy regulator
    [    8.508181] _regulator_get: 1-001b supply AVDD not found, using dummy regulator
    [    8.515881] _regulator_get: 1-001b supply DRVDD not found, using dummy regulator
    [    8.590987] asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
    [    8.598029] ALSA device list:
    [    8.601167]   #0: AM335X EVM
    [    8.604172] oprofile: hardware counters not available
    [    8.609447] oprofile: using timer interrupt.
    [    8.614082] Netfilter messages via NETLINK v0.30.
    [    8.619111] nf_conntrack version 0.5.0 (7961 buckets, 31844 max)
    [    8.625725] ctnetlink v0.93: registering with nfnetlink.
    [    8.631358] NF_TPROXY: Transparent proxy support initialized, version 4.1.0
    [    8.638633] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
    [    8.645012] xt_time: kernel timezone is -0000
    [    8.649760] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    8.655499] arp_tables: (C) 2002 David S. Miller
    [    8.660401] TCP cubic registered
    [    8.663909] NET: Registered protocol family 10
    [    8.669220] Mobile IPv6
    [    8.671849] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [    8.677653] IPv6 over IPv4 tunneling driver
    [    8.682592] NET: Registered protocol family 17
    [    8.687264] NET: Registered protocol family 15
    [    8.691935] can: controller area network core (rev 20090105 abi 8)
    [    8.698500] NET: Registered protocol family 29
    [    8.703159] can: raw protocol (rev 20090105)
    [    8.707619] can: broadcast manager protocol (rev 20090105 t)
    [    8.830389] Bluetooth: RFCOMM TTY layer initialized
    [    8.835500] Bluetooth: RFCOMM socket layer initialized
    [    8.840883] Bluetooth: RFCOMM ver 1.11
    [    8.844801] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    8.850358] Bluetooth: BNEP filters: protocol multicast
    [    8.855818] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    [    8.862149] lib80211: common routines for IEEE802.11 drivers
    [    8.868072] Registering the dns_resolver key type
    [    8.873071] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    8.881097] ThumbEE CPU extension supported.
    [    8.885614] mux: Failed to setup hwmod io irq -22
    [    8.891149] Power Management for AM33XX family
    [    8.896001] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [    8.902709] Copied the M3 firmware to UMEM
    [    8.907010] ehrpwm1_init
    [    8.909655] Cortex M3 Firmware Version = 0x181
    [    8.917363] clock: disabling unused clocks to save power
    [    8.924285] Detected MACID=54:4a:16:c0:e5:55
    [    8.941098] input: gpio-keys as /devices/platform/gpio-keys/input/input1
    [    8.948346] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    9.131218] UBIFS: start fixing up free space
    [    9.145804] UBIFS error (pid 1): check_lpt_type: invalid type (15) in LPT node type 1
    [    9.154012] UBIFS error (pid 1): ubifs_read_nnode: error -22 reading nnode at 8:7664
    [    9.190632] List of all partitions:
    [    9.194318] 1f00             128 mtdblock0  (driver?)
    [    9.199602] 1f01             128 mtdblock1  (driver?)
    [    9.204916] 1f02             128 mtdblock2  (driver?)
    [    9.210209] 1f03             128 mtdblock3  (driver?)
    [    9.215492] 1f04            1920 mtdblock4  (driver?)
    [    9.220784] 1f05             128 mtdblock5  (driver?)
    [    9.226066] 1f06            5120 mtdblock6  (driver?)
    [    9.231357] 1f07         1040896 mtdblock7  (driver?)
    [    9.236636] No filesystem could mount root, tried:  ubifs
    [    9.242294] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [    9.250939] Backtrace:
    [    9.253526] [<c00176e8>] (dump_backtrace+0x0/0x114) from [<c05e89c8>] (dump_stack+0x20/0x24)
    [    9.262358]  r6:c080b02c r5:00000000 r4:c08ab118 r3:c0864fa0
    [    9.268291] [<c05e89a8>] (dump_stack+0x0/0x24) from [<c05e8c38>] (panic+0x6c/0x190)

  • 这个NAND FLASH的容量很大,你制作UBI的时候是用的什么参数啊

  • JianZhou,

     因为后面1GB访问存在问题,我先只用前面1GB,

    [    2.008796] 0x000000080000-0x000000260000 : "U-Boot"
    [    2.015415] 0x000000260000-0x000000280000 : "U-Boot Env"
    [    2.021659] 0x000000280000-0x000000780000 : "Kernel"
    [    2.029526] 0x000000780000-0x000040000000 : "File System"

    UBI制作方式,是如下计算的(假定950M空间),参考这个链接制作 http://processors.wiki.ti.com/index.php/TI811x_UBIFS_Support

    To calculate the full overhead, we need the following values:

    Symbol

    Meaning

    Value for XO test case

    SP

    PEB Size

    128KiB

    SL

    LEB Size

    128KiB - 2 * 2KiB = 124 KiB

    P

    Total number of PEBs on the MTD device

    950MiB / 128KiB = 7600

    B

    Number of PEBs reserved for bad PEB handling

    1% of P = 76

    O

    The overhead related to storing EC and VID headers in bytes, i.e. O = SP - SL

    4KiB

     

    UBI Overhead = (B + 4) * SP + O * (P - B - 4)

          = (16 + 4) * 128Kib + 4 KiB * (1600 - 16 - 4)

          = 40320KiB

          =315PEBs

    This leaves us with (7600-315=7255) PEBs  available for user data.

     7255 * 128Kib/ 124 Kib = 7520 .

    Volume size = 7255* 128Kib (~910MiB)

    所以用的如下命令制作

    ./mkfs.ubifs -r ./rootfs/ -F -m 2048 -e 126976 -c 7520 -o ubifs.img

    ./ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg

    ubinize.cfg

    里面是

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