diff options
author | Jimmy Zhang <jimmzhang@nvidia.com> | 2015-10-19 16:01:56 -0700 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2015-10-19 17:33:29 -0600 |
commit | aa869ed597435ec05d5b9f55de64d01a52cc5ea8 (patch) | |
tree | b0877072b080178156aecba4c90857a606d9bfa4 /src/parse.c | |
parent | 3c3b992a68147981792c4f4fe0f3df5633b13076 (diff) | |
download | cbootimage-aa869ed597435ec05d5b9f55de64d01a52cc5ea8.tar.gz |
Add new configuration keyword "RehashBl"
This feature is needed in case an image is updated at later stage
after bootimage has been created.
How to use:
Add keyword "RehashBl" to configuration file, for example, update.cfg:
RehashBl;
Invoke cbootimage to re-calculate bootloader aes hash, for example, for
bootimage bootloader.bin:
$ cbootimage -s tegra210 --update update.cfg bootloader.bin bootloader.bin-resigned
Where bootloader.bin-resigned is the resigned bootimage bootloader.bin
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c index 667895c..6f37dad 100644 --- a/src/parse.c +++ b/src/parse.c @@ -80,6 +80,8 @@ static int parse_dev_param(build_image_context *context, parse_token token, char *rest); static int parse_sdram_param(build_image_context *context, parse_token token, char *rest); +static int +parse_sign_bl(build_image_context *context, parse_token token, char *rest); static int process_statement(build_image_context *context, char *str, @@ -121,6 +123,7 @@ static parse_item s_top_level_items[] = { { "RsaKeyModulusFile=", token_rsa_key_modulus, parse_rsa_param }, { "RsaPssSigBlFile=", token_rsa_pss_sig_bl, parse_rsa_param }, { "RsaPssSigBctFile=", token_rsa_pss_sig_bct, parse_rsa_param }, + { "RehashBl", token_sign_bl, parse_sign_bl }, { NULL, 0, NULL } /* Must be last */ }; @@ -689,6 +692,12 @@ parse_bct_file(build_image_context *context, parse_token token, char *rest) return 0; } +static int +parse_sign_bl(build_image_context *context, parse_token token, char *rest) +{ + return resign_bl(context); +} + static char * parse_end_state(char *str, char *uname, int chars_remaining) { |