]> git.ipfire.org Git - people/ms/u-boot.git/blob - tools/mkimage.h
tools: Add ifdtool to .gitignore
[people/ms/u-boot.git] / tools / mkimage.h
1 /*
2 * (C) Copyright 2000-2004
3 * DENX Software Engineering
4 * Wolfgang Denk, wd@denx.de
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9 #ifndef _MKIIMAGE_H_
10 #define _MKIIMAGE_H_
11
12 #include "os_support.h"
13 #include <errno.h>
14 #include <fcntl.h>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <string.h>
18 #include <sys/stat.h>
19 #include <time.h>
20 #include <unistd.h>
21 #include <u-boot/sha1.h>
22 #include "fdt_host.h"
23 #include "imagetool.h"
24
25 #undef MKIMAGE_DEBUG
26
27 #ifdef MKIMAGE_DEBUG
28 #define debug(fmt,args...) printf (fmt ,##args)
29 #else
30 #define debug(fmt,args...)
31 #endif /* MKIMAGE_DEBUG */
32
33 static inline void *map_sysmem(ulong paddr, unsigned long len)
34 {
35 return (void *)(uintptr_t)paddr;
36 }
37
38 static inline ulong map_to_sysmem(void *ptr)
39 {
40 return (ulong)(uintptr_t)ptr;
41 }
42
43 #define MKIMAGE_TMPFILE_SUFFIX ".tmp"
44 #define MKIMAGE_MAX_TMPFILE_LEN 256
45 #define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
46 #define MKIMAGE_MAX_DTC_CMDLINE_LEN 512
47 #define MKIMAGE_DTC "dtc" /* assume dtc is in $PATH */
48
49 #endif /* _MKIIMAGE_H_ */