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.

AM3358: AM335x accidental Unable to mount UBI file system from nand flash, and cannot be automatically restored after it appears.

Part Number: AM3358
Other Parts Discussed in Thread: DA8XX, TPS65910

Hello everyone,

The previous file system saved on the SD card may be damaged, so a backup plan is proposed to backup some important data from the SD card to flash, and the file system is also transferred to flash.

We create UBI file system on NAND flash as linux root filesystem,and added a partition on NAND Flash for backup purposes.

It works several days, suddenly one day after we reboot, the kernel cannot mount ubi filesystem, I got following errors in kernel log:

Welcome to use DM3359 Board!

 

U-Boot SPL 2011.09-svn206239 (Aug 16 2023 - 14:06:49)

Texas Instruments Revision detection unimplemented

 

***DDR3 init9!***

 

***DDR3 phy init,enable VTP begain!***

 

***DDR3 phy init,enable VTP over!***

 

***DDR3 phy init over!***

 

***DDR3 reset!***

 

***DDR3 CKE!***

 

***DDR3 init over!***

Power:65910

boot from NAND...

-------jakcy off:80000  addr:807fffc0

 

U-Boot 2011.09-svn206239 (Aug 16 2023 - 14:06:49)

 

TIUnknown cpu type-GP rev 1.2

 

I2C:   ready

DRAM:  512 MiB

NAND:  HW ECC BCH8 Selected

512 MiB

MMC:   OMAP SD/MMC: 0

*** Warning - bad CRC, using default environment

 

Net:   cpsw

 

##### DiMai BIOS for DM3359 #####

This Board: SDRAM is 256MB;

### ----main_loop entered: bootdelay=0

 

### ---main_loop: bootcmd="run nand_boot;"

-----Hit any key to stop autoboot:  0

 

 GPIO0_18 = 0

setting bootargs ...

bootargs=console=ttyO0,115200n8 androidboot.console=ttySAC0 root=ubi0:rootfs rootfstype=ubifs ubi.mtd=8,2048 ro rootwait=1 init=/init ip=off lcd=X800Y600 uart1_d_can=d_can uart2_i2c2=uart2

Booting from nand ...

HW ECC BCH8 Selected

cmd= bootm 0x80007fc0

start load kernel

## Booting kernel from Legacy Image at 80007fc0 ...

   Image Name:   Linux-3.2.0-DM-svn206594

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3702504 Bytes = 3.5 MiB

   Load Address: 80008000

   Entry Point:  80008000

   Verifying Checksum ... OK

   XIP Kernel Image ... OK

OK

 

Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

[    0.000000] Linux version 3.2.0-DM-svn206594 (zhangjunwei@poct_hudson) #10 Thu Aug 17 15:48:16 CST 2023

