X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fmkimage.c;h=c70408c9ba02375ae959e20d438e4e65acfd75b0;hb=63f7af9a4cfb4a3b9136674c6612c6d13957c2cd;hp=7f221013e38cf20fe9bad4a42d1a7aca387e9924;hpb=bce8837071617a13f8e28f60400ee826b3f8a308;p=u-boot diff --git a/tools/mkimage.c b/tools/mkimage.c index 7f221013e3..c70408c9ba 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -19,7 +19,7 @@ static void usage(void); struct image_type_params *mkimage_tparams = NULL; /* parameters initialized by core will be used by the image type code */ -struct mkimage_params params = { +struct image_tool_params params = { .os = IH_OS_LINUX, .arch = IH_ARCH_PPC, .type = IH_TYPE_KERNEL, @@ -139,24 +139,8 @@ main (int argc, char **argv) struct image_type_params *tparams = NULL; int pad_len = 0; - /* Init Freescale PBL Boot image generation/list support */ - init_pbl_image_type(); - /* Init Kirkwood Boot image generation/list support */ - init_kwb_image_type (); - /* Init Freescale imx Boot image generation/list support */ - init_imx_image_type (); - /* Init Freescale mxs Boot image generation/list support */ - init_mxs_image_type(); - /* Init FIT image generation/list support */ - init_fit_image_type (); - /* Init TI OMAP Boot image generation/list support */ - init_omap_image_type(); - /* Init Default image generation/list support */ - init_default_image_type (); - /* Init Davinci UBL support */ - init_ubl_image_type(); - /* Init Davinci AIS support */ - init_ais_image_type(); + /* Init all image generation/list support */ + register_image_tool(mkimage_register); params.cmdname = *argv; params.addr = params.ep = 0; @@ -474,6 +458,7 @@ NXTARG: ; #if defined(_POSIX_SYNCHRONIZED_IO) && \ !defined(__sun__) && \ !defined(__FreeBSD__) && \ + !defined(__OpenBSD__) && \ !defined(__APPLE__) (void) fdatasync (ifd); #else @@ -517,6 +502,7 @@ NXTARG: ; #if defined(_POSIX_SYNCHRONIZED_IO) && \ !defined(__sun__) && \ !defined(__FreeBSD__) && \ + !defined(__OpenBSD__) && \ !defined(__APPLE__) (void) fdatasync (ifd); #else @@ -632,8 +618,7 @@ copy_file (int ifd, const char *datafile, int pad) (void) close (dfd); } -void -usage () +static void usage(void) { fprintf (stderr, "Usage: %s -l image\n" " -l ==> list image header information\n",