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.

Linux/AM4376: QSPI boot issue with jffs2 filesystem

Part Number: AM4376

Tool/software: Linux

Hello All,

We are using mx66l1g45g from macronix for booting.

We successfully boot from QSPI NOR flash but we get core dump while booting.

We are using linux kernel 4.9 from TI.

Root partition on QSPI NOR is 55 MB and rootfilesystem is around 35MB.

What are the possible reason for this?

Guide me to solve the issue.

Attachments:=

U-Boot 2017.01 (Jun 28 2018 - 12:50:59 +0530)

CPU  : AM437X-GP rev 1.2
I2C:   ready
DRAM:  512 MiB
PMIC:  TPS65218
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
SF: Detected mx66l1g45g with page size 256 Bytes, erase size 64 KiB, total 128 MiB, mapped at 30000000
*** Warning - bad CRC, using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Hit any key to stop autoboot:  0 
Booting from QSPI ...
SF: Detected mx66l1g45g with page size 256 Bytes, erase size 64 KiB, total 128 MiB, mapped at 30000000
device 0 offset 0x130000, size 0x308e50
SF: 3182160 bytes @ 0x130000 Read: OK
device 0 offset 0x100000, size 0xba20
SF: 47648 bytes @ 0x100000 Read: OK
Kernel image @ 0x82000000 [ 0x000000 - 0x308e50 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 89ff1000, end 89fffa1f ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.69-g9ce43c71ae (root@userpc) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11) ) #8 PREEMPT Tue J8
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: TI AM437x GP EVM
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 48 MiB at 0x9d000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM437x ES1.2 (neon)
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyO5,115200n8 spi-ti-qspi.enable_qspi=1 root=/dev/mtdblock6 rootfstype=jffs2
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 460028K/524288K available (6144K kernel code, 248K rwdata, 2044K rodata, 1024K init, 265K bss, 15108K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a3e310   ( 249 kB)
[    0.000000]        .bss : 0xc0a3e310 - 0xc0a8072c   ( 266 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
[    0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] OMAP L2C310: ROM does not support power control setting
[    0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000058] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000139] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000164] OMAP clocksource: timer1 at 24000000 Hz
[    0.001319] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[    0.001363] OMAP clocksource: 32k_counter at 32768 Hz
[    0.003047] Console: colour dummy device 80x30
[    0.003218] WARNING: Your 'console=ttyO5' has been replaced by 'ttyS5'
[    0.003237] This ensures that you still see kernel messages. Please
[    0.003244] update your kernel commandline.
[    0.003356] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
[    0.110725] pid_max: default: 32768 minimum: 301
[    0.111372] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.111403] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.116289] CPU: Testing write buffer coherency: ok
[    0.119105] Setting up static identity map for 0x80100000 - 0x80100060
[    0.123524] EFI services will not be available.
[    0.127135] devtmpfs: initialized
[    0.161848] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.163555] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.163712] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.188589] pinctrl core: initialized pinctrl subsystem
[    0.196972] NET: Registered protocol family 16
[    0.203935] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.320883] cpuidle: using governor ladder
[    0.350767] cpuidle: using governor menu
[    0.358379] omap_l3_noc 44000000.ocp: L3 debug error: target 8 mod:0 (unclearable)
[    0.358815] omap_l3_noc 44000000.ocp: L3 application error: target 8 mod:0 (unclearable)
[    0.377429] OMAP GPIO hardware version 0.1
[    0.410186] No ATAGs?
[    0.410391] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.410445] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.476006] edma 49000000.edma: TI EDMA DMA engine driver
[    0.491733] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c0_pins,e
[    0.492039] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c1_pins,e
[    0.492172] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c2_pins,e
[    0.492711] pps_core: LinuxPPS API ver. 1 registered
[    0.492742] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.492826] PTP clock support registered
[    0.492961] EDAC MC: Ver: 3.0.0
[    0.497739] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.505552] clocksource: Switched to clocksource timer1
[    0.536075] NET: Registered protocol family 2
[    0.539952] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.540238] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.540455] TCP: Hash tables configured (established 4096 bind 4096)
[    0.541068] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.541144] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.541915] NET: Registered protocol family 1
[    0.553508] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.568168] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.568668] ntfs: driver 2.1.32 [Flags: R/O].
[    0.569171] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
[    0.579239] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.579378] io scheduler noop registered
[    0.579395] io scheduler deadline registered
[    0.579730] io scheduler cfq registered (default)
[    0.594891] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
[    0.747492] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[    0.758333] omap8250 44e09000.serial: No clock speed specified: using default: 48000000
[    0.763834] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
[    0.766994] omap8250 48022000.serial: No clock speed specified: using default: 48000000
[    0.770950] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
[    0.772906] omap8250 48024000.serial: No clock speed specified: using default: 48000000
[    0.777033] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
[    0.778852] omap8250 481aa000.serial: No clock speed specified: using default: 48000000
[    0.782278] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 33, base_baud = 3000000) is a 8250
[    1.462936] console [ttyS5] enabled
[    1.473182] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.481046] [drm] Initialized
[    1.557776] brd: module loaded
[    1.593700] loop: module loaded
[    1.599853] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.624590] m25p80 spi0.0: mx66l1g45g (131072 Kbytes)
[    1.630477] 7 ofpart partitions found on MTD device spi0.0
[    1.636075] Creating 7 MTD partitions on "spi0.0":
[    1.640956] 0x000000000000-0x000000080000 : "QSPI.U_BOOT"
[    1.652193] 0x000000080000-0x000000100000 : "QSPI.U_BOOT.backup"
[    1.663291] 0x000000100000-0x000000110000 : "QSPI.U-BOOT-SPL_OS"
[    1.673594] 0x000000110000-0x000000120000 : "QSPI.U_BOOT_ENV"
[    1.683475] 0x000000120000-0x000000130000 : "QSPI.U-BOOT-ENV.backup"
[    1.694131] 0x000000130000-0x000000930000 : "QSPI.KERNEL"
[    1.704050] 0x000000930000-0x000004000000 : "QSPI.FILESYSTEM"
[    1.718028] libphy: Fixed MDIO Bus: probed
[    1.805943] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.812212] davinci_mdio 4a101000.mdio: detected phy mask fffffff3
[    1.824696] libphy: 4a101000.mdio: probed
[    1.829495] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver TI DP83848C 10/100 Mbps PHY
[    1.839449] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver TI DP83848C 10/100 Mbps PHY
[    1.853948] cpsw 4a100000.ethernet: Detected MACID = a0:f6:fd:6e:23:a7
[    1.861948] cpsw 4a100000.ethernet: device node lookup for pps timer failed
[    1.869423] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[    1.880413] cpsw 4a100000.ethernet: cpsw: Detected MACID = a0:f6:fd:6e:23:a9
[    1.893924] mousedev: PS/2 mouse device common for all mice
[    1.902015] i2c /dev entries driver
[    1.913915] cpuidle: enable-method property 'ti,am4372' found operations
[    2.004683] ledtrig-cpu: registered to indicate activity on CPUs
[    2.016246] NET: Registered protocol family 10
[    2.028604] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.038527] NET: Registered protocol family 17
[    2.044587] Key type dns_resolver registered
[    2.050453] omap_voltage_late_init: Voltage driver support not added
[    2.163179] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz
[    2.176781] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 100 kHz
[    2.188421] omap_i2c 4819c000.i2c: bus 2 rev0.12 at 100 kHz
[    2.215473] hctosys: unable to open rtc device (rtc0)
[    2.226128] evm_v3_3d: disabling
[    2.346238] random: fast init done
[    2.698137] VFS: Mounted root (jffs2 filesystem) readonly on device 31:6.
[    2.707882] devtmpfs: mounted
[    2.723590] Freeing unused kernel memory: 1024K
Starting logging: OK
Populating /dev using udev: [    4.225506] udevd[90]: starting version 3.2.5
[    4.480835] udevd[91]: starting eudev-3.2.5
[    7.143183] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    7.277244] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    7.402730] remoteproc remoteproc0: wkup_m3 is available
[    7.453028] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    7.664862] remoteproc remoteproc0: powering up wkup_m3
[    7.722579] remoteproc remoteproc0: Direct firmware load for am335x-pm-firmware.elf failed with error -2
[    7.808543] remoteproc remoteproc0: request_firmware failed: -2
[    7.814715] wkup_m3_ipc 44e11324.wkup_m3_ipc: rproc_boot failed
[    9.016240] omap-sham 53100000.sham: hw accel on OMAP rev 0.0
[    9.284179] omap-des 53701000.des: OMAP DES hw accel rev: 0.33
[    9.355379] omap-des 53701000.des: will run requests pump with realtime priority
[    9.413579] PM: Cannot get wkup_m3_ipc handle
[    9.437565] omap-aes 53501000.aes: OMAP AES hw accel rev: 0.1
[    9.456340] omap-aes 53501000.aes: will run requests pump with realtime priority
[    9.614378] PM: Cannot get wkup_m3_ipc handle
[   14.571416] PM: Cannot get wkup_m3_ipc handle
[   14.813255] usbcore: registered new interface driver usbfs
[   14.830766] usbcore: registered new interface driver hub
[   14.843333] usbcore: registered new device driver usb
[   14.958070] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[   14.964004] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
[   14.979649] xhci-hcd xhci-hcd.3.auto: hcc params 0x0238f06d hci version 0x100 quirks 0x02010010
[   14.991684] xhci-hcd xhci-hcd.3.auto: irq 157, io mem 0x483d0000
[   15.011651] hub 1-0:1.0: USB hub found
[   15.017364] hub 1-0:1.0: 1 port detected
[   15.024803] PM: Cannot get wkup_m3_ipc handle
[   15.035060] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[   15.035166] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 2
[   15.037557] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   15.060594] hub 2-0:1.0: USB hub found
[   15.060923] hub 2-0:1.0: 1 port detected
[   15.164387] PM: Cannot get wkup_m3_ipc handle
done
[   15.279512] ------------[ cut here ]------------
[   15.284526] WARNING: CPU: 0 PID: 142 at drivers/mtd/spi-nor/spi-nor.c:1178 spi_nor_write+0x13c/0x1a0
[   15.301428] Writing at offset 64 into a NOR page. Writing partial pages may decrease reliability and increase wear of NOR flash.[ :
 xhci_plat_hcd xhci_hcd usbcore dwc3 pm33xx omap_aes_driver omap_des des_generic crypto_engine omap_sham ti_emif_sram dwc3_omap extcop
[   15.335341] CPU: 0 PID: 142 Comm: touch Not tainted 4.9.69-g9ce43c71ae #8
[   15.343493] Hardware name: Generic AM43 (Flattened Device Tree)
[   15.349872] Backtrace: 
[   15.352747] [<c010b670>] (dump_backtrace) from [<c010b94c>] (show_stack+0x18/0x1c)
[   15.361266]  r7:00000009 r6:00000000 r5:c08a0af0 r4:dbed7bd8
[   15.368012] [<c010b934>] (show_stack) from [<c0395b90>] (dump_stack+0x24/0x28)
[   15.375426] [<c0395b6c>] (dump_stack) from [<c012c778>] (__warn+0xe8/0x100)
[   15.383373] [<c012c690>] (__warn) from [<c012c7d0>] (warn_slowpath_fmt+0x40/0x48)
[   15.391347]  r9:01afc040 r8:dbed7cd4 r7:00000044 r6:dbd30018 r5:00000000 r4:c08a0b74
[   15.399507] [<c012c794>] (warn_slowpath_fmt) from [<c04fe5e8>] (spi_nor_write+0x13c/0x1a0)
[   15.408158]  r3:00000040 r2:c08a0b74
[   15.411755]  r4:00000040
[   15.414385] [<c04fe4ac>] (spi_nor_write) from [<c04f6eb8>] (part_write+0x48/0x50)
[   15.422875]  r10:dbed7cd4 r9:00000000 r8:02503fc0 r7:00000000 r6:036d0000 r5:00000000
[   15.431238]  r4:00000044
[   15.433828] [<c04f6e70>] (part_write) from [<c04f3500>] (mtd_write+0x90/0xb4)
[   15.441520] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[   15.449505]  r5:00000000 r4:c04f6e70
[   15.453159] [<c04f3470>] (mtd_write) from [<c04f3b60>] (mtd_writev+0xa4/0x10c)
[   15.461532]  r9:00000001 r8:dbd4ac00 r7:dbed7dd0 r6:00000000 r5:00000000 r4:011cc040
[   15.469947] [<c04f3abc>] (mtd_writev) from [<c030c908>] (jffs2_flash_direct_writev+0x48/0x68)
[   15.478873]  r10:00000000 r9:00000044 r8:00000000 r7:00000001 r6:dbed7dd0 r5:011cc040
[   15.487343]  r4:dbde8a00
[   15.489955] [<c030c8c0>] (jffs2_flash_direct_writev) from [<c030e510>] (jffs2_flash_writev+0x2ec/0x4d0)
[   15.500049]  r8:dc2a5708 r7:dbde8a00 r6:dbde8a00 r5:00000000 r4:011cc040
[   15.507257] [<c030e224>] (jffs2_flash_writev) from [<c0306b4c>] (jffs2_write_dnode+0x118/0x34c)
[   15.516806]  r10:00000000 r9:00000044 r8:dc2a5708 r7:dbde8a00 r6:db8e3210 r5:db933200
[   15.524682]  r4:011cc040
[   15.527878] [<c0306a34>] (jffs2_write_dnode) from [<c030b918>] (jffs2_do_setattr+0x290/0x58c)
[   15.536813]  r10:00000000 r9:dbed7ec8 r8:00000000 r7:00000000 r6:00000000 r5:db933200
[   15.544675]  r4:dc2a5730
[   15.547591] [<c030b688>] (jffs2_do_setattr) from [<c030bc40>] (jffs2_setattr+0x2c/0x50)
[   15.555879]  r10:dbed7ec8 r9:00000000 r8:dbed7ec4 r7:dc2aa6e8 r6:dbed7e88 r5:dc2a5730
[   15.563746]  r4:dbed7ec8
[   15.566702] [<c030bc14>] (jffs2_setattr) from [<c0234120>] (notify_change+0x1fc/0x3d8)
[   15.574657]  r5:dc2a5730 r4:00020070
[   15.578748] [<c0233f24>] (notify_change) from [<c024869c>] (utimes_common+0xb8/0x16c)
[   15.587326]  r10:00000000 r9:00000000 r8:be946f85 r7:00000000 r6:dbed7f28 r5:dc2a5794
[   15.595324]  r4:00000000
[   15.598589] [<c02485e4>] (utimes_common) from [<c02487f8>] (do_utimes+0xa8/0x138)
[   15.606484]  r7:ffffff9c r6:00000000 r5:00000000 r4:00000001
[   15.612191] [<c0248750>] (do_utimes) from [<c0248a40>] (SyS_futimesat+0xdc/0x108)
[   15.620854]  r9:dbed6000 r8:c0107d84 r7:0000010d r6:00000000 r5:be946f85 r4:ffffff9c
[   15.629516] [<c0248964>] (SyS_futimesat) from [<c0248a88>] (SyS_utimes+0x1c/0x20)
[   15.638338]  r6:00000000 r5:be946ca8 r4:be946ea8
[   15.643239] [<c0248a6c>] (SyS_utimes) from [<c0107bc0>] (ret_fast_syscall+0x0/0x48)
[   15.677606] ---[ end trace 1f790dd4896b5c68 ]---
Initializing random number generator... [   15.811992] PM: Cannot get wkup_m3_ipc handle
[   15.881537] cdc_acm 1-1:1.2: ttyACM0: USB ACM device
[   15.948247] usbcore: registered new interface driver cdc_acm
[   15.954148] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   15.992684] PM: Cannot get wkup_m3_ipc handle
[   16.079362] usbcore: registered new interface driver cdc_ether
[   16.129015] PM: Cannot get wkup_m3_ipc handle
[   16.148663] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-xhci-hcd.3.auto-1, RNDIS device, 7a:0b:ce:ea:83:e5
[   16.173171] PM: Cannot get wkup_m3_ipc handle
[   16.194168] usbcore: registered new interface driver rndis_host
done.
Starting network: [   17.102446] net eth0: initializing cpsw version 1.15 (0)
[   17.123347] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[   17.136452] cpsw 4a100000.ethernet: ALE Table size 1024
[   17.236072] TI DP83848C 10/100 Mbps PHY 4a101000.mdio:02: attached PHY driver [TI DP83848C 10/100 Mbps PHY] (mii_bus:phy_addr=4a10)
[   17.270098] cpts ptp bc clkid 0
[   17.282435] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

8867.linux_config.txt

Regards,

Dhananjay