]>
Commit | Line | Data |
---|---|---|
b97a2a0a MB |
1 | /* |
2 | * (C) Copyright 2000-2004 | |
3 | * DENX Software Engineering | |
4 | * Wolfgang Denk, [email protected] | |
b97a2a0a | 5 | * |
1a459660 | 6 | * SPDX-License-Identifier: GPL-2.0+ |
b97a2a0a MB |
7 | */ |
8 | ||
89a4d6b1 PW |
9 | #ifndef _MKIIMAGE_H_ |
10 | #define _MKIIMAGE_H_ | |
11 | ||
2f8d396b | 12 | #include "os_support.h" |
b97a2a0a MB |
13 | #include <errno.h> |
14 | #include <fcntl.h> | |
15 | #include <stdio.h> | |
16 | #include <stdlib.h> | |
17 | #include <string.h> | |
b97a2a0a MB |
18 | #include <sys/stat.h> |
19 | #include <time.h> | |
20 | #include <unistd.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 | ||
2434c66d SG |
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 | ||
9d25438f BS |
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 */ | |
89a4d6b1 | 48 | |
89a4d6b1 | 49 | #endif /* _MKIIMAGE_H_ */ |