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.

Compiler: AM3352 kernel boot issue

Other Parts Discussed in Thread: AM3352, TPS65910

Tool/software: TI C/C++ Compiler

This time I encountered a very complicated problem.
I have a batch of equipment, using am3352, software version is PDK6.0, u-boot2011.09 + kernel 3.2.0, using Nandflash for storage system, model is 29F2G08ABACA, MT.
The system I transplanted has been running on more than 1,000 products.
After the equipment has been running for one month, more than 10 systems have failed to start.
The phenomenon is as follows:
1. u-boot.img stopped when starting the kernel.
2. When troubleshooting this problem, I redone the u-boot of the SD card boot, enter the u-boot shell in the SD card u-boot, and execute bootm $ (kernel_addr). This is no problem, exclude Linux kernel problem.
3. I updated the u-boot.img of one of the devices again, and the system runs smoothly. Here, we can all think of the problem with u-boot.img.
4. In the SD card u-boot shell, execute the nand read command to read the data of the problematic u-boot.img, print it out through mw, and read it out, then proceed with the normal u-boot.img Contrast and found no problem.
5. As long as the system is re-upgraded, the phenomenon is gone.

I am very puzzled that 1 and 2 can already infer 3, but 3 is self-contradictory. How can I check this problem.

  • Hi Fulin,

    fulin chen said:
    1. u-boot.img stopped when starting the kernel.

    What does the boot log look like during a failure, and during a good boot?

    What happens if you re-try multiple times (hard reset, power cycle, etc.)? I suppose it still won't boot, right?

    fulin chen said:
    4. In the SD card u-boot shell, execute the nand read command to read the data of the problematic u-boot.img, print it out through mw, and read it out, then proceed with the normal u-boot.img Contrast and found no problem.

    Can you share detailed steps what you did here to establish the memory contents is good, maybe something wasn't done 100% correctly?

    Also it would be good to write the NAND contents into a binary file to SD card (read into DDR, write out to SD from U-Boot command prompt), and then do the data comparison offline on a PC (for example, comparing byte-by-byte with a readout from a known-good system).

    Also have you tried the following on a broken system:

    1. Keep board powered off for a minute or so (to ensure memory is gone / random)
    2. Boot from SD card
    3. Use NAND commands to read Kernel from NAND
    4. Boot Kernel

    What does happen then?

    Regards, Andreas

  • About first question , follow is the bad boot log :

    U-Boot SPL 2011.09-00000-g6581db8 (Aug 03 2018 - 10:32:52)
    Texas Instruments Revision detection unimplemented
    Booting from NAND...


    U-Boot 2011.09-00000-g6581db8 (Aug 03 2018 - 10:32:52)

    ---1I2C: ready
    DRAM: 256 MiB
    WARNING: Caches not enabled
    this board is ECM_5206
    zengjf :
    NAND : HW ECC Hamming Code selected
    256 MiB
    MMC: OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment

    Net: cpsw
    Hit any key to stop autoboot: 0
    Booting from nand ...
    HW ECC BCH8 Selected

    NAND read: device 0 offset 0x280000, size 0x500000
    5242880 bytes read: OK

    follow is good log :

    U-Boot SPL 2011.09-00000-g6581db8 (Aug 03 2018 - 10:32:52)
    Texas Instruments Revision detection unimplemented
    Booting from NAND...


    U-Boot 2011.09-00000-g6581db8 (Aug 03 2018 - 10:32:52)

    ---1I2C: ready
    DRAM: 256 MiB
    WARNING: Caches not enabled
    this board is ECM_5206
    zengjf :
    NAND : HW ECC Hamming Code selected
    256 MiB
    MMC: OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment

    Net: cpsw
    Hit any key to stop autoboot: 0
    Booting from nand ...
    HW ECC BCH8 Selected

    NAND read: device 0 offset 0x280000, size 0x500000
    5242880 bytes read: OK
    ## Booting kernel from Legacy Image at 80200000 ...
    Image Name: Linux-3.2.0-geff1437-dirty
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3538224 Bytes = 3.4 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    [ 0.000000] Linux version 3.2.0-geff1437-dirty (ecm_5206@aplex) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #2 Tue Jun 26 11:07:33 CST 2018
    [ 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: aplex_ECM_5206
    [ 0.000000] Memory policy: ECC disabled, Data cache writeback
    [ 0.000000] <danny debug> this board is am335x, cpu revision = 2
    [ 0.000000] AM335X ES2.1 (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 screentype=R screensize=800x600-10
    [ 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: 252584k/252584k available, 9560k 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 - 0xc0643000 (6380 kB)
    [ 0.000000] .init : 0xc0643000 - 0xc067c000 ( 228 kB)
    [ 0.000000] .data : 0xc067c000 - 0xc06e96d8 ( 438 kB)
    [ 0.000000] .bss : 0xc06e96fc - 0xc0719bb8 ( 194 kB)
    [ 0.000000] NR_IRQS:396
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] Total of 128 interrupts on 1 active controller
    [ 0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [ 0.000000] omap_dm_timer_switch_src: Switching to HW default clocksource(sys_clkin_ck) for timer1, this may impact timekeeping in low power state
    [ 0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
    [ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
    [ 0.000000] Console: colour dummy device 80x30
    [ 0.000185] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
    [ 0.057156] pid_max: default: 32768 minimum: 301
    [ 0.057279] Security Framework initialized
    [ 0.057375] Mount-cache hash table entries: 512
    [ 0.057754] CPU: Testing write buffer coherency: ok
    [ 0.058549] devtmpfs: initialized
    [ 0.078493] omap_hwmod: gfx: failed to hardreset
    [ 0.094780] omap_hwmod: pruss: failed to hardreset
    [ 0.095912] print_constraints: dummy:
    [ 0.096277] NET: Registered protocol family 16
    [ 0.096425] omap_device: mpu: registering
    [ 0.096690] omap_device: l3_main: registering
    [ 0.096969] omap_device: omap_gpio: registering
    [ 0.097286] omap_device: omap_gpio: registering
    [ 0.097548] omap_device: omap_gpio: registering
    [ 0.097783] omap_device: omap_gpio: registering
    [ 0.098646] OMAP GPIO hardware version 0.1
    [ 0.101108] omap_mux_init: Add partition: #1: core, flags: 0
    [ 0.101509] omap_device: omap_uart: registering
    [ 0.101867] omap_device: omap_uart: registering
    [ 0.102127] omap_device: omap_uart: registering
    [ 0.102359] omap_device: omap_uart: registering
    [ 0.102600] omap_device: omap_uart: registering
    [ 0.102829] omap_device: omap_uart: registering
    [ 0.103061] omap_i2c.1: alias fck already exists
    [ 0.103072] omap_device: omap_i2c: registering
    [ 0.103449] omap_device: musb-ti81xx: registering
    [ 0.103667] The board is a ecm_5206.
    [ 0.103814] omap_hsmmc.0: alias fck already exists
    [ 0.103825] omap_device: omap_hsmmc: registering
    [ 0.104265] omap_device: omap-gpmc: registering
    [ 0.104526] omap_device: omap2_elm: registering
    [ 0.104812] omap_device: davinci_mdio: registering
    [ 0.105056] omap_device: cpsw: registering
    [ 0.105258] ecm_5206 cpsw init .....................
    [ 0.105767] omap_i2c.2: alias fck already exists
    [ 0.105777] omap_device: omap_i2c: registering
    [ 0.106071] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.106129] omap_device: omap-mailbox: registering
    [ 0.106400] omap2_mcspi.1: alias fck already exists
    [ 0.106412] omap_device: omap2_mcspi: registering
    [ 0.106645] omap2_mcspi.2: alias fck already exists
    [ 0.106656] omap_device: omap2_mcspi: registering
    [ 0.106932] edma.0: alias fck already exists
    [ 0.106954] edma.0: alias fck already exists
    [ 0.106973] edma.0: alias fck already exists
    [ 0.106982] omap_device: edma: registering
    [ 0.107508] omap_device: omap_timer: registering
    [ 0.107765] omap_device: omap_timer: registering
    [ 0.108004] omap_device: omap_timer: registering
    [ 0.108241] omap_device: omap_timer: registering
    [ 0.108478] omap_device: omap_timer: registering
    [ 0.108708] omap_device: omap_timer: registering
    [ 0.108945] omap_device: omap_timer: registering
    [ 0.109176] omap_device: omap_timer: registering
    [ 0.111365] omap_device: omap_wdt: registering
    [ 0.137678] bio: create slab <bio-0> at 0
    [ 0.139848] SCSI subsystem initialized
    [ 0.141525] usbcore: registered new interface driver usbfs
    [ 0.141849] usbcore: registered new interface driver hub
    [ 0.142064] usbcore: registered new device driver usb
    [ 0.142377] registerd cppi-dma Intr @ IRQ 17
    [ 0.142392] Cppi41 Init Done Qmgr-base(d087a000) dma-base(d0878000)
    [ 0.142401] Cppi41 Init Done
    [ 0.142431] musb-ti81xx musb-ti81xx: musb0, board_mode=0x11, plat_mode=0x1
    [ 0.142728] musb-ti81xx musb-ti81xx: musb1, board_mode=0x11, plat_mode=0x1
    [ 0.143931] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
    [ 0.145026] tps65910 1-002d: JTAGREVNUM 0x0
    [ 0.147446] print_constraints: VRTC:
    [ 0.148910] print_constraints: VIO: at 1500 mV
    [ 0.151229] print_constraints: VDD1: 600 <--> 1500 mV at 1262 mV normal
    [ 0.153530] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
    [ 0.154552] print_constraints: VDD3: 5000 mV
    [ 0.155971] print_constraints: VDIG1: at 1800 mV
    [ 0.157417] print_constraints: VDIG2: at 1800 mV
    [ 0.158848] print_constraints: VPLL: at 1800 mV
    [ 0.160283] print_constraints: VDAC: at 1800 mV
    [ 0.161713] print_constraints: VAUX1: at 1800 mV
    [ 0.163142] print_constraints: VAUX2: at 3300 mV
    [ 0.164575] print_constraints: VAUX33: at 3300 mV
    [ 0.166020] print_constraints: VMMC: at 3300 mV
    [ 0.166781] tps65910 1-002d: No interrupt support, no core IRQ
    [ 0.167243] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz
    [ 0.168079] pps_core: LinuxPPS API ver. 1 registered
    [ 0.168090] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.168223] PTP clock support registered
    [ 0.170294] cfg80211: Calling CRDA to update world regulatory domain
    [ 0.171519] Switching to clocksource gp timer
    [ 0.190589] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [ 0.190738] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    [ 0.191060] MUSB0 controller's USBSS revision = 4ea20800
    [ 0.191092] musb0: Enabled SW babble control
    [ 0.191631] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [ 0.191750] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [ 0.191928] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.191941] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.191954] usb usb1: Product: MUSB HDRC host driver
    [ 0.191964] usb usb1: Manufacturer: Linux 3.2.0-geff1437-dirty musb-hcd
    [ 0.191976] usb usb1: SerialNumber: musb-hdrc.0
    [ 0.192990] hub 1-0:1.0: USB hub found
    [ 0.193023] hub 1-0:1.0: 1 port detected
    [ 0.193749] musb-hdrc musb-hdrc.0: USB Host mode controller at d083c000 using DMA, IRQ 18
    [ 0.193935] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    [ 0.194268] MUSB1 controller's USBSS revision = 4ea20800
    [ 0.194297] musb1: Enabled SW babble control
    [ 0.194752] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 0.194810] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [ 0.194947] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.194960] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.194973] usb usb2: Product: MUSB HDRC host driver
    [ 0.194983] usb usb2: Manufacturer: Linux 3.2.0-geff1437-dirty musb-hcd
    [ 0.194994] usb usb2: SerialNumber: musb-hdrc.1
    [ 0.195939] hub 2-0:1.0: USB hub found
    [ 0.195963] hub 2-0:1.0: 1 port detected
    [ 0.196674] musb-hdrc musb-hdrc.1: USB Host mode controller at d083e800 using DMA, IRQ 19
    [ 0.197134] NET: Registered protocol family 2
    [ 0.197348] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.197655] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    [ 0.197812] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.197907] TCP: Hash tables configured (established 8192 bind 8192)
    [ 0.197920] TCP reno registered
    [ 0.197938] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.197961] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.198167] NET: Registered protocol family 1
    [ 0.198429] RPC: Registered named UNIX socket transport module.
    [ 0.198442] RPC: Registered udp transport module.
    [ 0.198450] RPC: Registered tcp transport module.
    [ 0.198459] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.198688] NetWinder Floating Point Emulator V0.97 (double precision)
    [ 0.198918] omap-gpmc omap-gpmc: GPMC revision 6.0
    [ 0.198936] Registering NAND on CS0
    [ 0.199638] <danny debug> opp_init, cpu rev = 33500234
    [ 0.199651] <danny debug> opp_init, cpu max_freq = 50
    [ 0.199660] <danny debug> opp_init, cpu 1G freq = 1
    [ 0.211129] ashmem: initialized
    [ 0.211389] VFS: Disk quotas dquot_6.5.2
    [ 0.211445] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 0.212081] msgmni has been set to 493
    [ 0.215275] alg: No test for stdrng (krng)
    [ 0.215347] io scheduler noop registered
    [ 0.215357] io scheduler deadline registered
    [ 0.215453] io scheduler cfq registered (default)
    [ 0.216889] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [ 1.182359] console [ttyO0] enabled
    [ 1.186943] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [ 1.194905] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [ 1.202782] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [ 1.210621] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [ 1.218501] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [ 1.236671] brd: module loaded
    [ 1.245225] loop: module loaded
    [ 1.248890] at24 1-0050: 256 byte 24c02 EEPROM, writable, 1 bytes/write
    [ 1.257620] mtdoops: mtd device (mtddev=name/number) must be supplied
    [ 1.264994] omap2-nand driver initializing
    [ 1.269597] ONFI flash detected
    [ 1.273031] ONFI param page 0 valid
    [ 1.276677] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP)
    [ 1.285444] Creating 8 MTD partitions on "omap2-nand.0":
    [ 1.291002] 0x000000000000-0x000000020000 : "SPL"
    [ 1.297602] 0x000000020000-0x000000040000 : "SPL.backup1"
    [ 1.304802] 0x000000040000-0x000000060000 : "SPL.backup2"
    [ 1.311942] 0x000000060000-0x000000080000 : "SPL.backup3"
    [ 1.318946] 0x000000080000-0x000000260000 : "U-Boot"
    [ 1.326303] 0x000000260000-0x000000280000 : "U-Boot Env"
    [ 1.333283] 0x000000280000-0x000000780000 : "Kernel"
    [ 1.342025] 0x000000780000-0x000010000000 : "File System"
    [ 1.450583] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [ 1.459145] OneNAND driver initializing
    [ 1.464006] UBI: attaching mtd7 to ubi0
    [ 1.468018] UBI: physical eraseblock size: 131072 bytes (128 KiB)
    [ 1.474585] UBI: logical eraseblock size: 126976 bytes
    [ 1.480214] UBI: smallest flash I/O unit: 2048
    [ 1.485129] UBI: VID header offset: 2048 (aligned 2048)
    [ 1.491390] UBI: data offset: 4096
    [ 1.652488] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
    [ 1.659480] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 1.683075] hub 1-1:1.0: USB hub found
    [ 1.687057] hub 1-1:1.0: 4 ports detected
    [ 1.992605] usb 1-1.3: new full-speed USB device number 3 using musb-hdrc
    [ 2.124915] usb 1-1.3: New USB device found, idVendor=10c4, idProduct=ea60
    [ 2.132104] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 2.139729] usb 1-1.3: Product: CP2102 USB to UART Bridge Controller
    [ 2.146366] usb 1-1.3: Manufacturer: Silicon Labs
    [ 2.151271] usb 1-1.3: SerialNumber: 0001
    [ 3.680591] UBI: max. sequence number: 86
    [ 3.700761] UBI: attached mtd7 to ubi0
    [ 3.704736] UBI: MTD device name: "File System"
    [ 3.710456] UBI: MTD device size: 248 MiB
    [ 3.715639] UBI: number of good PEBs: 1988
    [ 3.720543] UBI: number of bad PEBs: 0
    [ 3.725181] UBI: number of corrupted PEBs: 0
    [ 3.729812] UBI: max. allowed volumes: 128
    [ 3.734631] UBI: wear-leveling threshold: 4096
    [ 3.739533] UBI: number of internal volumes: 1
    [ 3.744171] UBI: number of user volumes: 1
    [ 3.748801] UBI: available PEBs: 0
    [ 3.753440] UBI: total number of reserved PEBs: 1988
    [ 3.758615] UBI: number of PEBs reserved for bad PEB handling: 19
    [ 3.764977] UBI: max/mean erase counter: 2/0
    [ 3.769427] UBI: image sequence number: 1286443414
    [ 3.774603] UBI: background thread "ubi_bgt0d" started, PID 609
    [ 3.780915] register spi return v = :0
    [ 3.784990] register spi return v = :0
    [ 3.789030] register spi return v = :0
    [ 3.793616] tun: Universal TUN/TAP device driver, 1.6
    [ 3.798886] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
    [ 3.805664] CAN device driver interface
    [ 3.809666] CAN bus driver for Bosch D_CAN controller 1.0
    [ 3.861598] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [ 3.868054] davinci_mdio davinci_mdio.0: detected phy mask fffffffc
    [ 3.875888] davinci_mdio.0: probed
    [ 3.879445] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
    [ 3.888003] davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver SMSC LAN8710/LAN8720
    [ 3.896709] PPP generic driver version 2.4.2
    [ 3.901646] PPP BSD Compression module registered
    [ 3.906555] PPP Deflate Compression module registered
    [ 3.912097] usbcore: registered new interface driver rtl8192cu
    [ 3.918353] usbcore: registered new interface driver zd1201
    [ 3.924398] usbcore: registered new interface driver cdc_ether
    [ 3.930640] usbcore: registered new interface driver cdc_eem
    [ 3.936730] usbcore: registered new interface driver dm9601
    [ 3.942604] cdc_ncm: 04-Aug-2011
    [ 3.946141] usbcore: registered new interface driver cdc_ncm
    [ 3.952065] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 3.959343] usbcore: registered new interface driver cdc_acm
    [ 3.965268] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [ 3.973627] Initializing USB Mass Storage driver...
    [ 3.978998] usbcore: registered new interface driver usb-storage
    [ 3.985280] USB Mass Storage support registered.
    [ 3.990478] usbcore: registered new interface driver usbserial
    [ 3.996732] USB Serial support registered for generic
    [ 4.002286] usbcore: registered new interface driver usbserial_generic
    [ 4.009095] usbserial: USB Serial Driver core
    [ 4.013791] USB Serial support registered for cp210x
    [ 4.019065] cp210x 1-1.3:1.0: cp210x converter detected
    [ 4.101606] usb 1-1.3: reset full-speed USB device number 3 using musb-hdrc
    [ 4.222830] usb 1-1.3: cp210x converter now attached to ttyUSB0
    [ 4.229211] usbcore: registered new interface driver cp210x
    [ 4.235052] cp210x: v0.09:Silicon Labs CP210x RS232 serial adaptor driver
    [ 4.242299] USB Serial support registered for GSM modem (1-port)
    [ 4.248934] usbcore: registered new interface driver option
    [ 4.254770] option: v0.7.2:USB Driver for GSM modems
    [ 4.260100] USB Serial support registered for pl2303
    [ 4.265493] usbcore: registered new interface driver pl2303
    [ 4.271305] pl2303: Prolific PL2303 USB to serial adaptor driver
    [ 4.278177] mousedev: PS/2 mouse device common for all mice
    [ 4.288040] rtc-ds1307 2-0068: read: 12 24 14 03 17 92 19
    [ 4.293709] rtc-ds1307 2-0068: read secs=12, mins=24, hours=14, mday=17, mon=11, year=119, wday=2
    [ 4.303445] rtc-ds1307 2-0068: rtc core: registered ds1337 as rtc0
    [ 4.310409] i2c /dev entries driver
    [ 4.314838] Linux video capture interface: v2.00
    [ 4.320006] usbcore: registered new interface driver uvcvideo
    [ 4.326029] USB Video Class driver (1.1.1)
    [ 4.331207] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 4.339822] cpuidle: using governor ladder
    [ 4.344651] cpuidle: using governor menu
    [ 4.351076] usbcore: registered new interface driver ushc
    [ 4.357457] usbcore: registered new interface driver usbhid
    [ 4.363293] usbhid: USB HID core driver
    [ 4.367490] oprofile: hardware counters not available
    [ 4.372775] oprofile: using timer interrupt.
    [ 4.377252] Netfilter messages via NETLINK v0.30.
    [ 4.382274] nf_conntrack version 0.5.0 (3946 buckets, 15784 max)
    [ 4.388957] ctnetlink v0.93: registering with nfnetlink.
    [ 4.395289] xt_time: kernel timezone is -0000
    [ 4.399843] ip_set: protocol 6
    [ 4.403113] IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
    [ 4.409452] IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
    [ 4.417283] IPVS: Creating netns size=1144 id=0
    [ 4.422030] IPVS: ipvs loaded.
    [ 4.425215] IPVS: [rr] scheduler registered.
    [ 4.429664] IPVS: [wrr] scheduler registered.
    [ 4.434214] IPVS: [lc] scheduler registered.
    [ 4.438663] IPVS: [wlc] scheduler registered.
    [ 4.443229] IPVS: [lblc] scheduler registered.
    [ 4.447874] IPVS: [lblcr] scheduler registered.
    [ 4.452606] IPVS: [dh] scheduler registered.
    [ 4.457056] IPVS: [sh] scheduler registered.
    [ 4.461506] IPVS: [sed] scheduler registered.
    [ 4.466056] IPVS: [nq] scheduler registered.
    [ 4.470518] IPVS: ftp: loaded support on port[0] = 21
    [ 4.475997] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 4.481667] TCP cubic registered
    [ 4.485037] NET: Registered protocol family 17
    [ 4.489680] can: controller area network core (rev 20090105 abi 8)
    [ 4.496249] NET: Registered protocol family 29
    [ 4.500886] can: raw protocol (rev 20090105)
    [ 4.505353] can: broadcast manager protocol (rev 20090105 t)
    [ 4.511293] 8021q: 802.1Q VLAN Support v1.8
    [ 4.515692] Registering the dns_resolver key type
    [ 4.520649] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 4.528664] ThumbEE CPU extension supported.
    [ 4.533187] mux: Failed to setup hwmod io irq -22
    [ 4.538787] Power Management for AM33XX family
    [ 4.543659] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [ 4.550320] Copied the M3 firmware to UMEM
    [ 4.554691] Cortex M3 Firmware Version = 0x181
    [ 4.562811] clock: disabling unused clocks to save power
    [ 4.570844] Detected MACID=34:15:13:b:12:1f
    [ 4.575368] zengjf check cpsw_probe priv->bus_freq_mhz: 125.
    [ 4.582371] cpsw: Detected MACID = 34:15:13:0b:12:21
    [ 4.589673] rtc-ds1307 2-0068: read: 12 24 14 03 17 92 19
    [ 4.595350] rtc-ds1307 2-0068: read secs=12, mins=24, hours=14, mday=17, mon=11, year=119, wday=2
    [ 4.604637] rtc-ds1307 2-0068: setting system clock to 2019-12-17 14:24:12 UTC (1576592652)
    [ 4.679662] UBIFS: recovery needed
    [ 4.837743] UBIFS: recovery completed
    [ 4.841613] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    [ 4.847880] UBIFS: file system size: 248111104 bytes (242296 KiB, 236 MiB, 1954 LEBs)
    [ 4.856240] UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
    [ 4.863871] UBIFS: media format: w4/r0 (latest is w4/r0)
    [ 4.869951] UBIFS: default compressor: lzo
    [ 4.874227] UBIFS: reserved for root: 0 bytes (0 KiB)
    [ 4.880745] VFS: Mounted root (ubifs filesystem) on device 0:14.
    [ 4.888662] devtmpfs: mounted
    [ 4.892106] Freeing init memory: 228K
    [ 5.239316] devpts: called with bogus options
    Starting logging: OK
    Initializing random number generator... done.
    [ 5.482634] usbcore: registered new interface driver asix
    Starting network: OK
    Starting Network Interface Plugging Daemon: eth0.
    [ 5.719169] net eth0: CPSW phy found : id is : 0x7c0f1
    [ 5.724992] !!!!!!!phy->phy_id == 1 .
    Starting ntpd: OK
    Starting php-fpm done
    Starting lighttpd: OK
    Starting sshd: OK
    Starting telnetd: OK
    Starting vsftpd: OK
    Boa server start ...
    eth0 mac : 3415130b121f
    eth1 mac : 3415130b1221
    [ 8.688871] USB Serial support registered for ch341-uart
    [17/Dec/2019:14:24:16 +0000] log.c:53 (open_logs) - unable to open error log: No such file or di[ 8.702640] usbcore: registered new interface driver ch341
    rectory

    Welcome to ECM-5206
    localhost login:

    About second question : 

    I restarted this device more than 4,000 times through hardware power failure, and 2000 of them were able to boot normally.

    You see right, it is not completely bad, it has a 50% probability that it will fully load the kernel.

    On the third question , Here are the steps I took :

    1. I set the delaytime to 3S in u-boot, then started the u-boot from the SD card and entered the u-boot shell。

    2.  I set the delaytime to 3S in u-boot, then started the u-boot from the SD card and entered the u-boot shell ,   So I used the following command to read u-boot.img to 0x80200000 of DDR3.

    nandecc hw  2

    nand read 0x80200000 0x80000 0x200000

    md 0x80200000 0x200000

    nandecc hw 2  is  select  ECH8 。

    then,  Then I set to store all the displayed information in the log software.

    In windows7, use software and normal u-boot.img for comparison..

    About  Final question :

    I tried shutting it down for 5 minutes and then turning it on again. The problem was the same.

    Boot on  SD card is good 。 

    I compared the image of the kernel in the same way, and it was no problem.

    I use  SD card u-boot to  load  Nandflash  kernel is  ok ,  Can also enter the NAND UBI file system.

    That's all, thanks

  • fulin chen said:

    I restarted this device more than 4,000 times through hardware power failure, and 2000 of them were able to boot normally.

    You see right, it is not completely bad, it has a 50% probability that it will fully load the kernel.

    Okay, that is good to know.

    You said earlier updating "u-boot.img" fixes the issue on a given board. Can you try re-updating something else instead in the NAND, such as MLO, and see if this has the same effect of "fixing" the board?

    I'm not convinced the problem is with "u-boot.img" itself, as it seems to mostly run, even able to load the Kernel.

    Can you provide a capture of your entire U-Boot environment (printenv)?

    Regards, Andreas

  • Dear Andreas :

    I just updated the MLO again, The problem persists.。

    The main contents of the u-boot configuration file are as follows: 

    117 "nandargs=setenv bootargs console=${console} " \
    118 "${optargs} " \
    119 "root=${nandroot} " \
    120 "rootfstype=${nandrootfstype} screentype=${screentype} screensize=${ screensize}\0" \

    58 #define CON \
    59 "console=ttyO0,115200n8 earlyprintk androidboot.console=ttyO0\0" \
    60 "optargs=init=/init\0" \
    61 "mmcroot=/dev/mmcblk0p2 rw\0" \
    62 "mmcrootfstype=ext4 rootwait\0" \
    63 "nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
    64 "nandrootfstype=ubifs rootwait=1\0"
    65 #else

    149 "nandboot=echo Booting from nand ...; " \
    150 "run nandargs; " \
    151 "nandecc hw 2;"\
    152 "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
    153 "bootm ${loadaddr}\0" \

    Where it stopped working now is as follows :

    152 "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
    153 "bootm ${loadaddr}\0" \

    I'm a bit skeptical about the "bootm" command now, but I don't know why.

  • Indeed, the loss of the Nandflash file caused the bootm command to stop running, but I could not find evidence to prove that the Nandflash file was missing, so I ask for your help.

  • This afternoon, I replaced this Nandflash with a wrong boot to a product that has been tested normally. This normal product is now also abnormal. I am more sure that there is a problem with the u-boot.img part of the Nandflash part.

  • Hi Fulin,

    fulin chen said:
    This afternoon, I replaced this Nandflash with a wrong boot to a product that has been tested normally. This normal product is now also abnormal. I am more sure that there is a problem with the u-boot.img part of the Nandflash part.

    thanks a good experiment and data point, so it's definitely pointing to the NAND device.

    Can you please try one more thing. You said you were able to read out and compare the u-boot.img NAND region from a broken unit and it looked good. As an extension to this, how about the following experiment:

    1. Use a "broken" unit that shows the boot failures
    2. Enter U-Boot shell
    3. Read u-boot.img into DDR (nand read 0x80200000 0x80000 0x1e0000)
    4. Erase that NAND region
    5. Re-program the DDR contents back into NAND (no access to SD card, etc!)

    The above steps should essentially "refresh" the NAND memory region that contains u-boot.img (0x80000-0x260000), using the same contents that's already there. Since you previously verified that the broken unit can read the NAND contents as expected the above experiment (read-erase-write back) should in theory also "fix" a broken unit. And if it works our issue might be with Flash data retention and/or ECC possibly, or a setup issue related to that.

    Also, are you writing to ENV during U-Boot and/or application usage? Your ENV region seems to start right after u-boot.img, as per your Kernel log 0x260000-0x280000). Maybe the ENV got corrupted due to frequent writes? If so you could try on a broken unit to just erase that ENV region and see if that makes any difference?

    Regards, Andreas