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