diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-10-04 09:48:18 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-19 11:38:52 -0700 |
commit | 3875e6191f24ceb83415f553ca91dcac7b71073b (patch) | |
tree | e8b48dfa7edb55c2e9ef676732cec20ed97faf67 /futility | |
parent | 77d9dd0dd58d2cac1ea6aa8873491afcf2441945 (diff) | |
download | vboot-3875e6191f24ceb83415f553ca91dcac7b71073b.tar.gz |
bdb: Add --load_address to futility-bdb --create
This change makes futility-bdb --create take --load_address parameter,
which sets the load address field in the BDB header.
BUG=chromium:649554
BRANCH=none
TEST=make runtests
$ futility bdb --resign test/futility/data/bin.bdb --data_version 2
then futility show --type bdb test/futility/data/bin.bdb
Change-Id: Ib4dec86c2a043e0989c91bbc01f39776e3630e4c
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/399594
Commit-Ready: Daisuke Nojiri <dnojiri@google.com>
Tested-by: Daisuke Nojiri <dnojiri@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'futility')
-rw-r--r-- | futility/cmd_bdb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/futility/cmd_bdb.c b/futility/cmd_bdb.c index d3c06728..ffd575b7 100644 --- a/futility/cmd_bdb.c +++ b/futility/cmd_bdb.c @@ -158,7 +158,8 @@ static int do_create(const char *bdb_filename, uint32_t bdbkey_version, const char *datakey_pri_filename, const char *datakey_pub_filename, - uint32_t datakey_version) + uint32_t datakey_version, + uint64_t load_address) { struct bdb_key *bdbkey; struct bdb_key *datakey; @@ -186,7 +187,7 @@ static int do_create(const char *bdb_filename, } memset(¶ms, 0, sizeof(params)); - params.bdb_load_address = -1; + params.bdb_load_address = load_address; params.bdbkey = bdbkey; params.datakey = datakey; params.private_bdbkey = bdbkey_pri; @@ -530,6 +531,7 @@ static void print_help(int argc, char *argv[]) " --bdbkey_pub <file> BDB key in .keyb format\n" " --datakey_pri <file> Data key in .pem format\n" " --datakey_pub <file> Data key in .keyb format\n" + " --load_address <number> BDB load address\n" "\n" "For '--resign <bdb_file> [OPTIONS]', optional OPTIONS are:\n" " --bdbkey_pri <file> New BDB key in .pem format\n" @@ -686,7 +688,7 @@ static int do_bdb(int argc, char *argv[]) return do_create(bdb_filename, bdbkey_pri_filename, bdbkey_pub_filename, bdbkey_version, datakey_pri_filename, datakey_pub_filename, - datakey_version); + datakey_version, load_address); case OPT_MODE_RESIGN: return do_resign(bdb_filename, bdbkey_pri_filename, bdbkey_pub_filename, bdbkey_version, |