[    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: dm3359

[    0.000000] Memory policy: ECC disabled, Data cache writeback

[    0.000000] AM335X ES1.0 (sgx neon )

[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048

[    0.000000] Kernel command line: console=ttyO0,115200n8 androidboot.console=ttySAC0 root=ubi0:rootfs rootfstype=ubifs ubi.mtd=8,2048 ro rootwait=1 init=/init ip=off lcd=X800Y600 uart1_d_can=d_can uart2_i2c2=uart2

[    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: 512MB = 512MB total

[    0.000000] Memory: 510136k/510136k available, 14152k reserved, 0K highmem

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)

[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)

[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)

[    0.000000]       .text : 0xc0008000 - 0xc06aa000   (6792 kB)

[    0.000000]       .init : 0xc06aa000 - 0xc0758000   ( 696 kB)

[    0.000000]       .data : 0xc0758000 - 0xc07ad760   ( 342 kB)

[    0.000000]        .bss : 0xc07ad784 - 0xc0963118   (1751 kB)

[    0.000000] NR_IRQS:396

[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts

[    0.000000] Total of 128 interrupts on 1 active controller

[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz

[    0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz

[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms

[    0.000000] Console: colour dummy device 80x30

[    0.000221] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)

[    0.058828] pid_max: default: 32768 minimum: 301

[    0.058987] Security Framework initialized

[    0.059064] Mount-cache hash table entries: 512

[    0.059490] CPU: Testing write buffer coherency: ok

[    0.060370] devtmpfs: initialized

[    0.080310] omap_hwmod: gfx: failed to hardreset

[    0.096809] omap_hwmod: pruss: failed to hardreset

[    0.098759] print_constraints: dummy:

[    0.099184] NET: Registered protocol family 16

[    0.101658] OMAP GPIO hardware version 0.1

[    0.104984] omap_mux_init: Add partition: #1: core, flags: 0

[    0.107634]  da8xx_lcdc.0: alias fck already exists

[    0.107904] TSC connected to beta GP EVM

[    0.108363]  omap_i2c.1: alias fck already exists

[    0.108993] after tq335x_nand_config ecc_opt=4

[    0.109697]  omap_hsmmc.0: alias fck already exists

[    0.110480]  d_can.0: alias fck already exists

[    0.111109] _omap_mux_get_by_name: Could not find signal MCASP0_AXR0.gpio3_16

[    0.112528]  omap2_mcspi.1: alias fck already exists

[    0.112787]  omap2_mcspi.2: alias fck already exists

[    0.113090]  edma.0: alias fck already exists

[    0.113117]  edma.0: alias fck already exists

[    0.113141]  edma.0: alias fck already exists

[    0.148670] bio: create slab <bio-0> at 0

[    0.151098] SCSI subsystem initialized

[    0.153389] usbcore: registered new interface driver usbfs

[    0.153788] usbcore: registered new interface driver hub

[    0.154042] usbcore: registered new device driver usb

[    0.154383] registerd cppi-dma Intr @ IRQ 17

[    0.154401] Cppi41 Init Done Qmgr-base(e083a000) dma-base(e0838000)

[    0.154415] Cppi41 Init Done

[    0.154446] musb-ti81xx musb-ti81xx: musb0, board_mode=0x11, plat_mode=0x1

[    0.154768] musb-ti81xx musb-ti81xx: musb1, board_mode=0x11, plat_mode=0x1

[    0.156350] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz

[    0.157359] tps65910 1-002d: JTAGREVNUM 0x1

[    0.158104] tps65910 1-002d: No interrupt support, no core IRQ

[    0.159996] warn Power up reset detected.

[    0.165230] cfg80211: Calling CRDA to update world regulatory domain

[    0.166617] Switching to clocksource gp timer

[    0.166849] FS-Cache: Loaded

[    0.167221] CacheFiles: Loaded

[    0.188438] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)

[    0.188595] musb-hdrc musb-hdrc.0: dma type: dma-cppi41

[    0.189405] musb-hdrc musb-hdrc.0: MUSB HDRC host driver

[    0.189515] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1

[    0.189676] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

[    0.189697] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    0.189716] usb usb1: Product: MUSB HDRC host driver

[    0.189731] usb usb1: Manufacturer: Linux 3.2.0-DM-svn206594 musb-hcd

[    0.189748] usb usb1: SerialNumber: musb-hdrc.0

[    0.190820] hub 1-0:1.0: USB hub found

[    0.190857] hub 1-0:1.0: 1 port detected

[    0.191540] musb-hdrc musb-hdrc.0: USB Host mode controller at e081c000 using DMA, IRQ 18

[    0.191742] musb-hdrc musb-hdrc.1: dma type: dma-cppi41

[    0.192528] musb-hdrc musb-hdrc.1: MUSB HDRC host driver

[    0.192590] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2

[    0.192710] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002

[    0.192732] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    0.192750] usb usb2: Product: MUSB HDRC host driver

[    0.192765] usb usb2: Manufacturer: Linux 3.2.0-DM-svn206594 musb-hcd

[    0.192782] usb usb2: SerialNumber: musb-hdrc.1

[    0.193791] hub 2-0:1.0: USB hub found

[    0.193823] hub 2-0:1.0: 1 port detected

[    0.194471] musb-hdrc musb-hdrc.1: USB Host mode controller at e081e800 using DMA, IRQ 19

[    0.194988] NET: Registered protocol family 2

[    0.195224] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)

[    0.195607] TCP established hash table entries: 16384 (order: 5, 131072 bytes)

[    0.195969] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)

