2008-01-08 17:14:09 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2000-2004
|
|
|
|
* DENX Software Engineering
|
|
|
|
* Wolfgang Denk, wd@denx.de
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2008-01-08 17:14:09 +00:00
|
|
|
*/
|
|
|
|
|
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>
|
2008-02-29 15:00:23 +00:00
|
|
|
#include <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 */
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
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"
|
|
|
|
#define MKIMAGE_MAX_DTC_CMDLINE_LEN 512
|
|
|
|
#define MKIMAGE_DTC "dtc" /* assume dtc is in $PATH */
|
2009-08-19 12:06:46 +00:00
|
|
|
|
|
|
|
#endif /* _MKIIMAGE_H_ */
|