From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Tyser Date: Tue, 24 Nov 2009 16:42:09 -0600 Subject: [U-Boot] [PATCH 2/3] tools/fit_image.c: Remove unused fit_set_header() In-Reply-To: <1259102530-32071-1-git-send-email-ptyser@xes-inc.com> References: <1259102530-32071-1-git-send-email-ptyser@xes-inc.com> Message-ID: <1259102530-32071-2-git-send-email-ptyser@xes-inc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The FIT fit_set_header() function was copied from the standard uImage's image_set_header() function during mkimage reorganization. However, the fit_set_header() function is not used since FIT images use a standard device tree blob header. Signed-off-by: Peter Tyser --- tools/fit_image.c | 34 +--------------------------------- 1 files changed, 1 insertions(+), 33 deletions(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index d1e612f..ef9ffee 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -155,38 +155,6 @@ static int fit_handle_file (struct mkimage_params *params) return (EXIT_SUCCESS); } -static void fit_set_header (void *ptr, struct stat *sbuf, int ifd, - struct mkimage_params *params) -{ - uint32_t checksum; - - image_header_t * hdr = (image_header_t *)ptr; - - checksum = crc32 (0, - (const unsigned char *)(ptr + - sizeof(image_header_t)), - sbuf->st_size - sizeof(image_header_t)); - - /* Build new header */ - image_set_magic (hdr, IH_MAGIC); - image_set_time (hdr, sbuf->st_mtime); - image_set_size (hdr, sbuf->st_size - sizeof(image_header_t)); - image_set_load (hdr, params->addr); - image_set_ep (hdr, params->ep); - image_set_dcrc (hdr, checksum); - image_set_os (hdr, params->os); - image_set_arch (hdr, params->arch); - image_set_type (hdr, params->type); - image_set_comp (hdr, params->comp); - - image_set_name (hdr, params->imagename); - - checksum = crc32 (0, (const unsigned char *)hdr, - sizeof(image_header_t)); - - image_set_hcrc (hdr, checksum); -} - static int fit_check_params (struct mkimage_params *params) { return ((params->dflag && (params->fflag || params->lflag)) || @@ -202,7 +170,7 @@ static struct image_type_params fitimage_params = { .print_header = fit_print_contents, .check_image_type = fit_check_image_types, .fflag_handle = fit_handle_file, - .set_header = fit_set_header, + .set_header = NULL, /* FIT images use DTB header */ .check_params = fit_check_params, }; -- 1.6.2.1