[LEDE-DEV] mt7621 Persistent FS issue with 4.9 kernel

K.Mani sailormani at gmail.com
Tue May 23 03:10:57 PDT 2017


Mediatek board 'mt7621' boots successfully on LEDE 4.9 kernel with
'mt7621-initramfs-kernel.bin'.
But when I flash 'squashfs-sysupgrade.bin' to get persistence storage
the image crashes leading to reboot.
Both the images are flashed from u-boot prompt.

SPI-Nor flash is detected successfully but, but kernel fails to detect
'SQUASHFS_MAGIC' with error 'no squashfs found'
Can someone guide me.

Excerpts of the log:

[    0.000000] Kernel command line: console=ttyS0,57600
root=/dev/mtdblock4 noinitrd rootfstype=squashfs,jffs2

[    0.610000] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
[    0.630000] spi32766.0: parsing partitions cmdlinepart
[    0.640000] spi32766.0: parsing partitions ofpart
[    0.640000] 5 ofpart partitions found on MTD device spi32766.0
[    0.660000] Creating 5 MTD partitions on "spi32766.0":
[    0.670000] 0x000000000000-0x000000030000 : "Bootloader"
[    0.680000] 0x000000030000-0x000000040000 : "Config"
[    0.690000] 0x000000040000-0x000000050000 : "Factory"
[    0.700000] 0x000000050000-0x000001000000 : "Firmware"
[    0.710000] 0x0000001cc291-0x000001000000 : "rootfs"
[    0.720000] mtd: device 4 (rootfs) set to be root filesystem
[    0.740000] rootfs: @2.parsing partitions 1
[    0.740000] ------------[ cut here ]------------
[    0.750000] WARNING: CPU: 0 PID: 1 at drivers/spi/spi-mt7621.c:214
mt7621_spi_transfer_one_message+0x28c/0x61c
[    0.770000] Modules linked in:
[    0.780000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.20 #0
[    0.780000] Stack : 00000000 00000000 80517b2a 00000033 803db924
00000000 00000000 80510000
[    0.780000]         87c3831c 804bd207 804539d0 00000000 00000001
80513824 00000030 00010000
[    0.780000]         00000001 800696b0 00000001 80510000 804c3144
804c3148 804585fc 87c2b6cc
[    0.780000]         00000003 800a3d18 00000030 00010000 00000001
00000000 eeeff572 00c2b6cc
[    0.780000]         00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
[    0.780000]         ...
[    0.780000] Call Trace:
[    0.780000] [<8000f640>] show_stack+0x50/0x84
[    0.780000] [<801cf924>] dump_stack+0x84/0xc0
[    0.780000] [<8002a124>] __warn+0xe4/0x118
[    0.780000] [<8002a1ec>] warn_slowpath_null+0x1c/0x30
[    0.780000] [<8028d14c>] mt7621_spi_transfer_one_message+0x28c/0x61c
[    0.780000] [<8028b7c8>] __spi_pump_messages+0x4d4/0x530
[    0.780000] [<8028c8d0>] __spi_sync+0x170/0x1b4
[    0.780000] [<8028c944>] spi_sync+0x30/0x58
[    0.780000] [<8026aba4>] m25p80_read+0x23c/0x298
[    0.780000] [<80274920>] spi_nor_read+0xc0/0x174
[    0.780000] [<8025cfa8>] part_read+0x60/0xb0
[    0.780000] [<8025a494>] mtd_read+0x7c/0xc4
[    0.780000] [<80260678>] mtd_get_squashfs_len+0x48/0x10c
[    0.780000] [<80260b20>] mtdsplit_parse_squashfs+0x30/0x1e0
[    0.780000] [<8025e314>] parse_mtd_partitions_by_type+0x100/0x170
[    0.780000] [<8025e6e4>] run_parsers_by_type+0x24/0xcc
[    0.780000] [<8025e4e8>] mtd_partition_split.part.0+0x5c/0xd0
[    0.780000] [<8025e884>] add_mtd_partitions+0xf8/0x15c
[    0.780000] [<8025aacc>] mtd_device_parse_register+0x120/0x1f8
[    0.780000] [<8026a7b8>] m25p_probe+0x13c/0x160
[    0.780000] [<802486e4>] driver_probe_device+0x140/0x290
[    0.780000] [<80246bb0>] bus_for_each_drv+0xa0/0xb0
[    0.780000] [<80248530>] __device_attach+0x8c/0xe4
[    0.780000] [<80247aa8>] bus_probe_device+0x3c/0xb0
[    0.780000] [<80245bf4>] device_add+0x468/0x560
[    0.780000] [<8028a770>] spi_add_device+0x118/0x16c
[    0.780000] [<8028c050>] spi_register_master+0x4dc/0x77c
[    0.780000] [<8024a124>] platform_drv_probe+0x40/0x88
[    0.780000] [<802486e4>] driver_probe_device+0x140/0x290
[    0.780000] [<802488c0>] __driver_attach+0x8c/0xc4
[    0.780000] [<80246aec>] bus_for_each_dev+0x9c/0xac
[    0.780000] [<80247d28>] bus_add_driver+0xec/0x20c
[    0.780000] [<80249038>] driver_register+0xa8/0xf8
[    0.780000] [<80005658>] do_one_initcall+0xdc/0x1a4
[    0.780000] [<804ddd84>] kernel_init_freeable+0x180/0x240
[    0.780000] [<803c220c>] kernel_init+0x10/0x114
[    0.780000] [<8000a318>] ret_from_kernel_thread+0x14/0x1c
[    1.250000] ---[ end trace 7ece3e8c99132699 ]---
[    1.260000] mtdsplit: -5, error occured while reading from "rootfs"
[    1.270000] libphy: Fixed MDIO Bus: probed
[    1.280000] netif_napi_add() called with weight 128 on device eth%d
[    1.300000] libphy: mdio: probed
[    2.710000] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    2.720000] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame
engine at 0xbe100000, irq 16
[    2.740000] Netfilter messages via NETLINK v0.30.
[    2.750000] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    2.760000] NET: Registered protocol family 10
[    2.770000] NET: Registered protocol family 17
[    2.780000] 8021q: 802.1Q VLAN Support v1.8
[    2.790000] hctosys: unable to open rtc device (rtc0)
[    2.800000] ------------[ cut here ]------------
[    2.810000] WARNING: CPU: 1 PID: 291 at
drivers/spi/spi-mt7621.c:214
mt7621_spi_transfer_one_message+0x28c/0x61c
[    2.830000] Modules linked in:
[    2.840000] CPU: 1 PID: 291 Comm: kworker/1:1 Tainted: G        W
    4.9.20 #0
