mkimage: Automatically make space in FDT when full

When adding hashes or signatures, the target FDT may be full. Detect this
and automatically try again after making 1KB of space.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2014-06-02 22:04:53 -06:00
committed by Tom Rini
parent ef0af64b1c
commit a946811569
6 changed files with 114 additions and 60 deletions

View File

@@ -62,10 +62,10 @@ int main(int argc, char **argv)
break;
}
ffd = mmap_fdt(cmdname, fdtfile, &fit_blob, &fsbuf, false);
ffd = mmap_fdt(cmdname, fdtfile, 0, &fit_blob, &fsbuf, false);
if (ffd < 0)
return EXIT_FAILURE;
kfd = mmap_fdt(cmdname, keyfile, &key_blob, &ksbuf, false);
kfd = mmap_fdt(cmdname, keyfile, 0, &key_blob, &ksbuf, false);
if (ffd < 0)
return EXIT_FAILURE;