diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-06-27 16:07:44 +0200 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2016-06-27 16:07:44 +0200 |
commit | 80763b33dce882073a4cdd4a36c82dc5f119885c (patch) | |
tree | 759237eb9166922719c9787b2e6bc5fc0e78d54c /target/linux/generic/files | |
parent | dacbc34e6afc0a61414d58f8fe48a9b3d04685e6 (diff) | |
download | master-187ad058-80763b33dce882073a4cdd4a36c82dc5f119885c.tar.gz master-187ad058-80763b33dce882073a4cdd4a36c82dc5f119885c.tar.bz2 master-187ad058-80763b33dce882073a4cdd4a36c82dc5f119885c.zip |
kernel: mtdsplit: calculate kernel partition precisely for Seama
So far "kernel" partition didn't contain just a kernel. It also included
Seama header and meta data. This was making kernel update complex and it
wasn't trivial to read kernel size.
Fix it by making "kernel" parition contain just a kernel image.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c index ee0444a43e..9fe1311018 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c @@ -79,8 +79,8 @@ static int mtdsplit_parse_seama(struct mtd_info *master, return -ENOMEM; parts[0].name = KERNEL_PART_NAME; - parts[0].offset = 0; - parts[0].size = rootfs_offset; + parts[0].offset = sizeof hdr + be16_to_cpu(hdr.metasize); + parts[0].size = rootfs_offset - parts[0].offset; if (type == MTDSPLIT_PART_TYPE_UBI) parts[1].name = UBI_PART_NAME; |