[    0.196180] TCP: Hash tables configured (established 16384 bind 16384)

[    0.196197] TCP reno registered

[    0.196214] UDP hash table entries: 256 (order: 0, 4096 bytes)

[    0.196244] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

[    0.196515] NET: Registered protocol family 1

[    0.196905] RPC: Registered named UNIX socket transport module.

[    0.196923] RPC: Registered udp transport module.

[    0.196936] RPC: Registered tcp transport module.

[    0.196948] RPC: Registered tcp NFSv4.1 backchannel transport module.

[    0.197197] NetWinder Floating Point Emulator V0.97 (double precision)

[    0.197432] omap-gpmc omap-gpmc: GPMC revision 6.0

[    0.197455] Registering NAND on CS0

[    0.350182] ashmem: initialized

[    0.351482] nfs4filelayout_init: NFSv4 File Layout Driver Registering...

[    0.351517] NTFS driver 2.1.30 [Flags: R/W].

[    0.352093] fuse init (API version 7.17)

[    0.353017] yaffs: yaffs built Aug 15 2023 15:40:52 Installing.

[    0.353083] msgmni has been set to 996

[    0.356107] alg: No test for stdrng (krng)

[    0.356593] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)

[    0.356618] io scheduler noop registered

[    0.356631] io scheduler deadline registered

[    0.356787] io scheduler cfq registered (default)

[    0.358507] da8xx_lcdc da8xx_lcdc.0: GLCD: Found DM_lcd panel

[    0.363198]   [KERNEL_DEBUG:]  lcd_clk =0x11e1a300

[    0.363212]   [KERNEL_DEBUG:]  lcd_div =0x9

[    0.363224]   [KERNEL_DEBUG:]  lcd_revision == LCD_VERSION_2 

[    0.363243]   [KERNEL_DEBUG:]  back_porch18,front_porch12,pulse_width8 

[    0.363260]   [KERNEL_DEBUG:]  back_porch24,front_porch32,pulse_width20 

[    0.363279]   [KERNEL_DEBUG:]  width=800 

[    0.363292]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_0_REG-reg=0x18205310 

[    0.363306]   [KERNEL_DEBUG:]  height=600 

[    0.363318]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_1_REG-reg=0x120c2257 

[    0.363402]   [KERNEL_DEBUG:]  LCD_RASTER_CTRL_REG=0x80080

[    0.363416]   [KERNEL_DEBUG:]  LCD_CTRL_REG=0x901

[    0.363429]   [KERNEL_DEBUG:]  LCD_DMA_CTRL_REG=0x40

[    0.363442]   [KERNEL_DEBUG:]  LCD_CLK_ENABLE_REG=0x7

[    0.363455]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_0_REG=0x18205310

[    0.363470]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_1_REG=0x120c2257

[    0.363484]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_2_REG=0x230ff00

[    0.363499]   [KERNEL_DEBUG:]  LCD_INT_ENABLE_SET_REG=0x20

[    0.363512]   [KERNEL_DEBUG:]  LCD_RAW_STAT_REG=0x0

[    0.365534]   [KERNEL_DEBUG:]  lcd_clk =0x11e1a300

[    0.365547]   [KERNEL_DEBUG:]  lcd_div =0x9

[    0.365557]   [KERNEL_DEBUG:]  lcd_revision == LCD_VERSION_2 

[    0.365574]   [KERNEL_DEBUG:]  back_porch18,front_porch12,pulse_width8 

[    0.365590]   [KERNEL_DEBUG:]  back_porch24,front_porch32,pulse_width20 

[    0.365606]   [KERNEL_DEBUG:]  width=800 

[    0.365617]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_0_REG-reg=0x18205310 

[    0.365630]   [KERNEL_DEBUG:]  height=600 

[    0.365641]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_1_REG-reg=0x120c2257 

[    0.365656]   [KERNEL_DEBUG:]  LCD_RASTER_CTRL_REG=0x80080

