mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
fdt: Fix FIT header verification in mkimage and conduct same checks as bootm
FIT header verification in mkimage was treating a return code as a boolean, which meant that failures in validating the fit were seen as successes. Additionally, mkimage was checking all formats to find a header which passes validation, rather than using the image type specified to mkimage. checkpatch.pl checks for lines ending with '(' and alignment matching open parentheses are ignored to keep with existing coding style. Signed-off-by: Jordan Hand <jorhand@microsoft.com>
This commit is contained in:
parent
280fafff16
commit
d32aa3cae4
5 changed files with 65 additions and 3 deletions
|
@ -10,6 +10,14 @@
|
|||
#include "mkimage.h"
|
||||
#include <image.h>
|
||||
|
||||
/**
|
||||
* Verify the format of FIT header pointed to by ptr
|
||||
*
|
||||
* @ptr: image header to be verified
|
||||
* @image_size: size of while image
|
||||
* @params: mkimage parameters
|
||||
* @return 0 if OK, -1 on error
|
||||
*/
|
||||
int fit_verify_header(unsigned char *ptr, int image_size,
|
||||
struct image_tool_params *params);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue