OpenWrt Forum Archive

Topic: WNDR3700v2: mtd: partition "kernel" must either start or end (r40668)

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
for my WNDR3800 I build a new image myself and load it via Luci sysupgrade onto the router.
Now I get the following messages in System log and Kernal log:

[    2.890000] 4 cmdlinepart partitions found on MTD device spi0.0
[    2.890000] Creating 4 MTD partitions on "spi0.0":
[    2.900000] 0x000000000000-0x000000050000 : "u-boot"
[    2.900000] 0x000000050000-0x000000070000 : "u-boot-env"
[    2.910000] 0x000000070000-0x000000ff0000 : "firmware"
[    2.920000] 2 netgear-fw partitions found on MTD device firmware
[    2.920000] 0x000000070000-0x00000016e440 : "kernel"
[    2.930000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.940000] 0x00000016e440-0x000000ff0000 : "rootfs"
[    2.950000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.960000] mtd: device 4 (rootfs) set to be root filesystem
[    2.970000] 1 squashfs-split partitions found on MTD device rootfs
[    2.970000] 0x000000640000-0x000000ff0000 : "rootfs_data"
[    2.980000] 0x000000ff0000-0x000001000000 : "art"

What did I wrong ?
I also load the openwrt factory image via tftp. Same result.

Thanks for your support
Christian

Normal. But the log message is a bit confusing on the first reading...

mtd system determines that the partitions "kernel" and "rootfs" have to be read-only because their non-even size boundaries. So it declares them read-only, which is normal.

The logic was changed a few months ago in order to remove the earlier waste of bytes between kernel and rootfs. See that 00e7fbc0 below. Earlier rootfs would have started from the 64k boundary 00e80000 and a few flash bytes would have been wasted, and it might have overflown on 64k block further to 009e0000.

My 3800:

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00050000 00010000 "u-boot"
mtd1: 00020000 00010000 "u-boot-env"
mtd2: 00f80000 00010000 "firmware"
mtd3: 00100440 00010000 "kernel"
mtd4: 00e7fbc0 00010000 "rootfs"
mtd5: 009d0000 00010000 "rootfs_data"
mtd6: 00010000 00010000 "art"

(Last edited by hnyman on 4 May 2014, 16:56)

My "cat" of /proc/mtd with trunk r40694

dev:    size   erasesize  name
mtd0: 00050000 00010000 "u-boot"
mtd1: 00020000 00010000 "u-boot-env"
mtd2: 00f80000 00010000 "firmware"
mtd3: 000fe440 00010000 "kernel"
mtd4: 00e81bc0 00010000 "rootfs"
mtd5: 009b0000 00010000 "rootfs_data"
mtd6: 00010000 00010000 "art"

The discussion might have continued from here.