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.

failed to boot jffs2-filesystem from nand flash in TMS320DM8168

Other Parts Discussed in Thread: PMP, TMS320DM8168

hi

I have two questions here 

first is about TI81XX_PSP_U-boot.pdf, the chapter about creating JFFS2 File-system said:(refer flash layout for individual flash devices and partition creation order for exact number. Use 'cat /proc/partitions' at Linux prompt for the list of partitions)

I can figure out how to get the exact number of the partition. And the command as "cat /proc/partitions" ,i do not know where to use. it can not be used in u-boot.

second problem is that when i flash u-boot and kernel and fs all to nand, but when set the bootargs and bootcmd as below. it didn't come up.

bootargs=console=ttyO2,115200n8 root=/dev/mtdblock 7 rw rootfstype=jffs2 mem=100M earlyprintk

setenv bootargs 'console=ttyO2,115200n8 root=/dev/mtdblock 7 rw rootfstype=jffs2 mem=100M earlyprintk ip=none'

the following the last info when boot failed.

ALSA device list:
#0: TI81XX EVM
#1: TI81XX EVM (HDMI)
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_voltage_late_init: Voltage driver support not added
Power Management for TI81XX.
smartreflex-ti816x: ti816x_sr_probe done!
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
usb 2-1: new high speed USB device using musb-hdrc and address 2
usb 2-1: New USB device found, idVendor=0424, idProduct=2512
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
hub 2-1:1.0: USB hub found
hub 2-1:1.0: 2 ports detected
mmc0: error -110 whilst initialising SD card
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link down (SStatus 0 SControl 300)
Root-NFS: no NFS server address
VFS: Unable to mount root fs via NFS, trying floppy.
List of all partitions:
1f00 131072 mtdblock0 (driver?)
1f01 2432 mtdblock1 (driver?)
1f02 128 mtdblock2 (driver?)
1f03 3072 mtdblock3 (driver?)
1f04 4352 mtdblock4 (driver?)
1f05 514304 mtdblock5 (driver?)
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Backtrace:
[<c0048b90>] (dump_backtrace+0x0/0x110) from [<c0376580>] (dump_stack+0x18/0x1c)
r7:c2c15000 r6:c006dac0 r5:c002db04 r4:c04e6b90
[<c0376568>] (dump_stack+0x0/0x1c) from [<c03765e4>] (panic+0x60/0x17c)
[<c0376584>] (panic+0x0/0x17c) from [<c0009254>] (mount_block_root+0x1e0/0x220)
r3:00000000 r2:00000020 r1:c2c25f58 r0:c0427eac
[<c0009074>] (mount_block_root+0x0/0x220) from [<c0009340>] (mount_root+0xac/0xcc)
[<c0009294>] (mount_root+0x0/0xcc) from [<c00094d0>] (prepare_namespace+0x170/0x1d4)
r4:c04e6464
[<c0009360>] (prepare_namespace+0x0/0x1d4) from [<c0008784>] (kernel_init+0x114/0x154)
r5:c0008670 r4:c04e6400
[<c0008670>] (kernel_init+0x0/0x154) from [<c006dac0>] (do_exit+0x0/0x5e4)
r5:c0008670 r4:00000000

