Hi, I am In the process of porting the Meraki MR18 from V19.07.7 on the ar71xx target to v21.02 ath79 target. I have managed to get the device booting with networking/LED's on an initramfs image build on the ath79 target using Device Tree Files (DTS).
The issue I am encountering is ubiattach fails on v21.02 when the ubi volume has a subpage size of 512 and VID Header of 512.
This is the error which is shown for all PBI's on v21.02:
87.417684] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.124 #0
[ 87.423595] Stack : 80700000 806a7a28 00000000 00000000 806a6bec 87c2dc44 87c28300 806e0d03
[ 87.432080] 8063cf04 00000001 80fb32d8 020a0000 00000000 00000001 87c2dbf8 a59b5b53
[ 87.440561] 00000000 00000000 80fe0000 00002d5c 00000030 00000000 2e342e31 32342023
[ 87.449044] 00002d5c 47043aa8 00000000 00065f94 00000000 87cc4000 00000040 00000105
[ 87.457528] 00000000 020a0000 00000000 00000000 00000001 80382bfc 00000000 80fb0000
[ 87.466001] ...
[ 87.468483] Call Trace:
[ 87.470974] [<80069864>] show_stack+0x30/0x100
[ 87.475481] [<803e88cc>] ubi_io_read+0x274/0x3a0
[ 87.480183] [<803e8c88>] ubi_io_read_ec_hdr+0x64/0x294
[ 87.485394] [<803ee554>] ubi_attach+0x35c/0x154c
[ 87.490090] [<803e2418>] ubi_attach_mtd_dev+0x4d4/0xb78
[ 87.495405] [<80717ba8>] ubi_init+0x180/0x3e4
[ 87.499840] [<800609f8>] do_one_initcall+0x7c/0x1dc
[ 87.504802] [<80703e30>] kernel_init_freeable+0x14c/0x230
[ 87.510293] [<805a86d8>] kernel_init+0x10/0xf0
[ 87.514804] [<80064cb8>] ret_from_kernel_thread+0x14/0x1c
[ 87.521028] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 576 bytes from PEB 261:0, read only 576 bytes, retry
[ 87.533403] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 576 bytes from PEB 261:0, read only 576 bytes, retry
[ 87.545774] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 576 bytes from PEB 261:0, read only 576 bytes, retry
[ 87.558146] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 576 bytes from PEB 261:0, read 576 bytes
Note: on v19 the ubi defaults to a sub-page size of 512, VID offset: 512. Hence the reason for trying to keep this on v21.02.
[ 3.057121] ubi0: attached mtd3 (name "ubi", size 111 MiB)
[ 3.062690] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[ 3.069699] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[ 3.076508] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
Any help/pointer would be appreciated.