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.

Ubifs文件系统的制作和启动

Other Parts Discussed in Thread: AM3352, TPS65217, TPS65910, TMS320DM8168, AM5728

看到有些朋友在制作nand ubifs的时候碰到一些问题,我总结了一篇文档供大家参考,欢迎拍砖。

Ubifs文件系统的制作和启动.pdf
  • 写的不错,比较详细,比较有价值

  • 昨天刚碰到问题,今天就看到周工的解决办法案例。

  • 请问一下:ti没有提供ubifs文件系统包,这样就不用自己制作了。 

  • 附件是文档提及的制作步骤后生成的ubi.img,请解压后使用

    ubi.7z
  • 你好,我就是按着这个这篇文档做的,到最后依然没有能加载ubifs。不知道什么原因。

    简单描述一下我的情况:我们的板子是参考BBB做的,但没有eeprom,板子没有eMMC,而是用的nand flash,除此之外和BBB没多大区别了,现在用的这款主芯片是AM3352。在uboot中改了iic读取eeprom部分,改成BBB的信息,让内核以为是BBB,然后启动。用的SDK包是SDK6.0,内核是3.2,uboot是2013.01.01版本。目前做的SD卡启动,完全没有问题,uboot、kernel和文件系统都没有问题,能启动正常。

    遇到了两个问题:1. SD卡启动uboot后,把MLO, u-boot.img, uImage, ubi,img烧写到板子的nand里,然后上电后,串口打印一直是CCC,并没有从nand启动,板子的SYSBOOT[4:0]=10011b,按说启动顺序是NAND-NANDI2C-MMC-UART,应该从nand启动的,但是没有。

    2.从SD卡启动uboot后,烧写上面那些文件后,拔掉SD卡,输入boot命令,会从nand读取内核,并启动,但是到了要打开ubi0:rootfs的时候出错了,详细的启动打印信息在下面:

    请各位前辈和TI的工程师,帮忙分析一下问题可能出在哪里,试了很多方法都不行,这里先谢谢各位大牛了。

    U-Boot 2013.01.01 (Oct 24 2014 - 16:56:28)

    I2C: ready
    DRAM: 256 MiB
    WARNING: Caches not enabled
    SKW board, run without EEPROM!
    SKW board use default setting as BBB
    board header name: [A335BNLT0A5C3513BBBK2751]
    board header version: [0A5C3513BBBK2751]
    board header serial: [3513BBBK2751]
    NAND: 128 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - bad CRC, using default environment

    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Net: <ethaddr> not set. Validating first E-fuse MAC
    PHY reset timed out
    cpsw, usb_ether
    Hit any key to stop autoboot: 0

    U-Boot# boot
    Card did not respond to voltage select!
    mmc0(part 0) is current device
    Card did not respond to voltage select!
    Booting from nand ...

    NAND read: device 0 offset 0x280000, size 0x600000
    6291456 bytes read: OK
    ## Booting kernel from Legacy Image at 80200000 ...
    Image Name: Linux-3.2.0
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3249840 Bytes = 3.1 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    [ 0.000000] Linux version 3.2.0 (linux@ubuntu) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.03 - Linaro GCC 2014.03) ) #3 Mon Oct 27 14:31:32 CST 2014
    [ 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 ES1.0 (neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
    [ 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: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.000000] Memory: 256MB = 256MB total
    [ 0.000000] Memory: 252856k/252856k available, 9288k 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 : 0xd0800000 - 0xff000000 ( 744 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
    [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc05a6000 (5752 kB)
    [ 0.000000] .init : 0xc05a6000 - 0xc063e000 ( 608 kB)
    [ 0.000000] .data : 0xc063e000 - 0xc06a7070 ( 421 kB)
    [ 0.000000] .bss : 0xc06a7094 - 0xc06d5e64 ( 188 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 clocksource: GPTIMER1 at 32768 Hz
    [ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [ 0.000000] Console: colour dummy device 80x30
    [ 0.000274] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
    [ 0.067657] pid_max: default: 32768 minimum: 301
    [ 0.067932] Security Framework initialized
    [ 0.068084] Mount-cache hash table entries: 512
    [ 0.068756] CPU: Testing write buffer coherency: ok
    [ 0.093780] omap_hwmod: gfx: failed to hardreset
    [ 0.111785] omap_hwmod: pruss: failed to hardreset
    [ 0.113708] print_constraints: dummy:
    [ 0.114440] NET: Registered protocol family 16
    [ 0.118713] OMAP GPIO hardware version 0.1
    [ 0.124237] omap_mux_init: Add partition: #1: core, flags: 0
    [ 0.127929] +++++++++yidaji++++++++++
    [ 0.128021] omap_i2c.1: alias fck already exists
    [ 0.128448] ---------yidaji----------
    [ 0.128570]
    [ 0.128570]
    [ 0.128570]
    [ 0.128601] i2c1_init_szr has been executed
    [ 0.128601]
    [ 0.128601]
    [ 0.128631]
    [ 0.128997] omap_i2c.2: alias fck already exists
    [ 0.129425]
    [ 0.129455]
    [ 0.129455] omap_register_i2c1_bus has succeed
    [ 0.129486]
    [ 0.129486]
    [ 0.130279] +++++++++++++naloudou+++++++++++++++++++
    [ 0.130950] omap2_mcspi.1: alias fck already exists
    [ 0.131439] omap2_mcspi.2: alias fck already exists
    [ 0.133453] edma.0: alias fck already exists
    [ 0.133483] edma.0: alias fck already exists
    [ 0.133544] edma.0: alias fck already exists
    [ 0.193817] bio: create slab <bio-0> at 0
    [ 0.198425] SCSI subsystem initialized
    [ 0.201690] usbcore: registered new interface driver usbfs
    [ 0.202362] usbcore: registered new interface driver hub
    [ 0.202758] usbcore: registered new device driver usb
    [ 0.203308] registerd cppi-dma Intr @ IRQ 17
    [ 0.203338] Cppi41 Init Done Qmgr-base(d087a000) dma-base(d0878000)
    [ 0.203369] Cppi41 Init Done
    [ 0.203399] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
    [ 0.204010] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
    [ 0.206420] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
    [ 0.209411] tps65910 1-002d: could not be detected

    [ 0.227752] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz

    [ 0.231079] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [ 0.233337] Switching to clocksource gp timer
    [ 0.267974] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [ 0.268280] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    [ 0.268890] MUSB0 controller's USBSS revision = 4ea20800
    [ 0.270874] musb-hdrc musb-hdrc.0: USB OTG mode controller at d083c000 using DMA, IRQ 18
    [ 0.271179] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    [ 0.271789] MUSB1 controller's USBSS revision = 4ea20800
    [ 0.272735] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 0.272888] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
    [ 0.273101] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.273162] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.273193] usb usb1: Product: MUSB HDRC host driver
    [ 0.273223] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
    [ 0.273223] usb usb1: SerialNumber: musb-hdrc.1
    [ 0.275085] hub 1-0:1.0: USB hub found
    [ 0.275146] hub 1-0:1.0: 1 port detected
    [ 0.276214] musb-hdrc musb-hdrc.1: USB Host mode controller at d083e800 using DMA, IRQ 19
    [ 0.276977] NET: Registered protocol family 2
    [ 0.277313] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.277862] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    [ 0.278228] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.278472] TCP: Hash tables configured (established 8192 bind 8192)
    [ 0.278503] TCP reno registered
    [ 0.278533] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.278564] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.278991] NET: Registered protocol family 1
    [ 0.279479] RPC: Registered named UNIX socket transport module.
    [ 0.279510] RPC: Registered udp transport module.
    [ 0.279510] RPC: Registered tcp transport module.
    [ 0.279541] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.279968] NetWinder Floating Point Emulator V0.97 (double precision)
    [ 0.295532] VFS: Disk quotas dquot_6.5.2
    [ 0.295654] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 0.296691] msgmni has been set to 493
    [ 0.302795] alg: No test for stdrng (krng)
    [ 0.304016] io scheduler noop registered
    [ 0.304046] io scheduler deadline registered
    [ 0.304168] io scheduler cfq registered (default)
    [ 0.306274] Could not set LED4 to fully on
    [ 0.309295] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [ 0.932220] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 0.939208] console [ttyO0] enabled
    [ 0.944030] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [ 0.952301] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [ 0.960510] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [ 0.968750] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [ 0.977020] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [ 0.986267] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
    [ 1.013610] brd: module loaded
    [ 1.027832] loop: module loaded
    [ 1.031494] i2c-core: driver [tsl2550] using legacy suspend method
    [ 1.038024] i2c-core: driver [tsl2550] using legacy resume method
    [ 1.044555] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [ 1.103942] No daughter card found
    [ 1.107604] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [ 1.114898] The board is a AM335x Beaglebone Black.
    [ 1.122955] tps65217 1-0024: TPS65217 ID 0xe version 1.2
    [ 1.131347] print_constraints: DCDC1: 900 <--> 1800 mV at 1500 mV
    [ 1.140716] print_constraints: DCDC2: 900 <--> 3300 mV at 1125 mV
    [ 1.149993] print_constraints: DCDC3: 900 <--> 1500 mV at 1125 mV
    [ 1.159271] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
    [ 1.168548] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
    [ 1.177734] print_constraints: LDO3: 1800 <--> 3300 mV at 1800 mV
    [ 1.187072] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
    [ 1.195007] omap_hsmmc.0: alias fck already exists
    [ 1.200805] omap_hsmmc.1: alias fck already exists
    [ 1.206573]
    [ 1.208129]
    [ 1.209686]
    [ 1.211273] i2c1_init has been executed
    [ 1.215332]
    [ 1.216888]
    [ 1.218444]
    [ 1.220123] omap_i2c.3: alias fck already exists
    [ 1.225738] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz
    [ 1.232849] da8xx_lcdc.0: alias fck already exists
    [ 1.238739] da8xx_lcdc da8xx_lcdc.0: GLCD: Found INNOLUX_TN92 panel
    [ 1.265106] Console: switching to colour frame buffer device 100x30
    [ 1.295410] _omap_mux_get_by_name: Could not find signal ain0.ain0
    [ 1.301940] _omap_mux_get_by_name: Could not find signal ain1.ain1
    [ 1.308471] _omap_mux_get_by_name: Could not find signal ain2.ain2
    [ 1.314971] _omap_mux_get_by_name: Could not find signal ain3.ain3
    [ 1.321472] _omap_mux_get_by_name: Could not find signal vrefp.vrefp
    [ 1.328155] _omap_mux_get_by_name: Could not find signal vrefn.vrefn
    [ 1.337097] omap-gpmc omap-gpmc: GPMC revision 6.0
    [ 1.342132] Registering NAND on CS0
    [ 1.354309] mtdoops: mtd device (mtddev=name/number) must be supplied
    [ 1.362030] omap2-nand driver initializing
    [ 1.366821] ONFI flash detected
    [ 1.370269] ONFI param page 0 valid
    [ 1.373962] NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (AMD S34ML01G1)
    [ 1.381805] Creating 8 MTD partitions on "omap2-nand.0":
    [ 1.387451] 0x000000000000-0x000000020000 : "SPL"
    [ 1.395416] 0x000000020000-0x000000040000 : "SPL.backup1"
    [ 1.403808] 0x000000040000-0x000000060000 : "SPL.backup2"
    [ 1.412048] 0x000000060000-0x000000080000 : "SPL.backup3"
    [ 1.420349] 0x000000080000-0x000000260000 : "U-Boot"
    [ 1.428924] 0x000000260000-0x000000280000 : "U-Boot Env"
    [ 1.437225] 0x000000280000-0x000000780000 : "Kernel"
    [ 1.447235] 0x000000780000-0x000008000000 : "File System"
    [ 1.507507] OneNAND driver initializing
    [ 1.512939] UBI: attaching mtd7 to ubi0
    [ 1.517059] UBI: physical eraseblock size: 131072 bytes (128 KiB)
    [ 1.523620] UBI: logical eraseblock size: 126976 bytes
    [ 1.529296] UBI: smallest flash I/O unit: 2048
    [ 1.534271] UBI: VID header offset: 2048 (aligned 2048)
    [ 1.540557] UBI: data offset: 4096
    [ 2.622680] UBI: max. sequence number: 0
    [ 2.639221] UBI error: vtbl_check: volume table check failed: record 0, error 9
    [ 2.647613] UBI error: ubi_init: cannot attach mtd7
    [ 2.654602] CAN device driver interface
    [ 2.658630] CAN bus driver for Bosch D_CAN controller 1.0
    [ 2.714080] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [ 2.720550] davinci_mdio davinci_mdio.0: detected phy mask fffffffb
    [ 2.728271] davinci_mdio.0: probed
    [ 2.731872] davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver SMSC LAN8710/LAN8720
    [ 2.741210] usbcore: registered new interface driver zd1201
    [ 2.747467] usbcore: registered new interface driver cdc_ether
    [ 2.753936] usbcore: registered new interface driver cdc_eem
    [ 2.760253] usbcore: registered new interface driver dm9601
    [ 2.766204] cdc_ncm: 04-Aug-2011
    [ 2.769958] usbcore: registered new interface driver cdc_ncm
    [ 2.775939] Initializing USB Mass Storage driver...
    [ 2.781524] usbcore: registered new interface driver usb-storage
    [ 2.787841] USB Mass Storage support registered.
    [ 2.793670] mousedev: PS/2 mouse device common for all mice
    [ 2.801544] input: ti-tsc as /devices/platform/omap/ti_tscadc/tsc/input/input0
    [ 2.811279] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
    [ 2.818695] i2c /dev entries driver
    [ 2.824127] Linux video capture interface: v2.00
    [ 2.829681] usbcore: registered new interface driver uvcvideo
    [ 2.835723] USB Video Class driver (1.1.1)
    [ 2.924041] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 3.864013] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 4.884033] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 5.904022] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 6.924041] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 7.944030] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 8.964019] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 9.984039] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 11.004028] omap_i2c omap_i2c.2: timeout waiting for bus ready
    [ 11.012695] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 11.096099] cpuidle: using governor ladder
    [ 11.101104] cpuidle: using governor menu
    [ 11.109466] omap4_aes_mod_init: loading AM33X AES driver
    [ 11.115234] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
    [ 11.121917] omap4_aes_probe: probe() done
    [ 11.126739] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
    [ 11.132934] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
    [ 11.149383] omap4_sham_probe: probe() done
    [ 11.158477] usbcore: registered new interface driver usbhid
    [ 11.164398] usbhid: USB HID core driver
    [ 11.169250] tiadc tiadc: attached adc driver
    [ 11.174682] usbcore: registered new interface driver snd-usb-audio
    [ 11.183349] ALSA device list:
    [ 11.186523] No soundcards found.
    [ 11.190093] oprofile: hardware counters not available
    [ 11.195434] oprofile: using timer interrupt.
    [ 11.199981] nf_conntrack version 0.5.0 (3950 buckets, 15800 max)
    [ 11.206909] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 11.212646] TCP cubic registered
    [ 11.216094] NET: Registered protocol family 17
    [ 11.220794] can: controller area network core (rev 20090105 abi 8)
    [ 11.227447] NET: Registered protocol family 29
    [ 11.232116] can: raw protocol (rev 20090105)
    [ 11.236633] can: broadcast manager protocol (rev 20090105 t)
    [ 11.242645] Registering the dns_resolver key type
    [ 11.247711] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 11.255828] ThumbEE CPU extension supported.
    [ 11.260406] mux: Failed to setup hwmod io irq -22
    [ 11.266204] Power Management for AM33XX family
    [ 11.271118] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [ 11.277893] Copied the M3 firmware to UMEM
    [ 11.282287] Cortex M3 Firmware Version = 0x181
    [ 11.287719] sr_init: platform driver register failed
    [ 11.297302] clock: disabling unused clocks to save power
    [ 11.319763] Detected MACID=34:b1:f7:1a:1d:93
    [ 11.325683] cpsw: Detected MACID = 34:b1:f7:1a:1d:94
    [ 11.332305] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:08 UTC (946684808)
    [ 11.341735] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [ 11.349212] Please append a correct "root=" boot option; here are the available partitions:
    [ 11.358062] 1f00 128 mtdblock0 (driver?)
    [ 11.363403] 1f01 128 mtdblock1 (driver?)
    [ 11.368774] 1f02 128 mtdblock2 (driver?)
    [ 11.374114] 1f03 128 mtdblock3 (driver?)
    [ 11.379455] 1f04 1920 mtdblock4 (driver?)
    [ 11.384796] 1f05 128 mtdblock5 (driver?)
    [ 11.390136] 1f06 5120 mtdblock6 (driver?)
    [ 11.395477] 1f07 123392 mtdblock7 (driver?)
    [ 11.400817] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 11.409545] Backtrace:
    [ 11.412139] [<c0017854>] (dump_backtrace+0x0/0x110) from [<c0422ca0>] (dump_stack+0x18/0x1c)
    [ 11.421051] r6:00008000 r5:c05056d0 r4:c06a9d48 r3:c0660d48
    [ 11.427062] [<c0422c88>] (dump_stack+0x0/0x1c) from [<c0422eb8>] (panic+0x74/0x190)
    [ 11.435180] [<c0422e44>] (panic+0x0/0x190) from [<c05a6cd0>] (mount_block_root+0x198/0x228)
    [ 11.443969] r3:c0660d48 r2:00000000 r1:cf01df60 r0:c05056d0
    [ 11.449981] r7:c05d4b34
    [ 11.452667] [<c05a6b38>] (mount_block_root+0x0/0x228) from [<c05a6fe4>] (prepare_namespace+0xb0/0x1d0)
    [ 11.462493] [<c05a6f34>] (prepare_namespace+0x0/0x1d0) from [<c05a6948>] (kernel_init+0x124/0x128)
    [ 11.471954] r6:c0041cdc r5:c063d164 r4:c063d164
    [ 11.476898] [<c05a6824>] (kernel_init+0x0/0x128) from [<c0041cdc>] (do_exit+0x0/0x678)
    [ 11.485229] r5:c05a6824 r4:00000000
    [ 11.662322] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 13.654602] ti81xx_interrupt 1146: VBUS error workaround (delay coming)

  • 看输出的信息感觉你NAND的分区有点问题呀:

    Booting from nand ...

    NAND read: device 0 offset 0x280000, size 0x600000
    6291456 bytes read: OK

    [ 1.437225] 0x000000280000-0x000000780000 : "Kernel"

    这两处存在矛盾的地方,应该还是u-boot参数配置有问题


  •  其实是没有影响的,是有一点矛盾,就是在uboot中设置的kernel_size有点大,设置成0x500000就吻合了,默认是0x600000,没改,这么大也没事,内核多读了一些,不过那部分也没啥用,没啥影响,程序永远不会跑到那部分。

  • 顺便在这边提一下,这个问题解决了,当时是以回复的模式发在这里了,后来新发了一个帖子,问题已解决,具体见:http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/73615.aspx?pi2132219853=1,谢谢大家的关注和热心帮忙。

  • 周工,文档“Ubifs文件系统的制作和启动.pdf ”中选项 –F 写的有问题,应该是 -F

     

     

    这样做出来的UBIFS,会出现只能加载一次的问题。

  • 这2个不都是中横杠么,应该是输入法的不同吧?

  • 你好,我这是按照你的方法做的ubi,但启动出现了下面的问题,请问这该怎么解决。

    NAND read: device 0 offset 0x80000, size 0x40000
     262144 bytes read: OK

    NAND read: device 0 offset 0x200000, size 0x800000
     8388608 bytes read: OK
    Kernel image @ 0x82000000 [ 0x000000 - 0x32def0 ]
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8fff4000, end 8ffff8dc ... OK

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 3.14.26-g07d13c6-dirty (chialang@eda) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 Mon Mar 23 09:07:51 CST 2015
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine model: TI AM335x EVM
    [    0.000000] cma: CMA: reserved 24 MiB at 9e000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (sgx neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129536
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,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: 486224K/522240K available (4483K kernel code, 269K rwdata, 1532K rodata, 225K init, 207K bss, 36016K 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]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc05e8014   (6017 kB)
    [    0.000000]       .init : 0xc05e9000 - 0xc062168c   ( 226 kB)
    [    0.000000]       .data : 0xc0622000 - 0xc0665620   ( 270 kB)
    [    0.000000]        .bss : 0xc0665620 - 0xc06995e0   ( 208 kB)
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    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: timer2 at 24000000 Hz
    [    0.000013] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
    [    0.000032] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000280] Console: colour dummy device 80x30
    [    0.000309] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
    [    0.089453] pid_max: default: 32768 minimum: 301
    [    0.089550] Security Framework initialized
    [    0.089602] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.089613] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.096839] CPU: Testing write buffer coherency: ok
    [    0.097201] Setting up static identity map for 0x804672e0 - 0x80467338
    [    0.098101] devtmpfs: initialized
    [    0.099885] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.107031] omap_hwmod: tptc0 using broken dt data from edma
    [    0.107113] omap_hwmod: tptc1 using broken dt data from edma
    [    0.107184] omap_hwmod: tptc2 using broken dt data from edma
    [    0.111383] omap_hwmod: debugss: _wait_target_disable failed
    [    0.167523] pinctrl core: initialized pinctrl subsystem
    [    0.168530] regulator-dummy: no parameters
    [    0.170822] NET: Registered protocol family 16
    [    0.172714] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.174938] cpuidle: using governor ladder
    [    0.174953] cpuidle: using governor menu
    [    0.181533] syscon 44e10000.control_module: regmap [mem 0x44e10000-0x44e107fb] registered
    [    0.182984] platform 49000000.edma: alias fck already exists
    [    0.183007] platform 49000000.edma: alias fck already exists
    [    0.183023] platform 49000000.edma: alias fck already exists
    [    0.184148] OMAP GPIO hardware version 0.1
    [    0.194616] omap-gpmc 50000000.gpmc: could not find pctldev for node /pinmux@44e10800/nandflash_pins_default, deferring probe
    [    0.194651] platform 50000000.gpmc: Driver omap-gpmc requests probe deferral
    [    0.196669] No ATAGs?
    [    0.196687] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.210869] bio: create slab <bio-0> at 0
    [    0.225430] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    [    0.226378] vbat: 5000 mV
    [    0.229306] i2c-core: driver [palmas] using legacy suspend method
    [    0.229318] i2c-core: driver [palmas] using legacy resume method
    [    0.230435] omap_i2c 44e0b000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c0_pins, deferring probe
    [    0.230462] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
    [    0.230488] omap_i2c 4802a000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c1_pins, deferring probe
    [    0.230503] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
    [    0.230526] omap_i2c 4819c000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c2_pins, deferring probe
    [    0.230541] platform 4819c000.i2c: Driver omap_i2c requests probe deferral
    [    0.230894] pps_core: LinuxPPS API ver. 1 registered
    [    0.230904] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.231031] PTP clock support registered
    [    0.232502] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.234123] Switched to clocksource timer1
    [    0.253174] NET: Registered protocol family 2
    [    0.253987] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.254041] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.254087] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.254219] TCP: reno registered
    [    0.254237] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.254256] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.254444] NET: Registered protocol family 1
    [    0.254826] RPC: Registered named UNIX socket transport module.
    [    0.254838] RPC: Registered udp transport module.
    [    0.254845] RPC: Registered tcp transport module.
    [    0.254851] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.255315] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
    [    0.258010] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.386943] VFS: Disk quotas dquot_6.5.2
    [    0.387010] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.387508] NFS: Registering the id_resolver key type
    [    0.387599] Key type id_resolver registered
    [    0.387608] Key type id_legacy registered
    [    0.387646] jffs2: version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
    [    0.387817] msgmni has been set to 997
    [    0.389243] NET: Registered protocol family 38
    [    0.389281] io scheduler noop registered
    [    0.389289] io scheduler deadline registered
    [    0.389310] io scheduler cfq registered (default)
    [    0.390668] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.394656] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [    0.397533] omap_uart 44e09000.serial: no wakeirq for uart0
    [    0.397684] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
    [    1.065382] console [ttyO0] enabled
    [    1.070402] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.088201] brd: module loaded
    [    1.097095] loop: module loaded
    [    1.100743] (hci_tty): inside hci_tty_init
    [    1.105537] (hci_tty): allocated 249, 0
    [    1.111456] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.125450] i2c-core: driver [rtc-ds1307] using legacy suspend method
    [    1.132227] i2c-core: driver [rtc-ds1307] using legacy resume method
    [    1.139665] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [    1.147189] 44e3e000.rtc: already running
    [    1.152083] i2c /dev entries driver
    [    1.157652] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    1.165759] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.172304] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [    1.179513] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [    1.186651] platform 44d00000.wkup_m3: Driver wkup_m3 requests probe deferral
    [    1.195510] oprofile: using arm/armv7
    [    1.199643] TCP: cubic registered
    [    1.203122] Initializing XFRM netlink socket
    [    1.207719] NET: Registered protocol family 17
    [    1.212424] NET: Registered protocol family 15
    [    1.217226] Key type dns_resolver registered
    [    1.222313] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [    1.231497] cpu cpu0: cpu0 clock notifier not ready, retry
    [    1.237348] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
    [    1.245739] PM: bootloader does not support rtc-only!
    [    1.251058] ThumbEE CPU extension supported.
    [    1.255675] Registering SWP/SWPB emulation handler
    [    1.262162] vbat: disabling
    [    1.265215] regulator-dummy: disabling
    [    1.269520] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.274959] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.282367] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xca
    [    1.289094] nand: Micron NAND 256MiB 3,3V 16-bit
    [    1.293942] nand: 256MiB, SLC, page size: 2048, OOB size: 64
    [    1.299893] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.305652] 10 ofpart partitions found on MTD device omap2-nand.0
    [    1.312053] Creating 10 MTD partitions on "omap2-nand.0":
    [    1.317750] 0x000000000000-0x000000020000 : "NAND.SPL"
    [    1.324920] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [    1.332604] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [    1.340314] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [    1.348010] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [    1.355916] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
    [    1.363736] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
    [    1.371278] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
    [    1.379658] 0x000000200000-0x000000a00000 : "NAND.kernel"
    [    1.393335] 0x000000a00000-0x000010000000 : "NAND.file-system"
    [    1.606408] tps65910 0-002d: No interrupt support, no core IRQ
    [    1.618588] vrtc: 1800 mV
    [    1.622019] vrtc: supplied by vbat
    [    1.629156] vio: at 1500 mV
    [    1.632273] vio: supplied by vbat
    [    1.639732] vdd_mpu: 912 <--> 1375 mV at 1262 mV
    [    1.644771] vdd_mpu: supplied by vbat
    [    1.652544] vdd_core: 912 <--> 1150 mV at 1137 mV
    [    1.657670] vdd_core: supplied by vbat
    [    1.664470] vdd3: 5000 mV
    [    1.670488] vdig1: at 1800 mV
    [    1.673781] vdig1: supplied by vbat
    [    1.680651] vdig2: at 1800 mV
    [    1.683929] vdig2: supplied by vbat
    [    1.690805] vpll: at 1800 mV
    [    1.693998] vpll: supplied by vbat
    [    1.700797] vdac: at 1800 mV
    [    1.703985] vdac: supplied by vbat
    [    1.710763] vaux1: at 1800 mV
    [    1.714041] vaux1: supplied by vbat
    [    1.720922] vaux2: at 3300 mV
    [    1.724219] vaux2: supplied by vbat
    [    1.731063] vaux33: at 3300 mV
    [    1.734449] vaux33: supplied by vbat
    [    1.741409] vmmc: 1800 <--> 3300 mV at 3300 mV
    [    1.746252] vmmc: supplied by vbat
    [    1.750529] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
    [    1.757650] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
    [    1.764622] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
    [    1.771007]  remoteproc0: wkup_m3 is available
    [    1.775716]  remoteproc0: Note: remoteproc is still under development and considered experimental.
    [    1.785135]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [    1.796129]  remoteproc0: Direct firmware load failed with error -2
    [    1.802713]  remoteproc0: Falling back to user helper
    [    1.808388] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1260000]:-22
    [    1.819930] UBI: attaching mtd9 to ubi0
    [    1.959402] UBI error: scan_peb: bad image sequence number 1585882779 in PEB 287, expected 1666860573
    [    1.969020] Erase counter header dump:
    [    1.972921]     magic          0x55424923
    [    1.976830]     version        1
    [    1.979916]     ec             0
    [    1.983000]     vid_hdr_offset 2048
    [    1.986366]     data_offset    4096
    [    1.989722]     image_seq      1585882779
    [    1.993622]     hdr_crc        0x99eaa7c1
    [    1.997530] erase counter header hexdump:
    [    2.001851] UBI error: ubi_attach_mtd_dev: failed to attach mtd9, error -22
    [    2.009203] UBI error: ubi_init: cannot attach mtd9
    [    2.074249] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    2.080663] davinci_mdio 4a101000.mdio: detected phy mask fffbffff
    [    2.088089] libphy: 4a101000.mdio: probed
    [    2.092320] davinci_mdio 4a101000.mdio: phy[18]: device 4a101000.mdio:12, driver Marvell 88E1111
    [    2.102349] cpsw 4a100000.ethernet: Detected MACID = 6c:ec:eb:87:a3:bc
    [    2.111014] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    2.124215] UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19
    [    2.132136] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [    2.140498] Please append a correct "root=" boot option; here are the available partitions:
    [    2.149254] 1f00             128 mtdblock0  (driver?)
    [    2.154547] 1f01             128 mtdblock1  (driver?)
    [    2.159820] 1f02             128 mtdblock2  (driver?)
    [    2.165105] 1f03             128 mtdblock3  (driver?)
    [    2.170377] 1f04             256 mtdblock4  (driver?)
    [    2.175661] 1f05            1024 mtdblock5  (driver?)
    [    2.180933] 1f06             128 mtdblock6  (driver?)
    [    2.186217] 1f07             128 mtdblock7  (driver?)
    [    2.191489] 1f08            8192 mtdblock8  (driver?)
    [    2.196772] 1f09          251904 mtdblock9  (driver?)
    [    2.202044] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

  • 您好!我的是nor flash启动把jian zhou提供的文件系统烧进去得出如下现在:

    U-Boot 2014.07-00001-g4a8e5b8-dirty (Sep 14 2015 - 15:29:32)

    I2C: ready
    DRAM: hjl...
    512 MiB
    Flash: 32 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    hjl...
    Net: hjl...
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    Kernel image @ 0x82000000 [ 0x000000 - 0x478c50 ]
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8fff4000, end 8ffff432 ... OK

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 3.14.43-g875c69b (root@hjl-desktop) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #55 SMP Thu Sep 10 13:35:33 CST 2015
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: TI AM335x BeagleBone
    [ 0.000000] cma: CMA: reserved 16 MiB at 9e800000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (sgx neon )
    [ 0.000000] PERCPU: Embedded 9 pages/cpu @df9d3000 s13888 r8192 d14784 u36864
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129536
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 noinitrd ip=off mem=512M rootwait rw ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs init=/init
    [ 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: 485984K/522240K available (6080K kernel code, 716K rwdata, 2412K rodata, 413K init, 5529K bss, 36256K 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] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc0853530 (8494 kB)
    [ 0.000000] .init : 0xc0854000 - 0xc08bb640 ( 414 kB)
    [ 0.000000] .data : 0xc08bc000 - 0xc096f3a0 ( 717 kB)
    [ 0.000000] .bss : 0xc096f3a0 - 0xc0ed5a38 (5530 kB)
    [ 0.000000] Hierarchical RCU implementation.
    [ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 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: timer2 at 24000000 Hz
    [ 0.000029] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
    [ 0.000146] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.002277] Console: colour dummy device 80x30
    [ 0.002417] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
    [ 0.002444] ... MAX_LOCKDEP_SUBCLASSES: 8
    [ 0.002467] ... MAX_LOCK_DEPTH: 48
    [ 0.002490] ... MAX_LOCKDEP_KEYS: 8191
    [ 0.002513] ... CLASSHASH_SIZE: 4096
    [ 0.002536] ... MAX_LOCKDEP_ENTRIES: 16384
    [ 0.002558] ... MAX_LOCKDEP_CHAINS: 32768
    [ 0.002581] ... CHAINHASH_SIZE: 16384
    [ 0.002604] memory used by lock dependency info: 3695 kB
    [ 0.002628] per task-struct memory footprint: 1152 bytes
    [ 0.002745] Calibrating delay loop... 297.36 BogoMIPS (lpj=1486848)
    [ 0.117273] pid_max: default: 32768 minimum: 301
    [ 0.118317] Security Framework initialized
    [ 0.118646] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.118688] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.181853] CPU: Testing write buffer coherency: ok
    [ 0.185178] CPU0: thread -1, cpu 0, socket -1, mpidr 0
    [ 0.185333] Setting up static identity map for 0x805c2d90 - 0x805c2e00
    [ 0.194308] Brought up 1 CPUs
    [ 0.194361] SMP: Total of 1 processors activated (297.36 BogoMIPS).
    [ 0.194391] CPU: All CPU(s) started in SVC mode.
    [ 0.202445] devtmpfs: initialized
    [ 0.229954] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.342008] omap_hwmod: tptc0 using broken dt data from edma
    [ 0.343136] omap_hwmod: tptc1 using broken dt data from edma
    [ 0.344241] omap_hwmod: tptc2 using broken dt data from edma
    [ 0.363029] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.447117] pinctrl core: initialized pinctrl subsystem
    [ 0.460129] regulator-dummy: no parameters
    [ 0.468806] NET: Registered protocol family 16
    [ 0.485163] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.501955] cpuidle: using governor ladder
    [ 0.502017] cpuidle: using governor menu
    [ 0.532292] syscon 44e10000.control_module: regmap [mem 0x44e10000-0x44e107fb] registered
    [ 0.544048] platform 49000000.edma: alias fck already exists
    [ 0.544140] platform 49000000.edma: alias fck already exists
    [ 0.544200] platform 49000000.edma: alias fck already exists
    [ 0.556429] OMAP GPIO hardware version 0.1
    [ 0.635393] omap-gpmc 50000000.gpmc: could not find pctldev for node /pinmux@44e10800/gpmc_pins, deferring probe
    [ 0.635512] platform 50000000.gpmc: Driver omap-gpmc requests probe deferral
    [ 0.662501] No ATAGs?
    [ 0.662554] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.870189] bio: create slab <bio-0> at 0
    [ 0.992669] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    [ 1.000529] vmmcsd_fixed: 3300 mV
    [ 1.018777] i2c-core: driver [palmas] using legacy suspend method
    [ 1.018826] i2c-core: driver [palmas] using legacy resume method
    [ 1.023238] SCSI subsystem initialized
    [ 1.031254] usbcore: registered new interface driver usbfs
    [ 1.032541] usbcore: registered new interface driver hub
    [ 1.034465] usbcore: registered new device driver usb
    [ 1.041207] omap_i2c 44e0b000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c0_pins, deferring probe
    [ 1.041321] platform 44e0b000.i2c: Driver omap_i2c requests probe deferral
    [ 1.058538] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 1.079527] Switched to clocksource timer1
    [ 1.564076] NET: Registered protocol family 2
    [ 1.569938] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [ 1.570503] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
    [ 1.575255] TCP: Hash tables configured (established 4096 bind 4096)
    [ 1.575671] TCP: reno registered
    [ 1.575742] UDP hash table entries: 256 (order: 2, 20480 bytes)
    [ 1.576371] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
    [ 1.579520] NET: Registered protocol family 1
    [ 1.583245] RPC: Registered named UNIX socket transport module.
    [ 1.583294] RPC: Registered udp transport module.
    [ 1.583323] RPC: Registered tcp transport module.
    [ 1.583352] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 1.586640] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
    [ 1.608116] futex hash table entries: 256 (order: 2, 16384 bytes)
    [ 2.090136] VFS: Disk quotas dquot_6.5.2
    [ 2.090734] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 2.096194] NFS: Registering the id_resolver key type
    [ 2.097326] Key type id_resolver registered
    [ 2.097380] Key type id_legacy registered
    [ 2.097680] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
    [ 2.098897] msgmni has been set to 981
    [ 2.107802] io scheduler noop registered
    [ 2.107858] io scheduler deadline registered
    [ 2.108018] io scheduler cfq registered (default)
    [ 2.118229] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 2.145020] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [ 2.168149] omap_uart 44e09000.serial: no wakeirq for uart0
    [ 2.169930] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
    [ 2.905009] console [ttyO0] enabled
    [ 2.930267] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [ 2.941679] [drm] Initialized drm 1.1.0 20060810
    [ 3.034595] brd: module loaded
    [ 3.091443] loop: module loaded
    [ 3.096659] (hci_tty): inside hci_tty_init
    [ 3.104683] (hci_tty): allocated 251, 0
    [ 3.127150] sbs_register_mtd_blktrans
    [ 3.131549] mtdoops: mtd device (mtddev=name/number) must be supplied
    [ 3.138343] sbs_cfi_probe_init
    [ 3.141688] sbs_register_mtd_chip
    [ 3.145348] sbs_register_mtd_chip
    [ 3.174834] usbcore: registered new interface driver asix
    [ 3.182021] usbcore: registered new interface driver ax88179_178a
    [ 3.189798] usbcore: registered new interface driver cdc_ether
    [ 3.197277] usbcore: registered new interface driver smsc95xx
    [ 3.204687] usbcore: registered new interface driver net1080
    [ 3.211989] usbcore: registered new interface driver cdc_subset
    [ 3.219561] usbcore: registered new interface driver zaurus
    [ 3.226952] usbcore: registered new interface driver cdc_ncm
    [ 3.238456] usbcore: registered new interface driver cdc_wdm
    [ 3.246086] usbcore: registered new interface driver usb-storage
    [ 3.253956] usbcore: registered new interface driver usbtest
    [ 3.269049] mousedev: PS/2 mouse device common for all mice
    [ 3.290872] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [ 3.302422] i2c /dev entries driver
    [ 3.307217] Driver for 1-wire Dallas network protocol.
    [ 3.326131] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 3.337132] blkdev_res = 0
    [ 3.343444] mmc_driver_res = 0
    [ 3.346698] sbs_mmc_driver = 0
    [ 3.354259] omap_hsmmc_probe
    [ 3.357756] omap_hsmmc_gpio_init()
    [ 3.424606] usbcore: registered new interface driver usbhid
    [ 3.430808] usbhid: USB HID core driver
    [ 3.443664] platform 44d00000.wkup_m3: Driver wkup_m3 requests probe deferral
    [ 3.462435] oprofile: using arm/armv7
    [ 3.467981] TCP: cubic registered
    [ 3.471944] Initializing XFRM netlink socket
    [ 3.476810] NET: Registered protocol family 17
    [ 3.481827] NET: Registered protocol family 15
    [ 3.487440] Key type dns_resolver registered
    [ 3.492117] NET: Registered protocol family 41
    [ 3.506288] PM: bootloader does not support rtc-only!
    [ 3.512592] ThumbEE CPU extension supported.
    [ 3.517217] Registering SWP/SWPB emulation handler
    [ 3.522471] SmartReflex Class3 initialized
    [ 3.538464] regulator-dummy: disabling
    [ 3.549942] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [ 3.555807] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [ 3.563084] gpmc_probe_dt:1618
    [ 3.566359] gpmc_probe_generic_child:1516
    [ 3.571383] gpmc_probe_generic_child:val = a00
    [ 3.582251] of_flash_probe:246
    [ 3.585520] info->list[i].map.phys = 0x8000000 info->list[i].map.size = 0x2000000
    [ 3.596763] sbs_do_map_prob
    [ 3.599939] sbs_cfi_probe
    [ 3.602713] genprobe_ident_chips
    [ 3.606131] cfi->interleave = 2
    [ 3.609548] type = 1
    [ 3.611865] cfi->device_trpe = 1
    [ 3.615295] map->virt = e1000000: base + osf*0x10 = 20
    [ 3.620816] map->virt = e1000000: base + osf*0x10 = 20
    [ 3.626243] map->virt = e1000000: base + osf*0x10 = 20
    [ 3.631758] map->virt = e1000000: base + osf*0x10 = 20
    [ 3.637187] map->virt = e1000000: base + osf*0x10 = 20
    [ 3.642694] cfi->device_trpe = 2
    [ 3.646111] map->virt = e1000000: base + osf*0x10 = 40
    [ 3.651613] map->virt = e1000000: base + osf*0x10 = 40
    [ 3.657040] map->virt = e1000000: base + osf*0x10 = 40
    [ 3.662547] map->virt = e1000000: base + osf*0x10 = 40
    [ 3.667968] map->virt = e1000000: base + osf*0x10 = 40
    [ 3.673466] cfi->device_trpe = 4
    [ 3.676876] map->virt = e1000000: base + osf*0x10 = 80
    [ 3.682382] map->virt = e1000000: base + osf*0x10 = 80
    [ 3.687804] map->virt = e1000000: base + osf*0x10 = 80
    [ 3.693308] map->virt = e1000000: base + osf*0x10 = 80
    [ 3.698731] map->virt = e1000000: base + osf*0x10 = 80
    [ 3.704231] cfi->interleave = 1
    [ 3.707550] type = 2
    [ 3.709945] cfi->device_trpe = 2
    [ 3.713360] map->virt = e1000000: base + osf*0x10 = 20
    [ 3.718853] sbs,s29gl010p11t: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000020 Chip ID 0x00227e
    [ 3.729843] cp->name = CFI map-name = sbs,s29gl010p11t
    [ 3.735355] cfi.chipshift = 19: cfi.cfiq->DevSize = 19
    [ 3.740853] genprobe_ident_chips:98
    [ 3.744569] do genprobe_ident_chips init
    [ 3.748721] Amd/Fujitsu Extended Query Table at 0x0040
    [ 3.754237] map->virt = e1000000: base + osf*0x10 = 20
    [ 3.759755] Amd/Fujitsu Extended Query version 1.3.
    [ 3.765110] number of CFI chips: 1
    [ 3.768708] mtd_check_cmd_set mtd = 0
    [ 3.776518] 5 ofpart partitions found on MTD device sbs,s29gl010p11t
    [ 3.783426] Creating 5 MTD partitions on "sbs,s29gl010p11t":
    [ 3.789594] 0x000000000000-0x0000000c0000 : "boot"
    [ 3.816287] 0x0000000c0000-0x0000000e0000 : "env1"
    [ 3.835558] 0x0000000e0000-0x000000100000 : "env2"
    [ 3.854317] 0x000000100000-0x000000600000 : "kernel"
    [ 3.873417] 0x000000600000-0x000002000000 : "rootfs"
    [ 3.921728] DCDC1: at 1500 mV
    [ 3.932560] vdd_mpu: 925 <--> 1375 mV at 1100 mV
    [ 3.944860] vdd_core: 925 <--> 1150 mV at 1100 mV
    [ 3.958016] LDO1: at 1800 mV
    [ 3.962421] mmc0: host does not support reading read-only switch. assuming write-enable.
    [ 3.976991] mmc0: new high speed SDHC card at address 0002
    [ 3.988144] mmc_prob_1!
    [ 3.993917] LDO2: at 3300 mV
    [ 3.997586] mmc_prob_md!
    [ 4.000652] mmcblk0: mmc0:0002 00000 3.70 GiB
    [ 4.005344] mmc_prob_alloc_parts!
    [ 4.028438] mmcblk0: p1 p2
    [ 4.036733] LDO3: 1800 mV
    [ 4.053696] mmc_prob_add_disk!
    [ 4.058826] LDO4: at 3300 mV
    [ 4.069993] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [ 4.075855] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 4.085696] remoteproc0: wkup_m3 is available
    [ 4.090625] remoteproc0: Note: remoteproc is still under development and considered experimental.
    [ 4.100166] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [ 4.113860] remoteproc0: Direct firmware load failed with error -2
    [ 4.120867] remoteproc0: Falling back to user helper
    [ 4.136548] UBI: attaching mtd4 to ubi0
    [ 4.142053] UBI error: validate_ec_hdr: bad VID header offset 64, expected 2048
    [ 4.150549] UBI error: validate_ec_hdr: bad EC header
    [ 4.155883] Erase counter header dump:
    [ 4.159959] magic 0x55424923
    [ 4.163920] version 1
    [ 4.167055] ec 1
    [ 4.170288] vid_hdr_offset 64
    [ 4.173512] data_offset 128
    [ 4.176830] image_seq 771273051
    [ 4.180781] hdr_crc 0x7f4bb7cd
    [ 4.184735] erase counter header hexdump:
    [ 4.189068] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.43-g875c69b #55
    [ 4.196472] [<c0015300>] (unwind_backtrace) from [<c001202c>] (show_stack+0x10/0x14)
    [ 4.204772] [<c001202c>] (show_stack) from [<c05b70c0>] (dump_stack+0x78/0x94)
    [ 4.212518] [<c05b70c0>] (dump_stack) from [<c0416a8c>] (validate_ec_hdr+0x10c/0x168)
    [ 4.220885] [<c0416a8c>] (validate_ec_hdr) from [<c04176b8>] (ubi_io_read_ec_hdr+0x15c/0x230)
    [ 4.229974] [<c04176b8>] (ubi_io_read_ec_hdr) from [<c041bed0>] (ubi_attach+0x138/0x13ec)
    [ 4.238596] [<c041bed0>] (ubi_attach) from [<c0411938>] (ubi_attach_mtd_dev+0x628/0xca4)
    [ 4.247245] [<c0411938>] (ubi_attach_mtd_dev) from [<c088f55c>] (ubi_init+0x1f4/0x2c4)
    [ 4.255695] [<c088f55c>] (ubi_init) from [<c0008968>] (do_one_initcall+0xe4/0x144)
    [ 4.263803] [<c0008968>] (do_one_initcall) from [<c0854c18>] (kernel_init_freeable+0xfc/0x1cc)
    [ 4.272980] [<c0854c18>] (kernel_init_freeable) from [<c05b21b4>] (kernel_init+0x8/0xec)
    [ 4.281607] [<c05b21b4>] (kernel_init) from [<c000e648>] (ret_from_fork+0x14/0x2c)
    [ 4.289673] UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
    [ 4.296661] UBI error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
    [ 4.304274] UBI error: ubi_init: cannot attach mtd4
    [ 4.379351] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 4.385821] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [ 4.399551] libphy: 4a101000.mdio: probed
    [ 4.403848] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    [ 4.418231] cpsw 4a100000.ethernet: Detected MACID = d0:5f:b8:fb:e4:c4
    [ 4.440412] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
    [ 4.449706] sr_init: No PMIC hook to init smartreflex
    [ 4.457625] sr_init: platform driver register failed for SR
    [ 4.523558] UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19
    [ 4.531849] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
    [ 4.540373] Please append a correct "root=" boot option; here are the available partitions:
    [ 4.549601] 1f00 768 mtdblock0 (driver?)
    [ 4.554986] 1f01 128 mtdblock1 (driver?)
    [ 4.560474] 1f02 128 mtdblock2 (driver?)
    [ 4.565842] 1f03 5120 mtdblock3 (driver?)
    [ 4.571305] 1f04 26624 mtdblock4 (driver?)
    [ 4.576664] b300 3880960 mmcblk0 driver: mmcblk
    [ 4.582400] b301 72261 mmcblk0p1 00000000-01
    [ 4.588028] b302 3799372 mmcblk0p2 00000000-02
    [ 4.593888] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

  • 这个文档主要是针对NAND FLASH写的,如果是Nor FLASH,参数肯定是不一样的,也有可能用别的文件系统。

  • 是否可以把u-boot和kernel放在NOR Flash中,文件系统放在NAND Flash中?如果是这样,文件系统该如何制作?

  • 这篇文档就是针对放在NAND FLASH上的文件系统写的,和U-boot,kernel放在哪里无关。

  • 你好,

    我按照你的文档,第一步就是在u-boot当中加入那些宏定义,然后我进行编译的时候,出了一些问题:

    make[1]: Leaving directory `/home/firelord/Documents/work4graduate20160219/sunubootgood/drivers/mtd/nand' make -C drivers/mtd/onenand/ make[1]: Entering directory `/home/firelord/Documents/work4graduate20160219/sunubootgood/drivers/mtd/onenand' arm-none-linux-gnueabi-ar crv libonenand.a make[1]: Leaving directory `/home/firelord/Documents/work4graduate20160219/sunubootgood/drivers/mtd/onenand' make -C drivers/mtd/ubi/ make[1]: Entering directory `/home/firelord/Documents/work4graduate20160219/sunubootgood/drivers/mtd/ubi' build.c:50:2: error: #error Malloc area too small for UBI, increase CONFIG_SYS_MALLOC_LEN to >= 512k make[1]: Leaving directory `/home/firelord/Documents/work4graduate20160219/sunubootgood/drivers/mtd/ubi' make[1]: Entering directory `/home/firelord/Documents/work4graduate20160219/sunubootgood/drivers/mtd/ubi' arm-none-linux-gnueabi-gcc   -Os  -fno-common -ffixed-r8 -msoft-float   -D__KERNEL__ -DTEXT_BASE=0x80700000 -I/home/firelord/Documents/work4graduate20160219/sunubootgood/include -fno-builtin -ffreestanding -nostdinc -isystem /home/sun/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv7-a -Wall -Wstrict-prototypes -fno-stack-protector   \                 -o build.o build.c -c build.c:50:2: error: #error Malloc area too small for UBI, increase CONFIG_SYS_MALLOC_LEN to >= 512k make[1]: *** [build.o] Error 1 make[1]: Leaving directory `/home/firelord/Documents/work4graduate20160219/sunubootgood/drivers/mtd/ubi' make: *** [drivers/mtd/ubi/libubi.a] Error 2

     

    and then I change the define of CONFIG_SYS_MALLOC_LEN . change is like below:

    #define (CONFIG_ENV_SIZE + (768 * 1024)) 

    OR #define CONFIG_SYS_MALLOC_LEN (2 << 20) 

    OR #define CONFIG_SYS_MALLOC_LEN (4 << 20)

    虽然我能够成功进行u-boot的编译了,但是编译好的u-boot放到nand之后,并不能正常工作,甚至都没有办法在串口当中收到任何信息。

    你觉得这会是什么问题呢?

  • 你用的是哪个Linux的版本,为啥我看到了 arm-none-linux-gnueabi-gcc

    我们SDK 6.0前用的是arm-arago-linux-gnueabi-gcc, 之后用的是arm-linux-gnueabihf-gcc,也就是Linaro的,你用的是哪个?编译的是335么

  • 我的核心芯片是TMS320DM8168,使用的是ezsdk5.05.02.00版本。

  • 上述的配置和描述都是基于AM335x平台的,并不适用于DM8148。各个的SDK都不相同。建议你把DM8148的问题post到达芬奇论坛。

  • 针对其他的处理器平台,我没有做过验证,但是我觉得可以做个借鉴。

  • $ mkfs.ubifs –F -q -r /home/usr/fs -m 2048 -e 126976 -c 2047 -o ubifs.img

    该指令后,报错Error: max_leb_cnt too low (2556 needed)

  • 根据那个文档再检查下参数配置。

  • 利用工具将文件系统[arago-base-tisdk-image-am335x-evm.tar.gz]生成ubi.img,文件大小是45.5M不是25M;

    通过这个帖子http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/62170.aspx将相关文件烧入nand中,

    其中nandecc hw 2这个命令没有输,

    设置#setenv bootargs 'console=ttyO0,115200n8 noinitrd ip=off mem=256M
    rootwait=1 rw ubi.mtd=7,2048 rootfstype=ubifs root=ubi0:rootfs init=/init'

    boot启动后打印如下信息:

    [ 19.312043] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
    [ 19.319542] Please append a correct "root=" boot option; here are the available partitions:
    [ 19.328549] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 19.337363] Backtrace:



  • 上边的问题已解决。

    原因是烧写ubi.img不完整,扩大烧写nand空间就好了。

    新的问题是:我想将自己SD卡中的文件系统生成ubifs文件系统,执行如下指令:

    $ mkfs.ubifs –F -q -r /home/usr/fs -m 2048 -e 126976 -c 2047 -o
    ubifs.img

    总是报错:Error: max_leb_cnt too low (2991 needed)

    请问该怎么办

  • 没太明白什么意思,你之前做的文件系统是基于SDK自带的文件系统解压后做的么?

  • SDK中有两个文件系统压缩包:

    1  arago-base-tisdk-image-am335x-evm.tar.gz (17.7MB)

    2  tisdk-rootfs-image-am335x-evm.tar.gz (270.4MB)

    制作的UBI文件系统是通过第1个,通过第2个一直报错;

    而SD卡中的文件系统是第2个,应用开发阶段仍然采用SD的方式,最后才用NAND方式,

    以后会遇到的问题是:应用开发阶段用的文件系统(第2个),无法制作UBI文件系统;

    还想请教:这两个文件系统差别在哪里?

  • 小的是精简的文件系统,大的是带显示的大而全的文件系统,你们的应用用那个精简的就可以。

    你是同样的操作命令,大的文件系统就不行么?是不是参数的问题

  • 您指的参数是“$ mkfs.ubifs –F -q -r /home/usr/fs -m 2048 -e 126976 -c 2047 -o ubifs.img”红色的部分参数吗?

    这些参数是根据NAND 型号定的,我的板子和开发板的NAND是相同型号的,所以应该不是参数的问题。


    大的文件系统制作出来的UBI文件系统应该也很大吧,应该会大于NAND的容量(256MB)吧,这样的话也就没啥意义了。


  • 是的,那个大的文件系统,里面包含了很多多媒体文件,还有显示图形库,你们都用不到。

    你们用那个小的就可以了。

  • 周工,关于以下两条指令:

    $ mkfs.ubifs -F -q -r /home/usr/fs -m 2048 -e 126976 -c 2047 -o ubifs.img

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

    下面两个选项要请教下:

    1. -q:我查了最新的mkfs.ubifs代码,没有该选项,它是做什么用的?

    2. -c 2047:我看文档中的说明是“文件系统所占用的最大block数,一般小于等于block count -1”。我的是Android系统,Nand Flash共256MB(2048块),MLO、u-boot和uImage占用了前7MB的空间,也就是说,ubifs的可用空间是249MB(1992块),那么,这里我应该设置成小于等于2047,还是小于等于1991?

  • 我那个文档也是参考网上社区的资料验证和总结的,都有参考资料的链接,你可以看一下。

  • 参考资料的链接”在哪里?文档里没有啊,请在这里列一下呗!谢谢!

  • 不好意思,文档确实忘记了加参考资料链接地址,我是照着下面的文档做的:

    http://processors.wiki.ti.com/index.php/UBIFS_Support

  • 请问下,在按照文档中的说明编译时,编译的是PC端工具吗?(使用的是gcc)

    我的ubuntu下设置了CC环境变量为“arm-2010.09/bin/arm-none-linux-gnueabi-”,结果配置zlib时出错:

    cq@ubuntu:~/mtd/zlib-1.2.5$ ./configure --prefix=~/mtd/install/
    Checking for shared library support...
    Tested /home/cq/arm-2010.09/bin/arm-none-linux-gnueabi- -w -c -O ztest28533.c
    ./configure: 243: ./configure: /home/cq/arm-2010.09/bin/arm-none-linux-gnueabi-: not found
    Tested cc -shared -O -o ztest28533.so ztest28533.o
    cc: error: ztest28533.o: No such file or directory
    cc: fatal error: no input files
    compilation terminated.
    No shared library support; try without defining CC and CFLAGS
    Building static library libz.a version 1.2.5 with /home/cq/arm-2010.09/bin/arm-none-linux-gnueabi-.
    Checking for off64_t... No.
    Checking for fseeko... No.
    Checking for unistd.h... No.
    Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf().
    Checking for snprintf() in stdio.h... No.
    WARNING: snprintf() not found, falling back to sprintf(). zlib
    can build but will be open to possible buffer-overflow security
    vulnerabilities.
    Checking for return value of sprintf()... No.
    WARNING: apparently sprintf() does not return a value. zlib
    can build but will be open to possible string-format security
    vulnerabilities.
    cq@ubuntu:~/mtd/zlib-1.2.5$

  • 这个“arm-2010.09/bin/arm-none-linux-gnueabi-“的交叉编译工具太老了,要换成SDK06里的交叉编译工具:

    http://processors.wiki.ti.com/index.php/Processor_Linux_SDK_GCC_Toolchain

  • 咨询下,根据文档,制作的 UBI 文件系统,是成功启动了,但是存在一些疑问,望解答!

    内核的分区为八个分区,分别是 :

    static struct mtd_partition am335x_nand_partitions[] = {
    /* All the partition sizes are listed in terms of NAND block size */
    {
    .name = "SPL",
    .offset = 0, /* Offset = 0x0 */
    .size = SZ_128K,
    },
    {
    .name = "SPL.backup1",
    .offset = MTDPART_OFS_APPEND, /* Offset = 0x20000 */
    .size = SZ_128K,
    },
    {
    .name = "SPL.backup2",
    .offset = MTDPART_OFS_APPEND, /* Offset = 0x40000 */
    .size = SZ_128K,
    },
    {
    .name = "SPL.backup3",
    .offset = MTDPART_OFS_APPEND, /* Offset = 0x60000 */
    .size = SZ_128K,
    },
    {
    .name = "U-Boot",
    .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
    .size = 15 * SZ_128K,
    },
    {
    .name = "U-Boot Env",
    .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
    .size = 1 * SZ_128K,
    },
    {
    .name = "Kernel",
    .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
    .size = 40 * SZ_128K,
    },
    {
    .name = "File System",
    .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */
    .size = MTDPART_SIZ_FULL,
    },

    也就是 MTD7 为 File System,整个文件系统的空间大约是 1000MB 大小空间

    系统成功挂载 UBI 文件系统之后,查看分区 :

    cat /proc/mtd
    dev: size erasesize name
    mtd0: 00020000 00020000 "SPL"
    mtd1: 00020000 00020000 "SPL.backup1"
    mtd2: 00020000 00020000 "SPL.backup2"
    mtd3: 00020000 00020000 "SPL.backup3"
    mtd4: 001e0000 00020000 "U-Boot"
    mtd5: 00020000 00020000 "U-Boot Env"
    mtd6: 00500000 00020000 "Kernel"
    mtd7: 1f880000 00020000 "File System"
    mtd8: 1e349000 0001f000 "rootfs"

    变成了九个分区,在内核指定的 "File System"后面,又多了一个  "rootfs"。而且计算可以知道,  "rootfs" 大约从   "File System" 获得了一般的空间大小,大约为 483MB。

    这个是为什么呢?这种现象是正常的么?我应该如何去理解?还是说,我应该讲修改我的内核分区?

    下面是关于 UBI 启动的相关信息:

    UBI: max. sequence number: 0
    [ 4.544769] UBI: volume 1 ("rootfs") re-sized from 1652 to 3991 LEBs
    [ 4.551936] UBI: attached mtd7 to ubi0
    [ 4.555865] UBI: MTD device name: "File System"
    [ 4.561620] UBI: MTD device size: 504 MiB
    [ 4.566805] UBI: number of good PEBs: 4035
    [ 4.571726] UBI: number of bad PEBs: 1
    [ 4.576365] UBI: number of corrupted PEBs: 0
    [ 4.581012] UBI: max. allowed volumes: 128
    [ 4.585835] UBI: wear-leveling threshold: 4096
    [ 4.590753] UBI: number of internal volumes: 1
    [ 4.595393] UBI: number of user volumes: 1
    [ 4.600040] UBI: available PEBs: 0
    [ 4.604679] UBI: total number of reserved PEBs: 4035
    [ 4.609886] UBI: number of PEBs reserved for bad PEB handling: 40
    [ 4.616255] UBI: max/mean erase counter: 1/0
    [ 4.620720] UBI: image sequence number: 578192465
    [ 4.625815] UBI: background thread "ubi_bgt0d" started, PID 50

    [ 6.239973] UBIFS: start fixing up free space
    [ 53.458208] UBIFS: free space fixup complete
    [ 53.499746] UBIFS: mounted UBI device 0, volume 1, name "rootfs"
    [ 53.506046] UBIFS: file system size: 258523136 bytes (252464 KiB, 246 MiB, 2036 LEBs)
    [ 53.514442] UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
    [ 53.522094] UBIFS: media format: w4/r0 (latest is w4/r0)
    [ 53.528188] UBIFS: default compressor: lzo
    [ 53.532474] UBIFS: reserved for root: 0 bytes (0 KiB)

  • Andriod系统还是Linux系统?

  • 周工,我完全按照你的文档将arago-base-tisdk-image-am335x-evm.tar.xz解压到filesystem目录,然后按照如下指令进行编译:

    mkfs.ubifs –F -q -r filesystem/ -m 2048 -e 126976 -c 2047 -o ubifs.img
    ubinize -o ubi.img -m 2048 -p 128KiB ubinize.cfg

    ubinize.cfg内容如下:

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

    编译出来的ubi.img能正常加载,但是大小是120M,我看你上传的ubi.img才25.2M,我应该怎么做呢?是把解压出来的文件里删除不需要的东西来缩小么?

  • 这个文档主要是针对NAND FLASH写的,换做是是Nor FLASH,参数肯定是不一样的,也有可能用别的文件系统
  • 您好,最近我在用am5728   开发板装有一块nand芯片,型号如下:

    nand型号Micron MT29F4G08ABAEAWP

    nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224

    想要挂载ubifs文件系统。

    使用 的SDK版本:ti-processor-sdk-linux-am57xx-evm-03.03.00.04

    在交叉编译器中有mkfs.ubifs 和ubinize两个工具,

    请问还需要自己编译这两个工具吗?可以直接使用这两个工具吗?

    我使用交叉编译器中的这两个工具制作fs出现如下错误提示:

    mkfs.ubifs -F -r rootfs/ -m 4096 -e 253952 -c 1990 -o ubifs.img

    ubinize -o ubi.img -m 4096 -p 256KiB -s 1024 -O 4096 ubinize.cfg


    [ 95.892394] ubi0 warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 9, need 40
    [ 95.915595] ubi0: volume 0 ("rootfs") re-sized from 1987 to 1987 LEBs
    [ 95.922565] ubi0: attached mtd9 (name "rootfs", size 500 MiB)
    [ 95.928339] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
    [ 95.935271] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024
    [ 95.942105] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
    [ 95.949095] ubi0: good PEBs: 2000, bad PEBs: 0, corrupted PEBs: 0
    [ 95.955226] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    [ 95.962493] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1797935783
    [ 95.971674] ubi0: available PEBs: 0, total reserved PEBs: 2000, PEBs reserved for bad PEB handling: 9
    [ 95.980954] ubi0: background thread "ubi_bgt0d" started, PID 84

    然后是大量的

    [ 96.179156] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 4096 bytes from PEB 2:8192, read only 4096 bytes, retry
    [ 97.480220] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.486433] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.492661] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.498867] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.505135] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.511358] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.517564] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.523803] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.523814] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 4096 bytes from PEB 2:8192, read only 4096 bytes, retr

    ,,,

    [ 97.528398] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 86
    [ 97.529014] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.529019] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.529023] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.529027] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.529031] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.529034] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.529037] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.529040] omap2-nand 8000000.nand: uncorrectable bit-flips found
    [ 97.555250] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 253952 bytes from PEB 3:8192, read only 253952 bytes,




  • 你的问题解决了吗? 我遇到了跟你一样的错误

  • 我也被这个符号弄了好几天了,又查UBOOT又查内核的。
  • 请问下,我使用的sdk6.0的,现在制作UBI文件系统过程中,通过这个命令mkfs.ubifs -F -q -r /home/usr/fs -m 2048 -e 126976 -c 2047 -o ubifs.img ,会提示没有F的这个,我看里面的确实没有-F 只有-f , 这个跟我下载的 mkfs.ubifs这个命令有关么?

    期待的你的回复

  • 用sudo apt-get install mtd-utils 安装一下试试呢
  • 感谢你的回答!
    嗯嗯 好的,我在网上找了个教程是不用-F这个的,编译出来的文件系统烧写到nanflash中,第一次烧写进去文件系统是可以使用的,当我断电重启的时候再次加载时候就卡在Waiting for root device /dev/mmcblk0p2 这个提示下.
    你碰到这种问题么,ti论坛这边方法试了几个还是不行的,我使用的是sdk6.0的,内核是3.2的.
  • 以我调试的经验,通常您可以先把SDK里的.ubi文件直接烧写到你的NAND里面,看看正常不正常,如果不正常很可能您的系统配置会有一些问题。然后如果正常您先把这个ubi对应的压缩包解压后用你自己的工具进行压缩,如果这时候有问题大多数问题是制作UBI工具的问题或者是版本匹配或者是参数问题。这样排除就只能检查或者更换制作工具了。如果想通过一些打印信息能定位实际问题是比较耗时间的。

  • 感谢你的回复!

    嗯嗯,我把制作工具的版本换成了1.4.8的,然后从新生成文件系统文件,擦除下nandflash,重新烧写就可以的了.

    感谢!