Skip to content
Snippets Groups Projects
  • This contributor prefers not to receive mails's avatar
    11f29d44
    tools: mkimage/dumpimage: Allow to use -l with -T · 11f29d44
    This contributor prefers not to receive mails authored and Tom Rini's avatar Tom Rini committed
    
    Currently -l option for mkimage and dumpimage ignores option -T and always
    tries to autodetect image type.
    
    With this change it is possible to tell mkimage and dumpimage to parse
    image file as specific type (and not random autodetected type). This allows
    to use mkimage -l or dumpimage -l as tool for validating image.
    
    params.type for -l option is now by default initialized to zero
    (IH_TYPE_INVALID) instead of IH_TYPE_KERNEL. imagetool_get_type() for
    IH_TYPE_INVALID returns NULL, which is assigned to tparams. mkimage and
    dumpimage code is extended to handle tparams with NULL for -l option. And
    imagetool_verify_print_header() is extended to do validation via tparams if
    is not NULL.
    
    Signed-off-by: default avatarPali Rohár <pali@kernel.org>
    Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
    11f29d44
    History
    tools: mkimage/dumpimage: Allow to use -l with -T
    This contributor prefers not to receive mails authored and Tom Rini's avatar Tom Rini committed
    
    Currently -l option for mkimage and dumpimage ignores option -T and always
    tries to autodetect image type.
    
    With this change it is possible to tell mkimage and dumpimage to parse
    image file as specific type (and not random autodetected type). This allows
    to use mkimage -l or dumpimage -l as tool for validating image.
    
    params.type for -l option is now by default initialized to zero
    (IH_TYPE_INVALID) instead of IH_TYPE_KERNEL. imagetool_get_type() for
    IH_TYPE_INVALID returns NULL, which is assigned to tparams. mkimage and
    dumpimage code is extended to handle tparams with NULL for -l option. And
    imagetool_verify_print_header() is extended to do validation via tparams if
    is not NULL.
    
    Signed-off-by: default avatarPali Rohár <pali@kernel.org>
    Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>