[    2.850000] Workqueue: mtdblock4 mtd_blktrans_work
[    2.860000] Stack : 87de9880 804c0000 804539d0 8047c3b0 00000009
000000d6 00000200 00010000
[    2.880000]         00000001 800696b0 804539d0 00000001 00000123
80513824 8045393c 87e45a64
[    2.900000]         804c0000 800a3d18 00000001 80510000 804c3144
804c3148 804585fc 87e45a64
[    2.910000]         804c0000 80041324 00000200 87e45a9c 000001e7
00000000 f1faec76 00e45a84
[    2.930000]         80261f24 81122c00 87d70b00 6264746d 6b636f6c
00000034 00000000 00000000
[    2.950000]         ...
[    2.950000] Call Trace:
[    2.960000] [<8000f640>] show_stack+0x50/0x84
[    2.960000] [<801cf924>] dump_stack+0x84/0xc0
[    2.970000] [<8002a124>] __warn+0xe4/0x118
[    2.980000] [<8002a1ec>] warn_slowpath_null+0x1c/0x30
[    2.990000] [<8028d14c>] mt7621_spi_transfer_one_message+0x28c/0x61c
[    3.000000] [<8028b7c8>] __spi_pump_messages+0x4d4/0x530
[    3.010000] [<8028c8d0>] __spi_sync+0x170/0x1b4
[    3.020000] [<8028c944>] spi_sync+0x30/0x58
[    3.030000] [<8026aba4>] m25p80_read+0x23c/0x298
[    3.040000] [<80274920>] spi_nor_read+0xc0/0x174
[    3.050000] [<8025cfa8>] part_read+0x60/0xb0
[    3.060000] [<8025a494>] mtd_read+0x7c/0xc4
[    3.070000] [<80263618>] mtdblock_readsect+0xf8/0x150
[    3.080000] [<802621b4>] mtd_blktrans_work+0x290/0x404
[    3.090000] [<8003f15c>] process_one_work+0x200/0x348
[    3.100000] [<80040048>] worker_thread+0x2d4/0x45c
[    3.110000] [<80044b98>] kthread+0xd8/0xec
[    3.110000] [<8000a318>] ret_from_kernel_thread+0x14/0x1c
[    3.130000] ---[ end trace 7ece3e8c9913269b ]---
[    3.130000] blk_update_request: I/O error, dev mtdblock4, sector 0
[    3.150000] SQUASHFS error: squashfs_read_data failed to read block 0x0
[    3.160000] squashfs: SQUASHFS error: unable to read squashfs_super_block
[    3.170000] VFS: Cannot open root device "mtdblock4" or
unknown-block(31,4): error -5
[    3.190000] Please append a correct "root=" boot option; here are
the available partitions:
[    3.210000] 1f00             192 mtdblock0 [    3.210000]  (driver?)
[    3.220000] 1f01              64 mtdblock1 [    3.230000]  (driver?)
[    3.230000] 1f02              64 mtdblock2 [    3.240000]  (driver?)
[    3.240000] 1f03           16064 mtdblock3 [    3.250000]  (driver?)
[    3.260000] 1f04           14543 mtdblock4 [    3.260000]  (driver?)
[    3.270000] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(31,4)
[    3.270000] Rebooting in 1 seconds..

target/linux/ramips/image/mt7621.mk

define Device/mt7621
  DTS := MT7621
  BLOCKSIZE := 64k
  FILESYSTEMS := squashfs
  IMAGE_SIZE := $(ralink_default_fw_size_8M)
  DEVICE_TITLE := MediaTek MT7621 EVB
endef
TARGET_DEVICES += mt7621

Regards
Mani



More information about the Lede-dev mailing list