return -1;
}
-static void aisimage_print_header(const void *hdr)
+static void aisimage_print_header(const void *hdr, struct image_tool_params *params)
{
struct ais_header *ais_hdr = (struct ais_header *)hdr;
uint32_t *ptr;
printf("\t\t====================\n");
}
-static void atmel_print_header(const void *ptr)
+static void atmel_print_header(const void *ptr, struct image_tool_params *params)
{
uint32_t *ints = (uint32_t *)ptr;
size_t pos;
(params->lflag && (params->dflag || params->fflag)));
}
+static void image_print_header(const void *ptr, struct image_tool_params *params)
+{
+ image_print_contents(ptr);
+}
+
static int image_verify_header(unsigned char *ptr, int image_size,
struct image_tool_params *params)
{
(void *)&header,
image_check_params,
image_verify_header,
- image_print_contents,
+ image_print_header,
image_set_header,
image_extract_subimage,
image_check_image_types,
#include <image.h>
#include <u-boot/crc.h>
+void fit_print_header(const void *fit, struct image_tool_params *params)
+{
+ fit_print_contents(fit);
+}
+
int fit_verify_header(unsigned char *ptr, int image_size,
struct image_tool_params *params)
{
#include "mkimage.h"
#include <image.h>
+void fit_print_header(const void *fit, struct image_tool_params *params);
+
/**
* Verify the format of FIT header pointed to by ptr
*
(void *)&header,
fit_check_params,
fit_verify_header,
- fit_print_contents,
+ fit_print_header,
NULL,
fit_extract_contents,
fit_check_image_types,
return gph_verify_header(gph, 1);
}
-static void gpimage_print_header(const void *ptr)
+static void gpimage_print_header(const void *ptr, struct image_tool_params *params)
{
const struct gp_header *gph = (struct gp_header *)ptr;
*/
if ((*curr)->print_header) {
if (!params->quiet)
- (*curr)->print_header(ptr);
+ (*curr)->print_header(ptr, params);
} else {
fprintf(stderr,
"%s: print_header undefined for %s\n",
*/
if (tparams->print_header) {
if (!params->quiet)
- tparams->print_header(ptr);
+ tparams->print_header(ptr, params);
} else {
fprintf(stderr,
"%s: print_header undefined for %s\n",
*/
int (*verify_header) (unsigned char *, int, struct image_tool_params *);
/* Prints image information abstracting from image header */
- void (*print_header) (const void *);
+ void (*print_header) (const void *, struct image_tool_params *);
/*
* The header or image contents need to be set as per image type to
* be generated using this callback function.
{
}
-static void imx8image_print_header(const void *ptr)
+static void imx8image_print_header(const void *ptr, struct image_tool_params *params)
{
}
{
}
-static void imx8mimage_print_header(const void *ptr)
+static void imx8mimage_print_header(const void *ptr, struct image_tool_params *params)
{
}
return 0;
}
-static void imximage_print_header(const void *ptr)
+static void imximage_print_header(const void *ptr, struct image_tool_params *params)
{
struct imx_header *imx_hdr = (struct imx_header *) ptr;
uint32_t version = detect_imximage_version(imx_hdr);
free(image);
}
-static void kwbimage_print_header(const void *ptr)
+static void kwbimage_print_header(const void *ptr, struct image_tool_params *params)
{
struct main_hdr_v0 *mhdr = (struct main_hdr_v0 *)ptr;
struct bin_hdr_v0 *bhdr;
printf("header[%d] = %02x\n", ofs, hdr->data[ofs]);
}
-static void lpc32xximage_print_header(const void *ptr)
+static void lpc32xximage_print_header(const void *ptr, struct image_tool_params *params)
{
struct nand_page_0_boot_header *hdr =
(struct nand_page_0_boot_header *)ptr;
/* Print the image information by processing image header */
if (tparams->print_header)
- tparams->print_header (ptr);
+ tparams->print_header (ptr, ¶ms);
else {
fprintf (stderr, "%s: Can't print header for %s\n",
params.cmdname, tparams->name);
return -1;
}
-static void mtk_image_print_header(const void *ptr)
+static void mtk_image_print_header(const void *ptr, struct image_tool_params *params)
{
struct legacy_img_hdr *hdr = (struct legacy_img_hdr *)ptr;
union lk_hdr *lk = (union lk_hdr *)ptr;
return mxsimage_verify_print_header(params->imagefile, 1);
}
-static void mxsimage_print_header(const void *hdr)
+static void mxsimage_print_header(const void *hdr, struct image_tool_params *params)
{
if (imagefile)
mxsimage_verify_print_header(imagefile, 0);
chs->flags);
}
-static void omapimage_print_header(const void *ptr)
+static void omapimage_print_header(const void *ptr, struct image_tool_params *params)
{
const struct ch_toc *toc = (struct ch_toc *)ptr;
const struct gp_header *gph =
return 0;
}
-static void pblimage_print_header(const void *ptr)
+static void pblimage_print_header(const void *ptr, struct image_tool_params *params)
{
printf("Image Type: Freescale PBL Boot Image\n");
}
return -ENOENT;
}
-void rkcommon_print_header(const void *buf)
+void rkcommon_print_header(const void *buf, struct image_tool_params *params)
{
struct header0_info header0;
struct header0_info_v2 header0_v2;
*
* @buf: Pointer to the image (can be a read-only file-mapping)
*/
-void rkcommon_print_header(const void *buf);
+void rkcommon_print_header(const void *buf, struct image_tool_params *params);
/**
* rkcommon_need_rc4_spl() - check if rc4 encoded spl is required
le16_to_cpu(header->checksum));
}
-static void socfpgaimage_print_header(const void *ptr)
+static void socfpgaimage_print_header(const void *ptr, struct image_tool_params *params)
{
const void *header = ptr + HEADER_OFFSET;
struct socfpga_header_v0 *header_v0;
return 0;
}
-static void stm32image_print_header(const void *ptr)
+static void stm32image_print_header(const void *ptr, struct image_tool_params *params)
{
struct stm32_header *stm32hdr = (struct stm32_header *)ptr;
return EXIT_SUCCESS;
}
-static void egon_print_header(const void *buf)
+static void egon_print_header(const void *buf, struct image_tool_params *params)
{
const struct boot_file_head *header = buf;
return "(unknown)";
}
-static void toc0_print_header(const void *buf)
+static void toc0_print_header(const void *buf, struct image_tool_params *params)
{
const struct toc0_main_info *main_info = buf;
const struct toc0_item_info *item_info = (void *)(main_info + 1);
return 0;
}
-static void ublimage_print_header(const void *ptr)
+static void ublimage_print_header(const void *ptr, struct image_tool_params *params)
{
struct ubl_header *ubl_hdr = (struct ubl_header *) ptr;
printf("header.fcb[%d] = %08x\n", idx, hdr->fcb[idx]);
}
-static void vybridimage_print_header(const void *ptr)
+static void vybridimage_print_header(const void *ptr, struct image_tool_params *params)
{
struct nand_page_0_boot_header *hdr =
(struct nand_page_0_boot_header *)ptr;
return 0;
}
-static void zynqimage_print_header(const void *ptr)
+static void zynqimage_print_header(const void *ptr, struct image_tool_params *params)
{
struct zynq_header *zynqhdr = (struct zynq_header *)ptr;
int i;
printf(" Checksum : 0x%08x\n", le32_to_cpu(ph->checksum));
}
-void zynqmpimage_print_header(const void *ptr)
+void zynqmpimage_print_header(const void *ptr, struct image_tool_params *params)
{
struct zynqmp_header *zynqhdr = (struct zynqmp_header *)ptr;
int i;
};
void zynqmpimage_default_header(struct zynqmp_header *ptr);
-void zynqmpimage_print_header(const void *ptr);
+void zynqmpimage_print_header(const void *ptr, struct image_tool_params *params);
#endif /* _ZYNQMPIMAGE_H_ */