]> git.ipfire.org Git - thirdparty/u-boot.git/blame - tools/mkimage.h
dma-mapping: Add header file for ARCH_DMA_MINALIGN
[thirdparty/u-boot.git] / tools / mkimage.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
b97a2a0a
MB
2/*
3 * (C) Copyright 2000-2004
4 * DENX Software Engineering
5 * Wolfgang Denk, wd@denx.de
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>
2b9912e6 20#include <u-boot/sha1.h>
8cf30809 21#include "fdt_host.h"
f86ed6a8 22#include "imagetool.h"
b97a2a0a 23
89a4d6b1 24#undef MKIMAGE_DEBUG
5dfb5213
MB
25
26#ifdef MKIMAGE_DEBUG
27#define debug(fmt,args...) printf (fmt ,##args)
28#else
29#define debug(fmt,args...)
30#endif /* MKIMAGE_DEBUG */
31
2434c66d
SG
32static inline void *map_sysmem(ulong paddr, unsigned long len)
33{
34 return (void *)(uintptr_t)paddr;
35}
36
37static inline ulong map_to_sysmem(void *ptr)
38{
39 return (ulong)(uintptr_t)ptr;
40}
41
9d25438f
BS
42#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
43#define MKIMAGE_MAX_TMPFILE_LEN 256
44#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
fc21a88f 45#define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35
89a4d6b1 46
89a4d6b1 47#endif /* _MKIIMAGE_H_ */