[    0.365668]   [KERNEL_DEBUG:]  LCD_CTRL_REG=0x901

[    0.365679]   [KERNEL_DEBUG:]  LCD_DMA_CTRL_REG=0x40

[    0.365691]   [KERNEL_DEBUG:]  LCD_CLK_ENABLE_REG=0x7

[    0.365702]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_0_REG=0x18205310

[    0.365715]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_1_REG=0x120c2257

[    0.365728]   [KERNEL_DEBUG:]  LCD_RASTER_TIMING_2_REG=0x230ff00

[    0.365741]   [KERNEL_DEBUG:]  LCD_INT_ENABLE_SET_REG=0x20

[    0.365753]   [KERNEL_DEBUG:]  LCD_RAW_STAT_REG=0x0

[    0.374136] Console: switching to colour frame buffer device 100x37

[    0.396105] omap_uart.0: ttySAC0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0

[    1.310915] console [ttyO0] enabled

[    1.315354] omap_uart.1: ttySAC1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1

[    1.323544] omap_uart.2: ttySAC2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2

[    1.331700] omap_uart.3: ttySAC3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3

[    1.339789] omap_uart.4: ttySAC4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4

[    1.347932] omap_uart.5: ttySAC5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5

[    1.356504] Register led successfully!

[    1.371969] brd: module loaded

[    1.381288] loop: module loaded

[    1.387200] SCSI Media Changer driver v0.25

[    1.393050] mtdoops: mtd device (mtddev=name/number) must be supplied

[    1.400514] omap2-nand driver initializing

[    1.405159] ONFI flash detected

[    1.408590] ONFI param page 0 valid

[    1.412241] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron MT29F4G08ABADAWP)

[    1.420621] ***** ecc_opt = 4 ecc_mode = 2 mtd.oobsize = 64

[    1.426443] ***** oob_offset = 58 oob_length = 6

[    1.431644] Creating 10 MTD partitions on "omap2-nand.0":

[    1.437333] 0x000000000000-0x000000020000 : "SPL"

[    1.444134] 0x000000020000-0x000000040000 : "SPL.backup1"

[    1.451519] 0x000000040000-0x000000060000 : "SPL.backup2"

[    1.458866] 0x000000060000-0x000000080000 : "SPL.backup3"

[    1.466027] 0x000000080000-0x000000260000 : "U-Boot"

[    1.473577] 0x000000260000-0x000000280000 : "U-Boot Env"

[    1.480722] 0x000000280000-0x000000580000 : "LOGO"

[    1.488648] 0x000000580000-0x000000f80000 : "Kernel"

[    1.499558] 0x000000f80000-0x00000af80000 : "root"

[    1.571249] usb 1-1: new high-speed USB device number 2 using musb-hdrc

[    1.579886] 0x00000af80000-0x000020000000 : "cache"

[    1.727496] UBI: attaching mtd8 to ubi0

[    1.731521] UBI: physical eraseblock size:   131072 bytes (128 KiB)

[    1.738107] UBI: logical eraseblock size:    126976 bytes

[    1.743755] UBI: smallest flash I/O unit:    2048

[    1.748684] UBI: VID header offset:          2048 (aligned 2048)

[    1.754961] UBI: data offset:                4096

[    1.818606] usb 1-1: New USB device found, idVendor=0424, idProduct=2514

[    1.825621] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[    1.866916] hub 1-1:1.0: USB hub found

[    1.871796] hub 1-1:1.0: 4 ports detected

