firmware-utils: jcgimage: add support for 4MiB+ images
authorDavide Fioravanti <pantanastyle@gmail.com>
Mon, 20 May 2019 02:43:17 +0000 (04:43 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 31 May 2019 08:30:03 +0000 (10:30 +0200)
commit3a418143c45898dc78147b8a18f2c9ee91f51bca
treeee56728548646eb22a95268e614bec50dd734d52
parent87e68e0e8ca29a57c264db7d74449f1ce64f9723
firmware-utils: jcgimage: add support for 4MiB+ images

The first version of this script allowed just 4Mb factory images.
With this patch is possible to set the maximum size of the payload.

For an 8Mb flash, the corresponding maxsize is:
8 * 1024 * 1024 - 5 * 64 * 1024 = 8388608 - 327680 = 8060928

If the -m argument is not set, the default maximum size will be
used for backward compatibility.

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
src/jcgimage.c