Heiko Schocher | 6bf4ca0 | 2014-03-03 12:19:29 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2014 |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef _FIT_COMMON_H_ |
| 8 | #define _FIT_COMMON_H_ |
| 9 | |
| 10 | #include "imagetool.h" |
| 11 | #include "mkimage.h" |
| 12 | #include <image.h> |
| 13 | |
| 14 | int fit_verify_header(unsigned char *ptr, int image_size, |
| 15 | struct image_tool_params *params); |
| 16 | |
| 17 | int fit_check_image_types(uint8_t type); |
| 18 | |
Simon Glass | ef0af64 | 2014-06-02 22:04:52 -0600 | [diff] [blame] | 19 | /** |
| 20 | * Map an FDT into memory, optionally increasing its size |
| 21 | * |
| 22 | * @cmdname: Tool name (for displaying with error messages) |
| 23 | * @fname: Filename containing FDT |
Simon Glass | a946811 | 2014-06-02 22:04:53 -0600 | [diff] [blame^] | 24 | * @size_inc: Amount to increase size by (0 = leave it alone) |
Simon Glass | ef0af64 | 2014-06-02 22:04:52 -0600 | [diff] [blame] | 25 | * @blobp: Returns pointer to FDT blob |
| 26 | * @sbuf: File status information is stored here |
| 27 | * @delete_on_error: true to delete the file if we get an error |
| 28 | * @return 0 if OK, -1 on error. |
| 29 | */ |
Simon Glass | a946811 | 2014-06-02 22:04:53 -0600 | [diff] [blame^] | 30 | int mmap_fdt(const char *cmdname, const char *fname, size_t size_inc, |
| 31 | void **blobp, struct stat *sbuf, bool delete_on_error); |
Heiko Schocher | 6bf4ca0 | 2014-03-03 12:19:29 +0100 | [diff] [blame] | 32 | |
| 33 | #endif /* _FIT_COMMON_H_ */ |