kernel: mtdsplit_squashfs: Align with the erase-block size

On most image types the rootfs ends at an erase-block. However, at least
with brnImages this is not the case: while the partitions are aligned
with the erase-block size there is a 12 byte footer at the end of the
partition which must not be touched by any filesystem. This lead to a
rootfs_data partition which was not aligned properly (and thus ended up
being readonly):
	0x000000480000-0x00000085a800 : "rootfs_data" (128 KiB EB)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 48263
owl
Felix Fietkau 2016-01-17 10:41:30 +00:00
parent 651083bbd9
commit 7703e14bc4
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ mtdsplit_parse_squashfs(struct mtd_info *master,
part->name = ROOTFS_SPLIT_NAME; part->name = ROOTFS_SPLIT_NAME;
part->offset = mtd_roundup_to_eb(part_offset + squashfs_len, part->offset = mtd_roundup_to_eb(part_offset + squashfs_len,
parent_mtd) - part_offset; parent_mtd) - part_offset;
part->size = master->size - part->offset; part->size = mtd_rounddown_to_eb(master->size - part->offset, master);
*pparts = part; *pparts = part;
return 1; return 1;