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.

nand write.e 和nand write.yaffs的区别?

Other Parts Discussed in Thread: TVP5158

nand write.e 和nand write.yaffs有什么区别啊?

  • nand write:向Nand Flash写入数据,如果NandFlash相应的区域有坏块,则直接报错。
    nand write.e: 向Nand Flash写入数据减肥时会时行ECC校验,如果NandFlash相应的区域有坏块,可以跳过坏块。
    nand write.jffs2:向Nand Flash写入jffs2镜像到相应的分区。
    nand write.yaffs:同理,实现yaffs文件系统镜像的烧写,这个命令不一定所有版本的u-boot支持,有些版本可能需要自己手动添加

  • 能不能直接用nand write.e来烧写yaffs文件系统镜像呢?

  • 直接用nand write和nand write.e可能也可以烧写成功,但容易产生坏块,用nand write.yaffs烧写更好

  • 我昨天晚上用write.e烧写yaffs2文件系统映像到开发板中,出现了下面的错误:

    DM6467 EVM > boot

    NAND read: device 0 offset 0x500000, size 0x220000
    2228224 bytes read: OK
    ## Booting kernel from Legacy Image at 80700000 ...
    Image Name: Linux-2.6.32-rc2-davinci1-g73dbf
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2039444 Bytes = 1.9 MB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux.............................................................
    ....................................................................... done, bo
    oting the kernel.
    Linux version 2.6.32-rc2-davinci1-g73dbf71-dirty (root@bbs) (gcc version 4.2.0 (
    MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #14 PREEMPT Wed Jun 11 09:40:09 CS
    T 2014
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: DaVinci DM646x EVM
    Memory policy: ECC disabled, Data cache writeback
    DaVinci dm6467_rev3.x variant 0x1
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
    Kernel command line: noinitrd root=/dev/mtdblock3 rw rootfstype=yaffs2 init=/li
    nuxrc console=ttyS0,115200
    PID hash table entries: 512 (order: -1, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 128MB = 128MB total
    Memory: 125496KB available (3808K code, 329K data, 136K init, 0K highmem)
    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 249.03 BogoMIPS (lpj=1245184)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    DaVinci: 43 gpio irqs
    NET: Registered protocol family 16
    MUX: Setting register STSOMUX_DISABLE
    PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
    MUX: Setting register STSIMUX_DISABLE
    PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
    MUX: Setting register PTSOMUX_DISABLE
    PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
    MUX: Setting register PTSIMUX_DISABLE
    PINMUX0 (0x00000000) = 0x00000000 -> 0x00000000
    MUX: initialized CIR_UART2
    MUX: Setting register CIR_UART2
    PINMUX1 (0x00000004) = 0x00000000 -> 0x00000020
    MUX: initialized UART0_GPIO_36_37_38_8
    MUX: Setting register UART0_GPIO_36_37_38_8
    PINMUX1 (0x00000004) = 0x00000020 -> 0x00000021
    MUX: initialized UART1_GPIO_25_26
    MUX: Setting register UART1_GPIO_25_26
    PINMUX1 (0x00000004) = 0x00000021 -> 0x00000025
    MUX: initialized UART2_GPIO_39_40_41_42
    MUX: Setting register UART2_GPIO_39_40_41_42
    PINMUX1 (0x00000004) = 0x00000025 -> 0x00000035
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    vpif vpif: vpif probe success
    Switching to clocksource timer0_1
    musb_hdrc: version 6.0, cppi-dma, host, debug=0
    musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 13
    musb_hdrc musb_hdrc: MUSB HDRC host driver
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    yaffs Jun 4 2014 09:57:36 Installing.
    Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
    JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
    msgmni has been set to 245
    io scheduler noop registered
    io scheduler anticipatory registered (default)
    DMA: DMA_devInit()
    DMA:install success, major num = 252
    CIR device registered successfully (Major = 251, Minor =
    0)
    [XKL_GPIO_DRIVER]:dm6467_gpio initialized
    Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a ST16654
    console [ttyS0] enabled
    serial8250.0: ttyS1 at MMIO 0x1c20400 (irq = 41) is a ST16650V2
    serial8250 serial8250.0: unable to register port at index 2 (IO0 MEM1c20800 IRQ4
    2): -22
    brd: module loaded
    loop: module loaded
    at24 1-0050: 32768 byte 24c256 EEPROM (writable)
    NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
    )
    Scanning device for bad blocks
    Bad eraseblock 252 at 0x0000003f0000
    Bad eraseblock 256 at 0x000000400000
    Bad eraseblock 260 at 0x000000410000
    Creating 4 MTD partitions on "davinci_nand.0":
    0x000000000000-0x000000020000 : "params"
    mtd: Giving out device 0 to params
    0x000000020000-0x000000160000 : "bootloader"
    mtd: Giving out device 1 to bootloader
    0x000000500000-0x000000900000 : "kernel"
    mtd: Giving out device 2 to kernel
    0x000000900000-0x000004000000 : "filesystem"
    mtd: Giving out device 3 to filesystem
    davinci_nand davinci_nand.0: controller rev. 2.2
    spi_davinci spi_davinci.0: DaVinci SPI driver in EDMA mode
    Using RX channel = 17 , TX channel = 16 and event queue = 3
    at25 spi0.0: 32 KByte at25640a eeprom, pagesize 64
    spi_davinci spi_davinci.0: Controller at 0xfec66800
    PPP generic driver version 2.4.2
    PPP Deflate Compression module registered
    tun: Universal TUN/TAP device driver, 1.6
    tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
    dm9000 Ethernet Driver, V1.31
    console [netcon0] enabled
    netconsole: network logging started
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new interface driver usbtest
    mice: PS/2 mouse device common for all mice
    rtc-pcf8563 1-0051: chip found, driver version 0.4.3
    rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc0
    i2c /dev entries driver
    Linux video capture interface: v2.00
    cs4954 1-0000: chip found @ 0x0 (DaVinci I2C adapter)
    tvp5158 1-005e: [tvp5158 probe]: chip found @ 0xbc (DaVinci I2C adapter)
    tvp5158_checkChip ok!
    Patch is downloading...
    Patch is downloaded. Soft reset!
    using default mode PAL!
    tvp5158_initVideoMode successfully!
    tvp5158_initAudioMode devId=0 successfully!
    vpif_capture vpif_capture: registered sub device tvp5158-0
    tvp5158 1-005f: [tvp5158 probe]: chip found @ 0xbe (DaVinci I2C adapter)
    tvp5158_checkChip ok!
    Patch is downloading...
    Patch is downloaded. Soft reset!
    using default mode PAL!
    tvp5158_initVideoMode successfully!
    tvp5158_initAudioMode devId=1 successfully!
    vpif_capture vpif_capture: registered sub device tvp5158-1
    vpif_capture vpif_capture: DM646x VPIF Capture driver initialized
    watchdog watchdog: heartbeat 60 sec
    Advanced Linux Sound Architecture Driver Version 1.0.21.
    [coolen_debug](cs4341_i2c_probe).
    [coolen_debug](cs4341_register).
    [coolen_debug](davinci_mcasp_probe): txnumevt = 0.rxnumevt=0
    [coolen_debug](davinci_mcasp_probe): playbackCH = 6.
    [coolen_debug](davinci_mcasp_probe): captureCH = 9.
    [coolen_debug](davinci_mcasp_probe): txnumevt = 0.rxnumevt=0
    [coolen_debug](davinci_mcasp_probe): playbackCH = 12.
    [coolen_debug](davinci_mcasp_probe): captureCH = -1.
    [coolen_debug](cs4341_probe).
    [coolen_debug](cs4341_init):gpioRet = 0.gpio value 2
    [coolen_debug](cs4341_init): cs4341 regList:

    CS4341_REG_MODE:0
    CS4341_REG_MCLKDIV:0
    CS4341_REG_TMIX:8c
    CS4341_REG_AVOLUME:0
    CS4341_REG_BVOLUME:0
    asoc: cs4341 <-> davinci-i2s mapping ok
    [coolen_debug](evm_cs4341_init).
    ALSA device list:
    #0: DaVinci DM6467 EVM (cs4341)
    TCP cubic registered
    NET: Registered protocol family 17
    Clocks: disable unused emac
    Clocks: disable unused timer1
    davinci_emac_probe: using random MAC addr: 1a:77:de:0c:50:9c
    emac-mii: probed
    rtc-pcf8563 1-0051: low voltage detected, date/time is not reliable.
    rtc-pcf8563 1-0051: retrieved date/time is not valid.
    rtc-pcf8563 1-0051: hctosys: invalid date/time
    yaffs: dev is 32505859 name is "mtdblock3"
    yaffs: passed flags ""
    yaffs: Attempting MTD mount on 31.3, "mtdblock3"
    yaffs: auto selecting yaffs1
    yaffs_read_super: isCheckpointed 0
    VFS: Mounted root (yaffs2 filesystem) on device 31:3.
    Freeing init memory: 136K
    Warning: unable to open an initial console.
    Failed to execute /linuxrc. Attempting defaults...
    Kernel panic - not syncing: No init found. Try passing init= option to kernel.
    Backtrace:
    [<c002e6d0>] (dump_backtrace+0x0/0x110) from [<c002e814>] (dump_stack+0x18/0x1c)

    r6:00000000 r5:c002560c r4:c0409450
    [<c002e7fc>] (dump_stack+0x0/0x1c) from [<c0040164>] (panic+0x54/0x124)
    [<c0040110>] (panic+0x0/0x124) from [<c002a578>] (init_post+0xd4/0xfc)
    r3:c6103f00 r2:c03e4520 r1:000000c0 r0:c038390c
    [<c002a4a4>] (init_post+0x0/0xfc) from [<c00087cc>] (kernel_init+0xe0/0x110)
    r4:c0408d00
    [<c00086ec>] (kernel_init+0x0/0x110) from [<c0043240>] (do_exit+0x0/0x654)
    r5:00000000 r4:00000000

    请问一下,这是因为烧写命令的原因,还是根文件系统本身的原因啊?

  • 一般可能是这两种情况:

    1.需要使用nand write.yaffs命令烧写

    2.mkyaffs2image工具或者制作时的参数为问题

    可以先增加u-boot对nand write.yaffs的支持,这个网上的资料很多,如果还有错误,再检查工具。

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

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