diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-09-02 14:45:44 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-05 09:58:35 +0000 |
commit | 15dc6fc5eabc1b1756aca1dbed38cb9d26259bf2 (patch) | |
tree | a57df2077761907ad87e7c369f8d5b2605963059 /futility/futility.h | |
parent | 64ddad77e58b9892c72f49977f479a585dce095c (diff) | |
download | vboot-15dc6fc5eabc1b1756aca1dbed38cb9d26259bf2.tar.gz |
futility: add "sign" command to resign firmware images
The "sign" command can perform the same operation as the old
resign_firmwarefd.sh script, only about 20 times faster. The
test for that will use the new command instead.
BUG=chromium:224734
BRANCH=ToT
TEST=make runtests
Change-Id: Ie7f7a0ab6fc00d7e06cb263733bf6e7246fdb023
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216227
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'futility/futility.h')
-rw-r--r-- | futility/futility.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/futility/futility.h b/futility/futility.h index 8c2b809b..03b4cb57 100644 --- a/futility/futility.h +++ b/futility/futility.h @@ -71,4 +71,11 @@ int futil_looks_like_gbb(GoogleBinaryBlockHeader *gbb, uint32_t len); int futil_valid_gbb_header(GoogleBinaryBlockHeader *gbb, uint32_t len, uint32_t *maxlen); +/* Copies a file or dies with an error message */ +void copy_file_or_die(const char *infile, const char *outfile); + +/* Wrapper for mmap/munmap. Returns 0 on success. Skips stupidly large files. */ +int map_it(int fd, int writeable, void **buf, uint32_t *len); +int unmap_it(int fd, int writeable, void *buf, uint32_t len); + #endif /* VBOOT_REFERENCE_FUTILITY_H_ */ |