2018-05-07 05:58:06 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2008-01-09 01:14:09 +08:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2000-2004
|
|
|
|
* DENX Software Engineering
|
|
|
|
* Wolfgang Denk, wd@denx.de
|
|
|
|
*/
|
|
|
|
|
2009-08-19 20:06:46 +08:00
|
|
|
#ifndef _MKIIMAGE_H_
|
|
|
|
#define _MKIIMAGE_H_
|
|
|
|
|
2009-03-14 07:54:51 +08:00
|
|
|
#include "os_support.h"
|
2008-01-09 01:14:09 +08: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-13 04:27:12 +08:00
|
|
|
#include <u-boot/sha1.h>
|
2008-02-29 23:00:24 +08:00
|
|
|
#include "fdt_host.h"
|
2013-12-02 03:43:10 +08:00
|
|
|
#include "imagetool.h"
|
2008-01-09 01:14:09 +08:00
|
|
|
|
2009-08-19 20:06:46 +08:00
|
|
|
#undef MKIMAGE_DEBUG
|
2008-03-01 04:24:06 +08:00
|
|
|
|
|
|
|
#ifdef MKIMAGE_DEBUG
|
|
|
|
#define debug(fmt,args...) printf (fmt ,##args)
|
|
|
|
#else
|
|
|
|
#define debug(fmt,args...)
|
|
|
|
#endif /* MKIMAGE_DEBUG */
|
|
|
|
|
2013-05-16 21:53:20 +08: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 19:34:47 +08: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 08:08:38 +08:00
|
|
|
#define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35
|
2009-08-19 20:06:46 +08:00
|
|
|
|
|
|
|
#endif /* _MKIIMAGE_H_ */
|