]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
b97a2a0a MB |
2 | /* |
3 | * (C) Copyright 2000-2004 | |
4 | * DENX Software Engineering | |
5 | * Wolfgang Denk, [email protected] | |
b97a2a0a MB |
6 | */ |
7 | ||
89a4d6b1 PW |
8 | #ifndef _MKIIMAGE_H_ |
9 | #define _MKIIMAGE_H_ | |
10 | ||
2f8d396b | 11 | #include "os_support.h" |
b97a2a0a MB |
12 | #include <errno.h> |
13 | #include <fcntl.h> | |
14 | #include <stdio.h> | |
15 | #include <stdlib.h> | |
16 | #include <string.h> | |
b97a2a0a MB |
17 | #include <sys/stat.h> |
18 | #include <time.h> | |
19 | #include <unistd.h> | |
99d430f3 | 20 | #include <limits.h> |
2b9912e6 | 21 | #include <u-boot/sha1.h> |
8cf30809 | 22 | #include "fdt_host.h" |
f86ed6a8 | 23 | #include "imagetool.h" |
b97a2a0a | 24 | |
89a4d6b1 | 25 | #undef MKIMAGE_DEBUG |
5dfb5213 MB |
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 | ||
c5819701 SG |
33 | #define log_debug(fmt, args...) debug(fmt, ##args) |
34 | ||
2434c66d SG |
35 | static inline void *map_sysmem(ulong paddr, unsigned long len) |
36 | { | |
37 | return (void *)(uintptr_t)paddr; | |
38 | } | |
39 | ||
40 | static inline ulong map_to_sysmem(void *ptr) | |
41 | { | |
42 | return (ulong)(uintptr_t)ptr; | |
43 | } | |
44 | ||
c5e24420 | 45 | #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size] |
b583348c | 46 | |
9d25438f | 47 | #define MKIMAGE_TMPFILE_SUFFIX ".tmp" |
99d430f3 | 48 | #define MKIMAGE_MAX_TMPFILE_LEN PATH_MAX |
9d25438f | 49 | #define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500" |
fc21a88f | 50 | #define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35 |
89a4d6b1 | 51 | |
89a4d6b1 | 52 | #endif /* _MKIIMAGE_H_ */ |