2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2008-01-08 17:14:09 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2000-2004
|
|
|
|
* DENX Software Engineering
|
|
|
|
* Wolfgang Denk, wd@denx.de
|
|
|
|
*/
|
|
|
|
|
2009-08-19 12:06:46 +00:00
|
|
|
#ifndef _MKIIMAGE_H_
|
|
|
|
#define _MKIIMAGE_H_
|
|
|
|
|
2009-03-13 23:54:51 +00:00
|
|
|
#include "os_support.h"
|
2008-01-08 17:14:09 +00:00
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
2014-06-12 20:27:12 +00:00
|
|
|
#include <u-boot/sha1.h>
|
2008-02-29 15:00:24 +00:00
|
|
|
#include "fdt_host.h"
|
2013-12-01 19:43:10 +00:00
|
|
|
#include "imagetool.h"
|
2008-01-08 17:14:09 +00:00
|
|
|
|
2009-08-19 12:06:46 +00:00
|
|
|
#undef MKIMAGE_DEBUG
|
2008-02-29 20:24:06 +00:00
|
|
|
|
|
|
|
#ifdef MKIMAGE_DEBUG
|
|
|
|
#define debug(fmt,args...) printf (fmt ,##args)
|
|
|
|
#else
|
|
|
|
#define debug(fmt,args...)
|
|
|
|
#endif /* MKIMAGE_DEBUG */
|
|
|
|
|
2021-02-16 00:08:09 +00:00
|
|
|
#define log_debug(fmt, args...) debug(fmt, ##args)
|
|
|
|
|
2013-05-16 13:53:20 +00:00
|
|
|
static inline void *map_sysmem(ulong paddr, unsigned long len)
|
|
|
|
{
|
|
|
|
return (void *)(uintptr_t)paddr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline ulong map_to_sysmem(void *ptr)
|
|
|
|
{
|
|
|
|
return (ulong)(uintptr_t)ptr;
|
|
|
|
}
|
|
|
|
|
2022-06-20 07:01:17 +00:00
|
|
|
#define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size]
|
2022-03-24 15:26:11 +00:00
|
|
|
|
2008-03-11 11:34:47 +00:00
|
|
|
#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
|
|
|
|
#define MKIMAGE_MAX_TMPFILE_LEN 256
|
|
|
|
#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
|
2020-04-27 00:08:38 +00:00
|
|
|
#define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35
|
2009-08-19 12:06:46 +00:00
|
|
|
|
|
|
|
#endif /* _MKIIMAGE_H_ */
|