History log of /u-boot/tools/imagetool.c
Revision Date Author Comments
# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 This contributor prefers not to receive mails <noreply@example.com>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 This contributor prefers not to receive mails <noreply@example.com>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 2972d7d6 29-Mar-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Extend print_header() by params argument

This allows image type print_header() callback to access struct
image_tool_params *params.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# afd82187 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Skip autodetection of gpimage type

gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 6c58aa1e 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>


# 27e46a99 29-Jan-2023 Pali Rohár <pali@kernel.org>

tools: imagetool: Fix error message when verify_header is undefined

Signed-off-by: Pali Rohár <pali@kernel.org>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 30705cd8 20-Apr-2022 Nicolas Heemeryck <nicolas.heemeryck@gmail.com>

tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

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: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# d32aa3ca 05-Mar-2019 Jordan Hand <jordanhand22@gmail.com>

fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>


# 87925df2 20-Jun-2018 Alex Kiernan <alex.kiernan@gmail.com>

mkimage: Refactor imagetool_get_source_date to take command name

So we can use imagetool_get_source_date() from callers who do not have
the image tool params struct, just pass in the command name for the error
message.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Simon Glass <sjg@chromum.org>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 5847084f 16-Jun-2016 Vagrant Cascadian <vagrant@debian.org>

Respect SOURCE_DATE_EPOCH when building FIT images.

Embedding timestamps in FIT images results in unreproducible builds
for targets that generate a fit image, such as dra7xx_evm.

This patch uses the SOURCE_DATE_EPOCH environment variable, when set,
to use specified value for the date.

Thanks to HW42 for debugging the issue and providing the patch:

https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20160606/005722.html

For more information about reproducible builds and the
SOURCE_DATE_EPOCH specification:

https://reproducible-builds.org/specs/source-date-epoch/
https://reproducible-builds.org/

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>


# bd6e1420 01-May-2016 Simon Glass <sjg@chromium.org>

mkimage: Add a quiet mode

Some build systems want to be quiet unless there is a problem. At present
mkimage displays quite a bit of information when generating a FIT file. Add
a '-q' flag to silence this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# b12a81c4 16-Mar-2016 Simon Glass <sjg@chromium.org>

mkimage: Close the file when unable to get its size

There is a missing close() on the error path. Add it.

Reported-by: Coverity (CID: 138496)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>


# 3837ce65 22-Feb-2016 Simon Glass <sjg@chromium.org>

tools: Add a function to obtain the size of a file

This will be used in mkimage when working out the required size of the FIT
based on the files to be placed into it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1fddd7b6 08-Feb-2015 Andreas Bießmann <andreas.devel@googlemail.com>

tools/imagetool: remove linker script

Commit a93648d197df48fa46dd55f925ff70468bd81c71 introduced linker generated
lists for imagetool which is the base for some host tools (mkimage, dumpimage,
et al.). Unfortunately some host tool chains do not support the used type of
linker scripts. Therefore this commit broke these host-tools for them, namely
FreeBSD and Darwin (OS/X).

This commit tries to fix this. In order to have a clean distinction between host
and embedded code space we need to introduce our own linker generated list
instead of re-using the available linker_lists.h provided functionality. So we
copy the implementation used in linux kernel script/mod/file2alias.c which has
the very same problem (cause it is a host tool). This code also comes with an
abstraction for Mach-O binary format used in Darwin systems.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# 67f946cd 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

dumpimage: replace the term "datafile" by "subimage"

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# a93648d1 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

imagetool: replace image registration function by linker_lists feature

The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c

This commit also removes all registration functions, and the member "next"
from image_type_params struct

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# 067d1560 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

imagetool: make the image_save_datafile() available to all image types

Move the image_save_datafile() function from an U-Multi specific file
(default_image.c) to a file common to all image types (image.c). And rename it
to genimg_save_datafile(), to make clear it is useful for any image type.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# 0ca6691c 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

imagetool: move common code to imagetool module

The get_type() and verify_print_header() functions have the
same code on both dumpimage.c and mkimage.c modules.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# 832472a9 05-Mar-2014 Charles Manning <cdhmanning@gmail.com>

tools: socfpga: Add socfpga preloader signing to mkimage

Like many platforms, the Altera socfpga platform requires that the
preloader be "signed" in a certain way or the built-in boot ROM will
not boot the code.

This change automatically creates an appropriately signed preloader
from an SPL image.

The signed image includes a CRC which must, of course, be generated
with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
the boot ROM will reject the image.

Unfortunately the CRC used in this boot ROM is not the same as the
Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
CRC but is more correctly described as a checksum.

Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>

V2: - Zap unused constant
- Explicitly print an error message in case of error
- Rework the hdr_checksum() function to take the *header directly
instead of a plan buffer pointer


# 7b1a4117 19-May-2014 Andreas Bießmann <andreas.devel@googlemail.com>

mkimage: add atmelimage

The new atmelimage converts a machine code BLOB to bootable ROM image. Atmel
ROM has no sophisticated image format, it only checks the first 7 ARM vectors.
The vectors can contain valid B or LDR opcodes, the 6'th vector contains the
image size to load.

Additionally the PMECC header can be written by the atmelimage target. The
parameters must be given via the -n switch as a coma separated list. For
example:

mkimage -T atmelimage \
-n usePmecc=1,sectorPerPage=4,sectorSize=512,spareSize=64,eccBits=4,eccOffset=36 \
-d spl/u-boot-spl.bin boot.bin

A provided image can be checked for correct header setup. It prints out the
PMECC header parameters if it has one and the 6'th interrupt vector content.

---8<---
Image Type: ATMEL ROM-Boot Image with PMECC Header
PMECC header
====================
eccOffset: 36
sectorSize: 512
eccBitReq: 4
spareSize: 64
nbSectorPerPage: 4
usePmecc: 1
====================
6'th vector has 17044 set
--->8---

A SPL binary modified with the atmelimage mkimage target was succesfully
booted on a sama5d34ek via MMC and NAND.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Heiko Schocher <hs@denx.de>
Tested-by: Bo Shen <voice.shen@atmel.com>


# bf411ea9 04-Apr-2014 Karicheri, Muralidharan <m-karicheri2@ti.com>

tools: mkimage: add support for gpimage format

This patch add support for gpimage format as a preparatory
patch for porting u-boot for keystone2 devices and is
based on omapimage format. It re-uses gph header to store the
size and loadaddr as done in omapimage.c

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Acked-by: Tom Rini <trini@ti.com>


# f86ed6a8 01-Dec-2013 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

tools: moved code common to all image tools to a separated module.

In order to avoid duplicating code and keep only one point of modification,
the functions, structs and defines useful for "dumpimage" were moved from
"mkimage" to a common module called "imagetool".

This modification also weakens the coupling between image types (FIT, IMX, MXS,
and so on) and image tools (mkimage and dumpimage). Any tool may initialize the
"imagetool" through register_image_tool() function, while the image types
register themselves within an image tool using the register_image_type()
function:

+---------------+
+------| fit_image |
+--------------+ +-----------+ | +---------------+
| mkimage |--------> | | <-----+
+--------------+ | | +---------------+
| imagetool | <------------| imximage |
+--------------+ | | +---------------+
| dumpimage |--------> | | <-----+
+--------------+ +-----------+ | +---------------+
+------| default_image |
+---------------+

register_image_tool() register_image_type()

Also, the struct "mkimage_params" was renamed to "image_tool_params" to make
clear its general purpose.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>