diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-17 10:41:30 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-17 10:41:30 +0000 |
commit | 3cc2e8d9a3af7d035c2a5731f7fd1f080a7fb700 (patch) | |
tree | 225f0283278ffede397e145accf4e867d250ea04 /target | |
parent | ef3c786a0b64d25a04d09a83e61875223588527e (diff) | |
download | master-187ad058-3cc2e8d9a3af7d035c2a5731f7fd1f080a7fb700.tar.gz master-187ad058-3cc2e8d9a3af7d035c2a5731f7fd1f080a7fb700.tar.bz2 master-187ad058-3cc2e8d9a3af7d035c2a5731f7fd1f080a7fb700.zip |
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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48263 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c index 3d80e078b5..5329037f09 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c @@ -49,7 +49,7 @@ mtdsplit_parse_squashfs(struct mtd_info *master, part->name = ROOTFS_SPLIT_NAME; part->offset = mtd_roundup_to_eb(part_offset + squashfs_len, parent_mtd) - part_offset; - part->size = master->size - part->offset; + part->size = mtd_rounddown_to_eb(master->size - part->offset, master); *pparts = part; return 1; |