so who can help me find the problem? thank you all very much.

  • Hi Fire Lord,

    Fire Lord said:

    first is about TI81XX_PSP_U-boot.pdf, the chapter about creating JFFS2 File-system said:(refer flash layout for individual flash devices and partition creation order for exact number. Use 'cat /proc/partitions' at Linux prompt for the list of partitions)

    I can figure out how to get the exact number of the partition. And the command as "cat /proc/partitions" ,i do not know where to use. it can not be used in u-boot.

    It state to use this command at Linux prompt, not in u-boot. In the default NAND layout, the jffs2 rootfs should be flashed at /dev/mtdblock7 if both SPI and NAND are enabled and in /dev/mtdblock3 if SPI is disabled and only NAND is enabled. You can get more info from the below pointers:

    linux-kernel/arch/arm/mach-omap2/board-ti8168evm.c

    Fire Lord said:
    setenv bootargs 'console=ttyO2,115200n8 root=/dev/mtdblock 7 rw rootfstype=jffs2 mem=100M earlyprintk ip=none'

    This should be root=/dev/mtdblock7 (not root=/dev/mtdblock 7)

    Can you also provide the whole boot up log, not just part of it.

    Regards,
    Pavel

  • Thank for your reply!

    first about the 'cat' command, if I use it at linux prompt, how can I see the exact number of my nand flash partitions? At Linux prompt, I used the command and just see the partitions at my Linux operation system not on the board, as flollows:

    /************************************************
    firelord@ubuntu:~$ cat /proc/partitions
    major minor #blocks name

    8 0 488386584 sda
    8 1 483190784 sda1
    8 2 1 sda2
    8 5 5193728 sda5
    8 48 7577600 sdd
    8 49 7577588 sdd1
    ***************************************************/

    secondly, I will provide the whole boot log below: it is a little long!

    /**********************************************************
    U-Boot 2010.06 (Jan 04 2015 - 16:03:58)

    TI8168-GP rev 2.1

    ARM clk: 987MHz
    DDR clk: 796MHz

    I2C: ready
    DRAM: 2 GiB
    NAND: HW ECC BCH8 Selected
    512 MiB
    MMC: OMAP SD/MMC: 0
    :,;;:;:;;;;;;;;r;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:,;;:;:;;;;;;;;:;;;;;;;;:,;;:;:
    ;,;:::;;;;r;;;rssiSiS552X5252525259GX2X9hX9X9XX2325S55252i5:,;;:;:;;;;;;;;:,;;:
    ;:;;;;;;;rrssSsS52S22h52299GGAAMHMM#BBH#B#HMM#HMBA&&XX2255S2S5Si:,;;:;:;;;;;;;;
    ;:;;r;;rsrrriiXS5S329&A&MH#BMB#A&9XXA252GXiSXX39AAMMMBB&G22S5i2SSiiiisi:,;;:;:;
    ;;;;;r;rr2iisiih393HB#B#AA99i22irrrX3X52AGsisss2Xii2299HBMA&X2S5S5iSiisSsi:,;;:
    r:r;rrsrsihXSi2&##MHB&Ahh3AGHGA9G9h&#H##@@@##MAMMXXX9SSS29&&HGGX2i5iisiiisisi:,
    ;;rrrrsSiiiA&ABH&A9GAGhAhBAMHA9HM@@@@@@@@@@@@@@@@@@@HHhAh2S2SX9&Gh22SSiisiiisii
    r:rrssisiS2XM##&h3AGAX&3GG3Ssr5H@M#HM2; ;2X&&&MHMB###GBB#B&XXSSs529XX55iSsisisi
    r;rsrisSi2XHAhX99A3XXG&&XS;:,rH#HGhAS @@@@3rs2XBM@@A552&&AHA2XiisSS252SSsisSs
    r;issi5S22&&3iSSX292&hXsr;;:;h@&G339&S9@@@@2@MA&9&HB##Xris29ABMAAX2ir;rsSi5iss5
    rrsSi2XhG&9GXh399&X99i;;;;;;r#H&293H9X#@@@@@@@B&9GhAH@XrrsrsiXABHB&HG2rr;rrSiSi
    ;:rsisS599&AA9XG&3A35r;:::;,;BMh&&2iX5A@@@@@@@&392X5GB2;;;r;iSX393A##A&Xi:::rsi
    ;:rss552222X553&XHMhir;;::,:,h#HhGSXhG3#@@@@#AXXS2XAHA;::;;;;ss55XShBA3239r:,;;
    r;ii2S5SSi2i53hirsh2srr::,,,,;MMXX359&Ah3h&Si59SX99A#i:,::::;;sri2,.2r;:SGAr;,:
    ;:;rrrrssiriXGSi::shs;;;,,,:,,rBBA9h5s5h5iS5isi2SAHB5:,,,:::;rrs5&SrisSX5Srrr:,
    ;,r;;;;rsriSSrrrr;;5Xrr;;,:,,.,;9AA2SsisS5323XXXG9&i:.,,::;;r;;;srrrrrr;;:;::::
    :,;r;r;rrissrrr;:;::;s;;;;,:,,..,r293h222hXXAAGGGX;:,,,:,:,::;:;::,:,,,,...,,,,
    ;,;;;;rrrrrrrrirr;,.,,:::::::,,,,.,;SX&ABAB2hhXir:,,.,,.,,:,,,,..,,,..,..,,,..:
    :.:;:;;;:;;;;r;rrs;:.. ,,:::::,:,:,,.::rrsrr;;,,.......,..,....,,,,,,,...,.,,:,
    :.:::,::::::;;r;rrr;:.......,.,.,,:::,,...............,,::.,,,,:,::,,:,:,,,:,;:
    ,.::,:,,,,,;;;;;;;;r;;::,..............................;;;:;::::,:::::::,:,:,,,
    : ,,:,,,,,,,,,,,,,:;rrr;;:;,,,,,,,::,.,.:.,.,;s,:;;;;:;:;;;;;::::,:::,:::,:,:,:
    ,.,,,,,,,...,,.,,....................................:,............:,,,:,:,,,,,

    Net: Detected MACID:7c:66:9d:6e:23:84
    Ethernet PHY: GENERIC @ 0x01
    DaVinci EMAC
    Hit any key to stop autoboot: 0

    NAND read: device 0 offset 0x280000, size 0x440000
    4456448 bytes read: OK
    ## Booting kernel from Legacy Image at 81000000 ...
    Image Name: Linux-2.6.37
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 2440076 Bytes = 2.3 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.37 (root@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Mon Mar 7 16:39:59 CST 2016
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: ti8168evm
    bootconsole [earlycon0] enabled
    reserved size = 52428800 at 0x0
    FB: Reserving 52428800 bytes SDRAM for VRAM
    Memory policy: ECC disabled, Data cache writeback
    OMAP chip is TI8168 2.0
    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 12600
    Kernel command line: console=ttyO2,115200n8 root=/dev/mtdblock 7 rw rootfstype=jffs2 mem=100M earlyprintk ip=none noinitrd
    PID hash table entries: 256 (order: -2, 1024 bytes)
    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Memory: 50MB = 50MB total
    Memory: 45040k/45040k available, 57360k reserved, 0K highmem
    Virtual kernel memory layout:
    vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
    vmalloc : 0xc6800000 - 0xf8000000 ( 792 MB)
    lowmem : 0xc0000000 - 0xc6400000 ( 100 MB)
    modules : 0xbf000000 - 0xc0000000 ( 16 MB)
    .init : 0xc0008000 - 0xc003a000 ( 200 kB)
    .text : 0xc003a000 - 0xc04a1000 (4508 kB)
    .data : 0xc04a2000 - 0xc04e6400 ( 273 kB)
    SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    NR_IRQS:375
    IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    Total of 128 interrupts on 1 active controller
    GPMC revision 6.0
    Trying to install interrupt handler for IRQ368
    Trying to install interrupt handler for IRQ369
    Trying to install interrupt handler for IRQ370
    Trying to install interrupt handler for IRQ371
    Trying to install interrupt handler for IRQ372
    Trying to install interrupt handler for IRQ373
    Trying to install interrupt handler for IRQ374
    Trying to install type control for IRQ375
    Trying to set irq flags for IRQ375
    OMAP clockevent source: GPTIMER1 at 27000000 Hz
    Console: colour dummy device 80x30
    Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)
    pid_max: default: 32768 minimum: 301
    Security Framework initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    devtmpfs: initialized
    omap_voltage_early_init: voltage driver support not added
    regulator: core version 0.5
    regulator: dummy:
    NET: Registered protocol family 16
    OMAP GPIO hardware version 0.1
    OMAP GPIO hardware version 0.1
    omap_mux_init: Add partition: #1: core, flags: 0
    _omap_mux_get_by_name: Could not find signal i2c2_scl.i2c2_scl
    _omap_mux_get_by_name: Could not find signal i2c2_sda.i2c2_sda
    registered ti816x_vpss device
    registered ti816x_gpio_vr device
    registered TI816x on-chip HDMI device
    registered ti816x_sr device
    registered ti81xx_vidout device
    pm_dbg_init: only OMAP3 supported
    bio: create slab <bio-0> at 0
    regulator: VFB: 800 <--> 1025 mV at 800 mV
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    registerd cppi-dma Intr @ IRQ 17
    Cppi41 Init Done
    omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
    omap_i2c omap_i2c.2: bus 2 rev4.0 at 100 kHz
    Advanced Linux Sound Architecture Driver Version 1.0.23.
    Switching to clocksource gp timer
    musb-hdrc: version 6.0, host, debug=0
    musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: MUSB HDRC host driver
    usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
    usb usb1: SerialNumber: musb-hdrc.0
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.0: USB Host mode controller at c681e000 using DMA, IRQ 18
    musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: MUSB HDRC host driver
    usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
    usb usb2: SerialNumber: musb-hdrc.1
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.1: USB Host mode controller at c6828800 using DMA, IRQ 19
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 2048 (order: 2, 16384 bytes)
    TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    TCP: Hash tables configured (established 2048 bind 2048)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    NetWinder Floating Point Emulator V0.97 (double precision)
    PMU: registered new PMU device of type 0
    omap-iommu omap-iommu.0: ducati registered
    omap-iommu omap-iommu.1: sys registered
    JFFS2 version 2.2. (NAND) (SUMMARY) ? 2001-2006 Red Hat, Inc.
    fuse init (API version 7.15)
    msgmni has been set to 87
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    seed_gpio major#: 253, minor#: 0
    Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
    omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    console [ttyO2] enabled, bootconsole disabled
    console [ttyO2] enabled, bootconsole disabled
    brd: module loaded
    loop: module loaded
    ahci ahci.0: forcing PORTS_IMPL to 0x3
    ahci ahci.0: AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl platform mode
    ahci ahci.0: flags: ncq sntf pm led clo only pmp pio slum part ccc
    scsi0 : ahci_platform
    scsi1 : ahci_platform
    ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x100 irq 16
    ata2: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x180 irq 16
    [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0
    NAND device: Maf ID: 0x98, Chip ID: 0x39 (Toshiba, )
    erasesize: 0x4000, writesize: 512, oobsize: 16
    flash size: 128 MiB
    page size: 512 bytes
    OOB area size: 16 bytes
    sector size: 16 KiB
    pages number: 262144
    pages per sector: 32
    bus width: 8
    bits in sector size: 14
    bits in page size: 9
    bits in OOB size: 4
    flash size with OOB: 135168 KiB
    page address bytes: 4
    sector address bytes: 3
    options: 0x62
    Scanning device for bad blocks
    Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit":
    0x000000000000-0x000008000000 : "NAND simulator partition 0"
    mtd: Giving out device 0 to NAND simulator partition 0
    omap2-nand driver initializing
    ONFI flash detected
    NAND device: Maf ID: 0x2c, Chip ID: 0xcc (Micron, )
    erasesize: 0x20000, writesize: 2048, oobsize: 64
    Creating 5 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000260000 : "U-Boot"
    mtd: Giving out device 1 to U-Boot
    0x000000260000-0x000000280000 : "U-Boot Env"
    mtd: Giving out device 2 to U-Boot Env
    0x000000280000-0x000000580000 : "U-Boot Logo"
    mtd: Giving out device 3 to U-Boot Logo
    0x000000580000-0x0000009c0000 : "Kernel"
    mtd: Giving out device 4 to Kernel
    0x0000009c0000-0x000020000000 : "File System"
    mtd: Giving out device 5 to File System
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    davinci_mdio davinci_mdio.0: detected phy mask fffffffd
    davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
    usbcore: registered new interface driver cdc_ether
    usbcore: registered new interface driver dm9601
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    mice: PS/2 mouse device common for all mice
    omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
    i2c /dev entries driver
    Linux video capture interface: v2.00
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (v1.0.0)
    OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    usbcore: registered new interface driver snd-usb-audio
    asoc: tvp5158-hifi <-> davinci-mcasp.0 mapping ok
    asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
    asoc: SII9022a-hdmi-codec <-> davinci-mcasp.1 mapping ok
    asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok
    ALSA device list:
    #0: TI81XX EVM
    #1: TI81XX EVM (HDMI)
    TCP cubic registered
    NET: Registered protocol family 17
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    omap_voltage_late_init: Voltage driver support not added
    Power Management for TI81XX.
    smartreflex-ti816x: ti816x_sr_probe done!
    omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
    usb 2-1: new high speed USB device using musb-hdrc and address 2
    usb 2-1: New USB device found, idVendor=0424, idProduct=2512
    usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    hub 2-1:1.0: USB hub found
    hub 2-1:1.0: 2 ports detected
    mmc0: error -110 whilst initialising SD card
    ata1: SATA link down (SStatus 0 SControl 300)
    ata2: SATA link down (SStatus 0 SControl 300)
    Root-NFS: no NFS server address
    VFS: Unable to mount root fs via NFS, trying floppy.
    List of all partitions:
    1f00 131072 mtdblock0 (driver?)
    1f01 2432 mtdblock1 (driver?)
    1f02 128 mtdblock2 (driver?)
    1f03 3072 mtdblock3 (driver?)
    1f04 4352 mtdblock4 (driver?)
    1f05 514304 mtdblock5 (driver?)
    No filesystem could mount root, tried: jffs2
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
    Backtrace:
    [<c0048b90>] (dump_backtrace+0x0/0x110) from [<c0376580>] (dump_stack+0x18/0x1c)
    r7:c2c15000 r6:c006dac0 r5:c002db04 r4:c04e6b90
    [<c0376568>] (dump_stack+0x0/0x1c) from [<c03765e4>] (panic+0x60/0x17c)
    [<c0376584>] (panic+0x0/0x17c) from [<c0009254>] (mount_block_root+0x1e0/0x220)
    r3:00000000 r2:00000020 r1:c2c25f58 r0:c0427eac
    [<c0009074>] (mount_block_root+0x0/0x220) from [<c0009340>] (mount_root+0xac/0xcc)
    [<c0009294>] (mount_root+0x0/0xcc) from [<c00094d0>] (prepare_namespace+0x170/0x1d4)
    r4:c04e6464
    [<c0009360>] (prepare_namespace+0x0/0x1d4) from [<c0008784>] (kernel_init+0x114/0x154)
    r5:c0008670 r4:c04e6400
    [<c0008670>] (kernel_init+0x0/0x154) from [<c006dac0>] (do_exit+0x0/0x5e4)
    r5:c0008670 r4:00000000
    *************************************************************/
  • Fire Lord said:
    first about the 'cat' command, if I use it at linux prompt

    Not host machine (i.e. Desktop PC) linux prompt, but your target DM816x based board linux prompt. You will need to load the rootfs from other media first (not NAND), like SD card, NOR, SPI, NFS, PCIe.

    Fire Lord said:
    I will provide the whole boot log below: it is a little long!

    You can put it in txt file, and attach the text file.

    Fire Lord said:
    Kernel command line: console=ttyO2,115200n8 root=/dev/mtdblock 7 rw rootfstype=jffs2 mem=100M earlyprintk ip=none noinitrd

    Still the same error.

    Fire Lord said:
    0x0000009c0000-0x000020000000 : "File System"
    mtd: Giving out device 5 to File System

    From your log, it seems you should use root=/dev/mtdblock5 (not /dev/mtdblock 7, /dev/mtdblock 5, /dev/mtdblock7)

    Are you using 8-bit NAND? Are you using DM816x TI EVM or custom board? Are you using EZSDK or DVRRDK or else?


    Regards,
    Pavel

  • Thank you!

    I have solve some problem with your help. Now I will go and have a try.

    I am using a 16-bit Nand named 'MT29F4G16ABADAWP'. My team made a board based on TMS320DM8168, it is similar with the EVM. So i use EZSDK as a reference and template to develope my own board.

    indeed, thank you, I will try again.
  • Hi

    Sorry to disturb you again.

     I use the way you tell me to change my env and have a try. But I get a new problem. Following is the boot log file.

    2273.boot-log.txt

  • another question about the boot ENV to ask you:
    I get the SD boot env from the 81XX user guider is like below:
    setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk0p2 mem=128M rootwait'
    setenv bootcmd 'mmc rescan 0; fatload mmc 0 0x81000000 uImage; bootm 0x81000000' boot

    But it did not work, So one teammate get a new env which works but we all do not know why? here is the is env:
    setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw mem=364M@0x80000000 mem=320M@0x9FC00000 vmalloc=500M notify.vpssm3_sva=0xBF900000 ip=172.168.10.19::172.168.10.1:255.255.255.0::eth0:off rootwait '
    setenv bootcmd 'mmc rescan 0;fatload mmc 0 0x81000000 uImage;bootm 0x81000000'
    ----can you explain this for me?

    So i think my env is not right so i can not boot my board from the NAND flash.
  • Fire Lord said:
    I am using a 16-bit Nand named 'MT29F4G16ABADAWP'.

    Note that for 16-bit NAND, CS0BW signal (physical pin AD4, register PINCTRL229) should be 1. For PG2.x devices (like the one you have) the ROM code detect NAND bus width and configure it properly. But make sure your own code does not overwrite this setting afterwards. Make sure bit CONTROL_STATUS[16] BW is aways 1.

    Fire Lord said:
    So i use EZSDK as a reference and template to develope my own board.

    Which version of the EZSDK? Is it 5.05.02.00?

    Note also that for JFFS2 you should use 1-bit Hamming HW ECC (not 8-bit HW ECC BCH8) because of shortage of OOB area.

    Note also that usage of UBIFS file system is recommended. UBIFS file system is recommended for NAND File system over JFFS2 as it is seen as JFFS2 successor with significant improvements in scalability and NAND support.

    Regards,
    Pavel

  • Fire Lord said:

     I use the way you tell me to change my env and have a try. But I get a new problem. Following is the boot log file.

    (Please visit the site to view this file)

    I see your custom Linux kernel configure NAND for 8-bit:

    bus width: 8

    Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit":

    But you have 16-bit NAND. You will need to fix this first.

    Regards,
    Pavel

  • Fire Lord said:
    I get the SD boot env from the 81XX user guider is like below:
    setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk0p2 mem=128M rootwait'
    setenv bootcmd 'mmc rescan 0; fatload mmc 0 0x81000000 uImage; bootm 0x81000000' boot

    But it did not work

    Do you test with SD card? Can you provide me the full boot up log? Note that we have a script which should be used to create bootable SD card.

    ti-ezsdk_dm816x-evm_5_05_02_00/bin/mksdboot.sh

    The instructions about how to use this script you can find in the SW guide:

    ti-ezsdk_dm816x-evm_5_05_02_00/docs/DM816x_EZ_Software_Developers_Guide.pdf

    6.7 How to create an SD card

    The mksdboot.sh script will fill up your SD card with pre-built MLO, u-boot.bin and uImage. You can replace these with your own and boot the board.


    Regards,
    Pavel

  • hi pavel,

    1.I checked on my board, the AD4(CS0BW) is made 1 by hardware.

    2.you said the Nand ROM will auto detect the bus width and configure it properly. But we saw it was 8 bit in boot log, so it must be overwrote in u-boot or kernel. But now I can not find where to change it? so can you expain it for me?

    3.And can you show me where to modify CONTROL_STATUS[16] BW? I can not find where is it So I can not make sure if it's 1 or not.

    4.I use the version of EZSDK is 5.05.05.00. And i have tried UBIFS, which makes heavier problem. when I flash the modified u-boot kernel and fs to the nand, when i boot the system, I can not see anything from the UART. what's worse, my board do not have swith to change the boot ways from SD to NAND. So i weld the board to change the resistence, then boot from SD card and erase the Nand. So now I do not want to try UBIFS because of the terrible memory.

    5.I know that JFFS2 should use HW ECC. But before u-boot come up, we could see the words "NAND: HW ECC BCH8 Selected".So I tried to change like this "nandecc hw 0;nand read 0x81000000 0x00280000 0x440000;bootm 0x81000000"" ,Is it work?

  • Fire Lord said:
    2.you said the Nand ROM will auto detect the bus width and configure it properly. But we saw it was 8 bit in boot log, so it must be overwrote in u-boot or kernel. But now I can not find where to change it? so can you expain it for me?

    The default EZSDK u-boot and kernel does not overwrite this setting. Your own modifications should do this. So what I can recommend is to check your own modifications. You can also try with the default u-boot and kernel to see that these do not overwrite the correct setting.

    Fire Lord said:
    3.And can you show me where to modify CONTROL_STATUS[16] BW? I can not find where is it So I can not make sure if it's 1 or not.

    As being status register, it is read only, you can not modify. Its address is 0x48140040. You can check it for the correct value, but can not modify.

    Fire Lord said:
    5.I know that JFFS2 should use HW ECC. But before u-boot come up, we could see the words "NAND: HW ECC BCH8 Selected".So I tried to change like this "nandecc hw 0;nand read 0x81000000 0x00280000 0x440000;bootm 0x81000000"" ,Is it work?

    If everything else is fine, this should work. See also the below pointers:

    Regards,
    Pavel

  • hi pavel,

    i have tried many ways to find if the bus width of nand was changed. But they all didn't work. Actually, I never change u-boot or kernle to modify the bus width of Nand. And i rememberd that you told me the default set in ezsdk wouldn't overwrite the setting. So what else would made this problem happen?

    what's more, I tried to use default pre-built images for checking if they would overwrite the settings. But i can not see the follonwing settings in my boot log.

    /*************************************************************

    flash size: 128 MiB
    page size: 512 bytes
    OOB area size: 16 bytes
    sector size: 16 KiB
    pages number: 262144
    pages per sector: 32
    bus width: 8
    bits in sector size: 14
    bits in page size: 9
    bits in OOB size: 4
    flash size with OOB: 135168 KiB
    page address bytes: 4
    sector address bytes: 3
    options: 0x62

    ************************************************************************/

    here is the boot_log,and have a new problem about "hub 1-0:1.0: over-current change on port 1" come out.

    3005.use the default pre-built images_boot log.txt

    I have read the pointers you give me about "booting from Nand flash memory". I found that the evm has the switchs called '' S1.8", But my board didn't make that switchs. So what's the names of ports? I want to find them in my board. So can you point the names for me.

  • Fire Lord said:
    Actually, I never change u-boot or kernle to modify the bus width of Nand.

    I suspect you (or someone from your team) change u-boot/kernel for something else, and incidentally change this also.

    Fire Lord said:
    And i rememberd that you told me the default set in ezsdk wouldn't overwrite the setting.

    Yes, I test the default EZSDK 5.05.02.00 u-boot and kernel with the DM816x TI EVM (which come with 16-bit NAND MT29F2G16AADWP), and it works fine, u-boot/kernel does not change NAND bus width to 8-bit. Also we have SW3 which controls CS0BW, and it has to be set to 1.

    Also in DM816x TRM we have:

    25.7.3 NAND
    NOTE: For PG2.x devices, CS0BW is not needed for NAND boot. The boot ROM detects the size of the NAND device and configures itself appropriately.

    Fire Lord said:
    So what else would made this problem happen?

    Can you provide me the exact commands you are using to build your u-boot for NAND? If you build u-boot for PCIe boot, there might be some conflict, see the wiki below:

    We can first test u-boot. When I boot DM816x TI EVM from 16-bit NAND with CS0BW=1 I have:

    NAND:  HW ECC BCH8 Selected
    256 MiB

    TI8168_EVM#md 0x48140040 1
    48140040: 00010312    ....
    TI8168_EVM#md 0x48140B90 1
    48140b90: 00000008    ....

    When I boot DM816x TI EVM from 16-bit NAND with CS0BW=0 I have:

    NAND:  HW ECC BCH8 Selected
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
    NAND bus width 8 instead 16 bit
    No NAND device found!!!
    0 MiB

    TI8168_EVM#md 0x48140040 1
    48140040: 00000312    ....
    TI8168_EVM#md 0x48140B90 1
    48140b90: 00000008    ....

    Can you control the CS0BW pin with hardware switch in your custom board, like in the DM816x TI EVM? Can you also provide the values of  0x48140040 register
    with the u-boot md command?

    Fire Lord said:
    I tried to use default pre-built images for checking if they would overwrite the settings. But i can not see the follonwing settings in my boot log.

    I think this proves your own u-boot/kernel overwrite the correct settings.

    Fire Lord said:
    have a new problem about "hub 1-0:1.0: over-current change on port 1" come out.

    This is not related to NAND bus width.

    Regards,
    Pavel

  • hi pavel,

    I have refer to " evm816x_Schematics_RevE.pdf", and find taht the nand in evm is "MT29F2G16AADWP".So I am much more confused about the bus width. How can it be 8-bit in my boot log?

  • Fire Lord said:
    I have refer to " evm816x_Schematics_RevE.pdf", and find taht the nand in evm is "MT29F2G16AADWP".

    This is well know fact actually.

    Fire Lord said:
    So I am much more confused about the bus width. How can it be 8-bit in my boot log?

    This is your boot log, you should know what you are doing with your custom kernel image. Can you attach your custom kernel image (uImage), I can test on my side.

    Regards,
    Pavel

  • I have also check with the pre-built uImage and CS0BW set to 0 (8-bit NAND), I have:

    omap2-nand driver initializing

    ONFI flash detected

    ONFI param page 0 valid

    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)

    Creating 5 MTD partitions on "omap2-nand.0":

    0x000000000000-0x000000260000 : "U-Boot"

    0x000000260000-0x000000280000 : "U-Boot Env"

    0x000000280000-0x0000006c0000 : "Kernel"

    0x0000006c0000-0x00000cee0000 : "File System"

    0x00000cee0000-0x000010000000 : "Reserved"

     

     

    root@dm816x-evm:~# devmem2 0x48140040

    /dev/mem opened.

    Memory mapped at address 0x402c0000.

    Read at address  0x48140040 (0x402c0040): 0x00000312

     

    I do not have such messages, even CS0BW is set for 8-bit NAND. Based on that, it seems there are many strange modifications in your custom kernel.

    You can print the value of the CONTROL_STATUS register with printk in your custom kernel to see what is the value there. Maybe you have there the correct value for 16-bit NAND, despite of these 8-bit messages.

    Regards,
    Pavel

  • hi

     I have installed a new ezsdk, So no body will change the u-boot/kernel besides me. And i guaranteed not to change them except doing some modifications in menuconfig. So if it is possible to chang the bus width in menuconfig of the kernel?

    I have tested the addr of 0x48140040 and 48140B90, results is below. So is it right?

    /************************************************u-boot linux prompt************************************************************************************

    TI8168_EVM#md 0x48140040 1
    48140040: 00030313 ....
    TI8168_EVM#md 0x48140B90 1
    48140b90: 00000008 ....

    *************************************************root linux prompt****************************************************************************************

    root@dm816x-evm:~# devmem2 0x48140040
    /dev/mem opened.
    Memory mapped at address 0x40233000.
    Read at address 0x48140040 (0x40233040): 0x00030313

    *************************************************************************************************************************************************************/

    here is my images, thank you for the test. hope for good news.

    6811.boot.scr.gz

    4540.MLO.gz

    3225.u-boot.bin.gz

    7652.u-boot.noxip.bin.gz

    8372.uImage.gz

  • Fire Lord said:
    So if it is possible to chang the bus width in menuconfig of the kernel?

    No, I do not think you can change the NAND bus width through the menuconfig of the kernel.

    Fire Lord said:
    I have tested the addr of 0x48140040 and 48140B90, results is below. So is it right?

    Fire Lord said:
    TI8168_EVM#md 0x48140040 1
    48140040: 00030313 ....
    TI8168_EVM#md 0x48140B90 1
    48140b90: 00000008 ....

    Fire Lord said:
    root@dm816x-evm:~# devmem2 0x48140040
    /dev/mem opened.
    Memory mapped at address 0x40233000.
    Read at address 0x48140040 (0x40233040): 0x00030313

    Looks correct to me. Just note that you make slight change from the sysboot pins for NAND, recommended in the TI81xx uboot user guide. In TI81xx uboot user guide we have:

    btmode[4:0] = 10010 (NAND/NANDI2C/SPI/UART)

    While you have:

    btmode[4:0] = 10011 (NAND/NANDI2C/SD/UART)

    I will recommend you when booting from NAND with btmode[4:0] = 10011 (0x48140040 = 0x00030313), to remove SD/SDIO card (if you have one). As if your board will not be able to boot from NAND, it will try to boot from SD/SDIO card, and you might think you are booting from NAND, while you are actually booting from SD/SDIO card.

    Note also that you have bit [17] WAITEN = 1, while in the default EZSDK it is 0 (not using wait pin monitoring). Do you really use this function (wait pin monitoring)?

    Fire Lord said:
    here is my images, thank you for the test. hope for good news.

    I have tested this uImage, and I observe the same on the DM816x TI EVM, I see the same strange messages:

    bus width: 8

    Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit":

    The bad/good news are that your custom kernel is making some strange modifications with the NAND.

    Regards,
    Pavel

  • hi,

    I will recommend you when booting from NAND with btmode[4:0] = 10011 (0x48140040 = 0x00030313), to remove SD/SDIO card (if you have one). As if your board will not be able to boot from NAND, it will try to boot from SD/SDIO card, and you might think you are booting from NAND, while you are actually booting from SD/SDIO card.

    actually, when i was testing about booting from NAND, i remove the SD card.

    Note also that you have bit [17] WAITEN = 1, while in the default EZSDK it is 0 (not using wait pin monitoring). Do you really use this function (wait pin monitoring)?

    actually, I don't what's this. So I don't know how can i change it and I don't know about this function(wait pin monitoring).

    I only make menuconfig to modify the kernel. And how can it be changed so strange.

    At last, can you help me generate a new uImage, which only need to disable the "host USB" in USB support(this will make the problem of "hub 1-0:1.0: over-current change on port 1" ) and enable the MTD function which should support the JFFS2 filesystem too. In that way, I can have a try on my board.

  • And then:

    I want to write like this:

    but I don't know which button to choose. can you tell me?

  • Fire Lord said:
    actually, I don't what's this. So I don't know how can i change it and I don't know about this function(wait pin monitoring).

    This is controlled from btmode8 pin (CS0WAIT), same as btmode7 pin (CS0BW). In the DM816x TI EVM these two pins are controlled from SW3.

    Fire Lord said:
    I only make menuconfig to modify the kernel. And how can it be changed so strange.

    Can you also provide me the GPMC <-> NAND part of your custom board schematic?

    Fire Lord said:
    At last, can you help me generate a new uImage, which only need to disable the "host USB" in USB support(this will make the problem of "hub 1-0:1.0: over-current change on port 1" )

    Refer to the below wiki page:

    Fire Lord said:
    and enable the MTD function which should support the JFFS2 filesystem too.

    Already provided in my previous posts.

    Regards,
    Pavel

  • Fire Lord said:
    I want to write like this:

    Fire Lord said:
    but I don't know which button to choose. can you tell me?

    Reply -> Use rich formatting -> mark the text you want -> Quote -> Post

    Regards,
    Pavel

  • hi,
    what's more, I think my fs "rd-jffs2.bin" maybe is wrong. So can you provide me a right one. I need a small one because the boot partition of the SD card only have space of 70M. Thank you very much.
  • I have already provided the needed pointers for how to create correct rd-jffs2.bin
  • hi pavel,
    from the discussion above, can it be sure that my uImage is wrong? But i really never change the code besides menuconfig. here is my steps to make the image:
    1.install the ezsdk and code_sourcery.
    2.get into the directory ~/ezsdk/board-support/linux-2.6.37-psp04.04.00.01/
    3.make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
    4.make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_defconfig
    5.make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig, and change the settings of USB、MTD、JFFS2
    6.make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage, after this, I get the image in directory ~/arch/arm/boot/uImage

    is it right?
  • hi pavel,

    this means if i don't use PCIe boot, I can ignoe the CS0BW. right?

  • hi,

    I make a new kernel image to have a try. here is the boot_log, and i have several questions about the image and log:

    0284.uImage.gz

    5381.boot_log.txt

    1.Memory policy: ECC disabled, Data cache writeback-----maybe it is reason why the ecc error comes up.

    2.Creating 4 MTD partitions on "spi_flash":

    0x000000000000-0x000000040000 : "U-Boot"
    mtd: partition "U-Boot" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
    mtd: Giving out device 0 to U-Boot
    rfd_ftl: 'U-Boot': unable to allocate memory for sector map
    0x000000010000-0x000000012000 : "U-Boot Env"
    mtd: partition "U-Boot Env" is out of reach -- disabled
    mtd: Giving out device 1 to U-Boot Env
    rfd_ftl: please provide block_size
    0x000000000000-0x000000280000 : "Kernel"
    mtd: partition "Kernel" extends beyond the end of device "spi_flash" -- size truncated to 0x10000
    mtd: Giving out device 2 to Kernel
    rfd_ftl: 'Kernel': unable to allocate memory for sector map
    0x000000010000-0x000000010000 : "File System"
    mtd: partition "File System" is out of reach -- disabled
    mtd: Giving out device 3 to File System----------there are two "out of reach" here, what's the problem?

    3.

    NAND device: Manufacturer ID: 0x98, Chip ID: 0x39 (Toshiba )
    flash size: 8 MiB
    page size: 512 bytes
    OOB area size: 16 bytes
    sector size: 8 KiB
    pages number: 16384
    pages per sector: 16
    bus width: 8
    bits in sector size: 13
    bits in page size: 9
    bits in OOB size: 4
    flash size with OOB: 8448 KiB
    page address bytes: 3
    sector address bytes: 2
    options: 0x62
    Scanning device for bad blocks
    Creating 1 MTD partitions on "NAND 8MiB 1,8V 8-bit":
    0x000000000000-0x000000800000 : "NAND simulator partition 0"
    mtd: Giving out device 4 to NAND simulator partition 0
    GPIO NAND driver, © 2004 Simtec Electronics
    omap2-nand driver initializing
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xcc (Micron )
    Creating 5 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000260000 : "U-Boot"
    mtd: Giving out device 5 to U-Boot
    0x000000260000-0x000000280000 : "U-Boot Env"
    mtd: Giving out device 6 to U-Boot Env
    0x000000280000-0x0000006c0000 : "Kernel"
    mtd: Giving out device 7 to Kernel
    0x0000006c0000-0x00000cee0000 : "File System"
    mtd: Giving out device 8 to File System
    0x00000cee0000-0x000020000000 : "Reserved"
    mtd: Giving out device 9 to Reserved----------here have two "nand devices",how can it be?

  • Fire Lord said:
    can it be sure that my uImage is wrong?

    Yes, it seems wrong to me.

    Fire Lord said:
    5.make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig, and change the settings of USB、MTD、JFFS2

    Can you provide me the exact settings you have change from the default?

    Regards,
    Pavel

  • Fire Lord said:
    this means if i don't use PCIe boot, I can ignoe the CS0BW. right?

    No, it does not mean that. It means that if you are not using PCIe boot, there will be no conflict between PCIe boot and NAND/NOR settings. It means that if you are not using PCIe boot mode,u-boot/kernel will not detect wrong value on CS0BW, u-boot/kernel will detect CS0BW value that you have set.

    Regards,
    Pavel

  • hi pavel,

    I have a new try about the u-boot, kernel and fs. And I can boot my system finally even have a ecc problem. When i boot my system, I can input root to login. But it will give me a ecc error problem.here is my boot log.

    5327.修改了内核之后可以正常启动但是会有ecc错误.txt

    "e2e.ti.com/.../140272", here is another one who have the same problem. But I can not get the way about adding the support of trimffs.I have add the "#define CONFIG_CMD_NAND_TRIMFFS" to "includes/configs/ti8168_evm.h" in my u-boot. But it does not work.

    TI8168_EVM#nand write.trimffs 0x81000000 0x006C0000 0x00ED0000

    NAND write: device 0 offset 0x6c0000, size 0xed0000
    Unknown nand command suffix '.trimffs'.

     

     

    2. another question is that I want to change the default ecc hamming code from BCH8 to Hamming code. When I change it in u-boot prompt, it would not work when reboot. How can it be work after reboot?

  • Fire Lord said:
    I have a new try about the u-boot, kernel and fs. And I can boot my system finally even have a ecc problem. When i boot my system, I can input root to login. But it will give me a ecc error problem.

    I still see the same suspicious messages in your boot up log (like NAND 8-bit and few others). You stated that these messages occurs after just modifying the config file through menuconfig. Can you share the exact changes you have done in menuconfig?

    Fire Lord said:
    2. another question is that I want to change the default ecc hamming code from BCH8 to Hamming code. When I change it in u-boot prompt, it would not work when reboot. How can it be work after reboot?

    Can you try with saveenv?

    TI8168_EVM# nandecc hw 0
    TI8168_EVM# saveenv

    reboot


    Regards,
    Pavel

  • I still see the same suspicious messages in your boot up log (like NAND 8-bit and few others). You stated that these messages occurs after just modifying the config file through menuconfig. Can you share the exact changes you have done in menuconfig?

    I make 12 photos about the changes. they are in the uploading files. Now i will have a illustration about them.

    1.I choose "General setup-->POSIX Process Queues";

    2.I choose "General setup-->Kernel .config support" and "General setup-->Enable access to .config through /proc/config";

    3.I choose "Memory Technology Device..-->Debugging" and the next one;

    4.I choose "Memory Technology Device..-->Resident Flash Disk ()" and the next one;

    5.I choose "Memory Technology Device..-->NAND ecc smart media..." and "Enable UBI -...."

    6.I choose except "verify...." and "nand flash .... 2..3 ",because they are chosen defautly.

    7.disable "usb support-->support for host-side USB"

    8.I choose "usb support-->Enable debugging...." and "USB gadget support....." and "GPIO based peripheral......"

    9,10,11,12.I make the  choices like the four pictures show.

    7167.Desktop.rar

    TI8168_EVM# nandecc hw 0
    TI8168_EVM# saveenv

    reboot

    after reboot, the default setting is also BCH8, not hw. I think it should be changed in the u-boot.

  • hi,pavel,

    here is my sch of the flash:

  • Fire Lord said:
    1.I choose "General setup-->POSIX Process Queues";

    I can not locate General setup-->POSIX Process Queues on my 2.6.37 kernel with menuconfig. I can not see this in your screen shots also. Can you send me the screen shot when you select  General setup-->POSIX Process Queues ? Do you by any chance mean General setup-->POSIX Message Queues instead of General setup-->POSIX Process Queues ?

    Regards,
    Pavel

  • oh,no, I am sorry to have made that base problem.
  • hi,pavel,
    I have tried to use UBIFS.
    But when I change the u-boot to have UBI support, it can not boot from the nand. I even can not see anything in uart when booting from nand using the u-boot I changed. Do you know why?
  • Fire Lord said:

    1.I choose "General setup-->POSIX Process Queues";

    2.I choose "General setup-->Kernel .config support" and "General setup-->Enable access to .config through /proc/config";

    These option should be selected by the ti8168_evm_defconfig, so I do not think you should select these in menuconfig afterwards, these should be already selected.

    Fire Lord said:

    3.I choose "Memory Technology Device..-->Debugging" and the next one;

    4.I choose "Memory Technology Device..-->Resident Flash Disk ()" and the next one;

    5.I choose "Memory Technology Device..-->NAND ecc smart media..." and "Enable UBI -...."

    I see terrifying things here! From where you get the instructions to set these options? Or it is your own decision?

    Regards,
    Pavel

  • I saw them somewhere in the internet who claimed having been succeded.
  • Fire Lord said:
    I saw them somewhere in the internet who claimed having been succeded.

    Can you provide a link to that place? Does he work with DM816x board?

    For the correct menuconfig settings, refer to the below wiki pages and do not add any additional settings found around the world.

    Regards,
    Pavel

  • Note also that besides the correct kernel configuration with menuconfig, you should also roll back from 8-bit ECC to 1-bit ECC in linux kernel. See the below pointers for details:

    processors.wiki.ti.com/.../AM335x_JFFS2_Support_Guide
    e2e.ti.com/.../808995
    e2e.ti.com/.../691046
    e2e.ti.com/.../576107

    Regards,
    Pavel
  • Fire Lord said:
    Pavel Botev
    TI8168_EVM# nandecc hw 0
    TI8168_EVM# saveenv

    reboot

    after reboot, the default setting is also BCH8, not hw. I think it should be changed in the u-boot.

    Try to integrate this "nandecc hw 0' command in the bootcmd to automate its execution:

    u-boot> setenv bootcmd 'nandecc hw 0; nand read ...; bootm ...'

    u-boot> saveenv

    Regards,
    Pavel

  • TI81XX PSP NAND Driver User Guide - Texas Instruments Wiki

    processors.wiki.ti.com

    JFFS2 kernel configuration - Texas Instruments Wiki

    processors.wiki.ti.com

    AM335x JFFS2 Support Guide - Texas Instruments Wiki

    processors.wiki.ti.com

    Regards,
    Pavel

    hi,

    I will try the all pointers you gave me. Before that, I have few questions to ask you.

    1. My menuconfig interface is different from the second pointer you gave me and should I follow the third pointer without change?

    2.I have four steps when config for kernel. Are they right? And I found that the second step would set the kernel to default settings, So when I menuconfig, it means I am doing config based on the default 8168evm settings, right?

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_defconfig

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig
    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

    3.I use BCH8 when flashing the u-boot and kernel and fs to nand via U-boot. And I boot using BCH2. It can be successfully boot to the login interface, but has a problem as "JFFS2 notice: (1200) check_node_data: wrong data CRC in data node at 0x003f0200: read 0x6aaf7a44, calculated 0x3eed06a6.". But see the following picture, the JFFS2 is only supported by BCH0. So i tried to boot with the ecc BCH8, it came out the problem as "bad compare". Can you explain me the reason?

  • "1. My menuconfig interface is different from the second pointer you gave me and should I follow the third pointer without change?"

    Actually, JFFS2 support is enabled in the default DM816x kernel. So you might skip the "make menuconfig" step, just use "make ti8168_evm_defconfig"

    "2.I have four steps when config for kernel. Are they right? And I found that the second step would set the kernel to default settings, So when I menuconfig, it means I am doing config based on the default 8168evm settings, right?"

    They are right, just remove the menuconfig step, as both JFFS2 and UBIFS are enabled from ti8168_evm_defconfig, there is no need to additionally enable something regarding JFFS2.

    "3.I use BCH8 when flashing the u-boot and kernel and fs to nand via U-boot."

    Try with 1-bit HW ECC when flashing kernel and fs to NAND.

    "And I boot using BCH2." - there is no such BCH. Can you check again?

    It can be successfully boot to the login interface, but has a problem as "JFFS2 notice: (1200) check_node_data: wrong data CRC in data node at 0x003f0200: read 0x6aaf7a44, calculated 0x3eed06a6.".

    Can you provide the full boot up log?

    Can you explain me the reason?

    Did you roll back the kernel to 1-bit HW ECC? If not, that might be reason.

    BR
    Pavel
  • hi,

    So the official way of using the edd is that: flashing u-boot with BCH8, flashing kernel and fs with BCH0, boot from nand with BCH0 or SW if jffs2 is uesd and BCH0 and BCH8 both OK when other filesystems are used? Do I get the key?

    "

    Did you roll back the kernel to 1-bit HW ECC? If not, that might be reason.

    actually, I can not boot when set to 1-bit HW ECC(BCH 0), and I tried many ways in which only BCH8 can work(have the problem of "JFFS2 notice: (1200) check_node_data: wrong data CRC in data node at 0x003f0200: read 0x6aaf7a44, calculated 0x3eed06a6.")

    here is the boot log:

    4111.bootlog_jffs2.txt

  • I still see the same disturbing messages in your boot log. Have you try with pure kernel, not modified with menuconfig, just ti8168_evm_defconfig?
  • hi,

    After I know exactly about the ecc and menuconfig, So I have a try again.

    I use a u-boot only changed prompt name. I use a kernel only changed host usb to gadget when menuconfig, and I change the /arch/arm/ mach-omap2/board-flash.c and /drivers/mtd/nand/omap2.c for ECC BCH0. A fs of jffs2 made by myself.

    I flash them to nand via u-boot. U-boot is flashed by BCH8, kernel and fs is flashed by BCH0. Boot from nand use BCH0.Here is the env:

    setenv bootargs 'mem=128M console=ttyO2,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2 ip=off'

    setenv bootcmd 'nand read 0x81000000 0x00280000 0x440000;bootm 0x81000000'

    But it comes a problem, the following is the boot_log:

    1882.txt

    From the log I found that the filesystem is NO.3, So I modified it.

    And then I change the env as following:

    setenv bootargs 'mem=128M console=ttyO2,115200n8 noinitrd root=/dev/mtdblock3 rw rootfstype=jffs2 ip=off'

    But another probem came out, here is the boot log:

    1682.txt

  • yes, I did not use pure kernel in that try. I have used a pure kernel in last try.

    I tried mtdblock3,4 and 7, and all of them came out problems.
  • Fire Lord said:
    yes, I did not use pure kernel in that try. I have used a pure kernel in last try.

    I tried mtdblock3,4 and 7, and all of them came out problems.

    Can you provide full log with the pure kernel for further analysis.

    BR
    Pavel

  • Do you have SPI Flash W25X32 in your custom board (the EVM has it)? If no, please try with removing it from the kernel. This is done in menuconfig, see the below wiki:
    processors.wiki.ti.com/.../TI81XX_PSP_McSPI_Driver_User_Guide

    Remove only SPI flash support:

    Device Drivers --->
    <*> Memory Technology Device (MTD) support --->
    Self-contained MTD device drivers --->
    < > Support most SPI Flash chips (AT26DF, M25P, W25X, ...)
    [ ] Use FAST_READ OPCode allowing SPI CLK <= 50MHz (NEW)


    When you created rd-jffs2.bin file, which root fs you have pass to it?

    # mkfs.jffs2 -lqn –e 128 -r target -o /tftpboot/rd-jffs2.bin

    What you pass for "-r target"? What is the "target"?

    Regards,
    Pavel