blob: adcee6df64580cfa6f0af91b7804258ff449232a [file] [log] [blame]
Heiko Schocher6bf4ca02014-03-03 12:19:29 +01001/*
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
14int fit_verify_header(unsigned char *ptr, int image_size,
15 struct image_tool_params *params);
16
17int fit_check_image_types(uint8_t type);
18
Simon Glassef0af642014-06-02 22:04:52 -060019/**
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
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 */
29int mmap_fdt(const char *cmdname, const char *fname, void **blobp,
30 struct stat *sbuf, bool delete_on_error);
Heiko Schocher6bf4ca02014-03-03 12:19:29 +010031
32#endif /* _FIT_COMMON_H_ */