diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-15 14:37:45 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-26 22:45:42 +0100 |
commit | ebb1160cddbd58831cc8347dba94f208a0cb8500 (patch) | |
tree | 9926fe69c45a5396d2e30479dfdd5de32ae59cdd /include/boot.h | |
parent | 6e686491a5478c13554536a65db6381181472133 (diff) | |
download | barebox-ebb1160cddbd58831cc8347dba94f208a0cb8500.tar.gz barebox-ebb1160cddbd58831cc8347dba94f208a0cb8500.tar.xz |
bootm: make verifying/hashing configurable
So long struct bootm_data.verify is a bool which enables CRC checking
(hashing). Extend this to a enum and add support for signature checking
in the same option. This also adds the corresponding globalvar and a
-s option to bootm.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/boot.h')
-rw-r--r-- | include/boot.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/boot.h b/include/boot.h index 0c0febe48f..363a02af78 100644 --- a/include/boot.h +++ b/include/boot.h @@ -7,12 +7,18 @@ #include <linux/list.h> #include <environment.h> +enum bootm_verify { + BOOTM_VERIFY_NONE, + BOOTM_VERIFY_HASH, + BOOTM_VERIFY_SIGNATURE, +}; + struct bootm_data { const char *os_file; const char *initrd_file; const char *oftree_file; int verbose; - bool verify; + enum bootm_verify verify; bool force; bool dryrun; unsigned long initrd_address; @@ -63,7 +69,7 @@ struct image_data { struct fdt_header *oftree; struct resource *oftree_res; - int verify; + enum bootm_verify verify; int verbose; int force; int dryrun; @@ -119,6 +125,8 @@ int bootm_load_initrd(struct image_data *data, unsigned long load_address); int bootm_load_devicetree(struct image_data *data, unsigned long load_address); int bootm_get_os_size(struct image_data *data); +enum bootm_verify bootm_get_verify_mode(void); + #define UIMAGE_SOME_ADDRESS (UIMAGE_INVALID_ADDRESS - 1) #endif /* __BOOT_H */ |