[    1.937536] slab error in kmem_cache_destroy(): cache `ubi_scan_leb_slab': Can't free all objects

[    1.946830] Backtrace:

[    1.949421] [<c00172e8>] (dump_backtrace+0x0/0x110) from [<c05014b8>] (dump_stack+0x18/0x1c)

[    1.958252]  r7:dfabedcc r6:dfa6e000 r5:dfabedc0 r4:dfac0ec0

[    1.964208] [<c05014a0>] (dump_stack+0x0/0x1c) from [<c00a0dcc>] (kmem_cache_destroy+0x8c/0xfc)

[    1.973335] [<c00a0d40>] (kmem_cache_destroy+0x0/0xfc) from [<c0307758>] (ubi_scan+0x2a4/0x2c8)

[    1.982442]  r5:dfabedc0 r4:000000b2

[    1.986193] [<c03074b4>] (ubi_scan+0x0/0x2c8) from [<c02fca28>] (attach_by_scanning+0x14/0xc4)

[    1.995224] [<c02fca14>] (attach_by_scanning+0x0/0xc4) from [<c02fd2fc>] (ubi_attach_mtd_dev+0x1bc/0x48c)

[    2.005237]  r7:dfaa7c00 r6:00000000 r5:00000000 r4:dfa6e000

[    2.011206] [<c02fd140>] (ubi_attach_mtd_dev+0x0/0x48c) from [<c06c76c4>] (ubi_init+0x120/0x22c)

[    2.020403]  r8:c0755ef8 r7:00000000 r6:dfaa7c00 r5:c0755efc r4:00000000

[    2.027460] [<c06c75a4>] (ubi_init+0x0/0x22c) from [<c0008654>] (do_one_initcall+0xb0/0x180)

[    2.036301] [<c00085a4>] (do_one_initcall+0x0/0x180) from [<c06aa304>] (kernel_init+0x80/0x124)

[    2.045425] [<c06aa284>] (kernel_init+0x0/0x124) from [<c003da74>] (do_exit+0x0/0x29c)

[    2.053713]  r5:c06aa284 r4:00000000

[    2.057555] UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -117

[    2.065624] UBI error: ubi_init: cannot attach mtd8

[    2.073089] CAN device driver interface

[    2.077148] CAN bus driver for Bosch D_CAN controller 1.0

[    2.083779] d_can d_can.0: device registered (irq=52, irq_obj=53)

[    2.136676] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6

[    2.143143] davinci_mdio davinci_mdio.0: detected phy mask fffffffe

[    2.150538] davinci_mdio.0: probed

[    2.154100] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720

[    2.162877] PPP generic driver version 2.4.2

[    2.167893] PPP BSD Compression module registered

[    2.172813] PPP Deflate Compression module registered

[    2.178881] PPP MPPE Compression module registered

[    2.183910] NET: Registered protocol family 24

[    2.188990] usbcore: registered new interface driver rndis_wlan

[    2.195413] usbcore: registered new interface driver asix

[    2.201302] usbcore: registered new interface driver cdc_ether

[    2.207685] usbcore: registered new interface driver net1080

[    2.213803] usbcore: registered new interface driver rndis_host

[    2.220210] usbcore: registered new interface driver cdc_subset

[    2.226583] usbcore: registered new interface driver zaurus

[    2.232482] cdc_ncm: 04-Aug-2011

[    2.236058] usbcore: registered new interface driver cdc_ncm

[    2.242401] usbcore: registered new interface driver hwa-rc

[    2.249927] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

[    2.257241] usbcore: registered new interface driver hwa-hc

[    2.263406] usbcore: registered new interface driver cdc_acm

[    2.269361] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

[    2.277890] usb 2-1: new high-speed USB device number 2 using musb-hdrc

[    2.285047] usbcore: registered new interface driver usblp

[    2.291023] usbcore: registered new interface driver cdc_wdm

[    2.297189] usbcore: registered new interface driver usbtmc

[    2.303215] usbcore: registered new interface driver uas

[    2.308804] Initializing USB Mass Storage driver...

[    2.314240] usbcore: registered new interface driver usb-storage

[    2.320545] USB Mass Storage support registered.

[    2.325657] usbcore: registered new interface driver libusual

[    2.331886] usbcore: registered new interface driver ums-alauda

[    2.338284] usbcore: registered new interface driver ums-cypress

[    2.344750] usbcore: registered new interface driver ums-datafab

[    2.351245] usbcore: registered new interface driver ums_eneub6250

[    2.357970] usbcore: registered new interface driver ums-freecom

[    2.364450] usbcore: registered new interface driver ums-isd200

[    2.370859] usbcore: registered new interface driver ums-jumpshot

[    2.377440] usbcore: registered new interface driver ums-karma

[    2.383737] usbcore: registered new interface driver ums-onetouch

[    2.390345] usbcore: registered new interface driver ums-realtek

[    2.396841] usbcore: registered new interface driver ums-sddr09

[    2.403231] usbcore: registered new interface driver ums-sddr55

[    2.409638] usbcore: registered new interface driver ums-usbat

[    2.416179] usbcore: registered new interface driver usbserial

[    2.422576] USB Serial support registered for generic

[    2.436875] usb 2-1: New USB device found, idVendor=0424, idProduct=2514

[    2.443892] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[    2.452423] hub 2-1:1.0: USB hub found

[    2.456421] hub 2-1:1.0: 4 ports detected

[    2.461904] usbcore: registered new interface driver usbserial_generic

[    2.468778] usbserial: USB Serial Driver core

[    2.473535] USB Serial support registered for GSM modem (1-port)

[    2.480372] usbcore: registered new interface driver option

[    2.486210] option: v0.7.2:USB Driver for GSM modems

[    2.492124] mousedev: PS/2 mouse device common for all mice

[    2.498528] input: gpio-keys as /devices/platform/gpio-keys/input/input0

[    2.506429] ti resistance touch screen!

[    2.511211] input: Resistance_ts as /devices/platform/omap/tsc/input/input1

[    2.520095] i2c /dev entries driver

[    2.525074] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec

[    2.531715] _regulator_get: deviceless supply vdd_mpu not found, using dummy regulator

[    2.540598] cpuidle: using governor ladder

[    2.545536] cpuidle: using governor menu

[    2.552087] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400

[    2.559597] usbcore: registered new interface driver vub300

[    2.565852] usbcore: registered new interface driver ushc

[    2.573962] usbcore: registered new interface driver usbhid

[    2.579826] usbhid: USB HID core driver

[    2.584659] logger: created 256K log 'log_main'

[    2.589741] logger: created 256K log 'log_events'

[    2.594983] logger: created 256K log 'log_radio'

[    2.603188] logger: created 256K log 'log_system'

[    2.608602] oprofile: hardware counters not available

[    2.613919] oprofile: using timer interrupt.

[    2.618440] nf_conntrack version 0.5.0 (7970 buckets, 31880 max)

[    2.625393] ip_tables: (C) 2000-2006 Netfilter Core Team

[    2.631176] TCP cubic registered

[    2.634556] NET: Registered protocol family 17

[    2.639256] can: controller area network core (rev 20090105 abi 8)

[    2.645847] NET: Registered protocol family 29

[    2.650540] can: raw protocol (rev 20090105)

[    2.655010] can: broadcast manager protocol (rev 20090105 t)

[    2.661697] sctp: Hash tables configured (established 16384 bind 32768)

[    2.668828] lib80211: common routines for IEEE802.11 drivers

[    2.675945] Registering the dns_resolver key type

[    2.681003] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3

[    2.689050] ThumbEE CPU extension supported.

[    2.693580] mux: Failed to setup hwmod io irq -22

[    2.699247] Power Management for AM33XX family

[    2.704123] Trying to load am335x-pm-firmware.bin (60 secs timeout)

[    2.710844] Copied the M3 firmware to UMEM

[    2.715143] omap_hwmod: wkup_m3: wkup_m3: hwmod data error: OMAP4 does not support st_shift

[    2.726127] Detected MACID=58:2b:a:1:77:24

[    2.731860] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

[    2.738942] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)

[    2.746314] Please append a correct "root=" boot option; here are the available partitions:

[    2.755127] 1f00             128 mtdblock0  (driver?)

[    2.760436] 1f01             128 mtdblock1  (driver?)

[    2.765723] 1f02             128 mtdblock2  (driver?)

[    2.771032] 1f03             128 mtdblock3  (driver?)

[    2.776318] 1f04            1920 mtdblock4  (driver?)

[    2.781619] 1f05             128 mtdblock5  (driver?)

[    2.786921] 1f06            3072 mtdblock6  (driver?)

[    2.792210] 1f07           10240 mtdblock7  (driver?)

[    2.797511] 1f08          163840 mtdblock8  (driver?)

[    2.802800] 1f09          344576 mtdblock9  (driver?)

[    2.808106] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

[    2.816759] Backtrace:

[    2.819351] [<c00172e8>] (dump_backtrace+0x0/0x110) from [<c05014b8>] (dump_stack+0x18/0x1c)

[    2.828191]  r7:c06d6f20 r6:00008001 r5:c07ae750 r4:c07ae750

[    2.834138] [<c05014a0>] (dump_stack+0x0/0x1c) from [<c0501520>] (panic+0x64/0x18c)

[    2.842180] [<c05014bc>] (panic+0x0/0x18c) from [<c06aae04>] (mount_block_root+0x1dc/0x21c)

[    2.850924]  r3:00000000 r2:00000000 r1:df82df70 r0:c06034ef

[    2.856886] [<c06aac28>] (mount_block_root+0x0/0x21c) from [<c06aafa4>] (prepare_namespace+0x94/0x1cc)

[    2.866627] [<c06aaf10>] (prepare_namespace+0x0/0x1cc) from [<c06aa374>] (kernel_init+0xf0/0x124)

[    2.875920]  r5:c0757940 r4:c07ad7c0

[    2.879713] [<c06aa284>] (kernel_init+0x0/0x124) from [<c003da74>] (do_exit+0x0/0x29c)

[    2.888010]  r5:c06aa284 r4:00000000

So, Could you please help us to analyze what caused this problem - unable to mount UBI file system from nand flash?

Best regards,

Junwei

  • Looks like something fails during ubi mounting, which then leads the Kernel being unable to mount the roots, and the boot to fail.

    I noticed you are using a very old Kernel and software stack. Much has happened since, and the driver stack has been much improved, including around MTD/Flash handling. Can you see if you can re-create the issue based on our current production software stack? It's based on Kernel 6.1... See https://www.ti.com/tool/PROCESSOR-SDK-AM335X

    Regards, Andreas

  • Hello Andreas, if we upgrading to the latest kernel version, the change momentum is too large, and will bring relatively high risks to the project.

    Could you provide some suggestions based on the current kernel version_3.2.0 ?  Is it possible that our partition scheme is causing this problem?

    B & R, Junwei

  • if we upgrading to the latest kernel version, the change momentum is too large, and will bring relatively high risks to the project.

    Understood but how about you do a "quick / minimum" port just for the sake of running some Flash related experiments.

    Could you provide some suggestions based on the current kernel version_3.2.0 ?  Is it possible that our partition scheme is causing this problem?

    Hard to say. I don't see a specific reason for your UBI scan fail in your log, like you can see in other cases that are similar like this one here: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/268306/am335x-ubifs-nand-boot-problem?AM335x-UBIFS-NAND-boot-problem (in that case the Kernel log contains UBI error: process_eb: bad image sequence number 2011098337 in PEB 1307, expected 50675805 right before the crash dump).

    You could use a JTAG debugger to halt in the function ubi_scan() and step through the code to see how/why it fails, and from that you may be able to think of a way how to fix it. Or instrument that function/sub-functions using some type of printk() tracing.

    Regards, Andreas

  • Thanks a lot, now we have a  big difficult point in reproducing the problem on-site, so it's hard to debug.

    I will try as you mentioned, thank you again!

    B & R, Junwei

  • Hi Junwei,

    I will try as you mentioned, thank you again!

    Ok no problem. The "easiest" usually is to just try the latest Kernel as there have been many improvements in that MTD sub-system, especially considering your current Kernel is rather old. Debugging a very old Kernel you may just find out about an issue that was fixed already upstream... And even if you then fix this one issue, there will be other issues potentially, that a more current Kernel has fixed, but that you are perhaps yet to run into on your old Kernel... Just something to think about that shows the value of an experiment w/ latest Kernel.

    Either way, please feel free to come back here with additional findings you may have.

    Regards, Andreas