Resizing image fails

Hello.
Have working OpenWrt image booting well from 16 Mb SPI Flash IC.
After adding few additional packages got binary image size 21 Mb so resoldered flash IC with bigger one - 32 Mb.
To achive that made following changes in target/linux/imx6ull/image/device_name.mk:

# Max flash is 32MiB
MAXFWSIZE := $(shell echo $$(( ( 32 * 1024 * 1024 ) / $(FAT32_BLOCK_SIZE) )) )
IMAGE_SIZE := 31m
IMAGE_SIZE_FACTORY := 32m

On boot it gave me following error:

COM: SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
COM: SF: Warning - Only lower 16MiB accessible, Full access #define CONFIG_SPI_FLASH_BAR

So I enabled it:

CONFIG_SPI_FLASH_BAR=y

After that this error gone away but now I am facing kernel panic:

[    0.648055] mtdsplit: squashfs has invalid size in "rootfs"
[    1.140345] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4)
[    1.148734] Rebooting in 1 seconds..

Tried to understand what is wrong by reading source code. That error message come from mtd_get_squashfs_len() function in target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit.c:

	if (offset + retlen > master->size) {
		pr_alert("squashfs has invalid size in \"%s\"\n",
			 master->name);
		return -EINVAL;
	}

but I can't understand what is wrong? Made similar migration from 8 Mb to 16 Mb last year without any troubles. Could someone point me to things I missed?

changed partition0/1/2/3 values in dts and started to work.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.