Commit 8e1c89663cc8796b85588910046e03b388a7597c
Committed by
Wolfgang Denk
1 parent
1a99de2cb4
Exists in
master
and in
54 other branches
tools/fit_image.c: Remove unused fit_set_header()
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 <ptyser@xes-inc.com>
Showing 1 changed file with 1 additions and 33 deletions Side-by-side Diff
tools/fit_image.c
... | ... | @@ -155,38 +155,6 @@ |
155 | 155 | return (EXIT_SUCCESS); |
156 | 156 | } |
157 | 157 | |
158 | -static void fit_set_header (void *ptr, struct stat *sbuf, int ifd, | |
159 | - struct mkimage_params *params) | |
160 | -{ | |
161 | - uint32_t checksum; | |
162 | - | |
163 | - image_header_t * hdr = (image_header_t *)ptr; | |
164 | - | |
165 | - checksum = crc32 (0, | |
166 | - (const unsigned char *)(ptr + | |
167 | - sizeof(image_header_t)), | |
168 | - sbuf->st_size - sizeof(image_header_t)); | |
169 | - | |
170 | - /* Build new header */ | |
171 | - image_set_magic (hdr, IH_MAGIC); | |
172 | - image_set_time (hdr, sbuf->st_mtime); | |
173 | - image_set_size (hdr, sbuf->st_size - sizeof(image_header_t)); | |
174 | - image_set_load (hdr, params->addr); | |
175 | - image_set_ep (hdr, params->ep); | |
176 | - image_set_dcrc (hdr, checksum); | |
177 | - image_set_os (hdr, params->os); | |
178 | - image_set_arch (hdr, params->arch); | |
179 | - image_set_type (hdr, params->type); | |
180 | - image_set_comp (hdr, params->comp); | |
181 | - | |
182 | - image_set_name (hdr, params->imagename); | |
183 | - | |
184 | - checksum = crc32 (0, (const unsigned char *)hdr, | |
185 | - sizeof(image_header_t)); | |
186 | - | |
187 | - image_set_hcrc (hdr, checksum); | |
188 | -} | |
189 | - | |
190 | 158 | static int fit_check_params (struct mkimage_params *params) |
191 | 159 | { |
192 | 160 | return ((params->dflag && (params->fflag || params->lflag)) || |
... | ... | @@ -202,7 +170,7 @@ |
202 | 170 | .print_header = fit_print_contents, |
203 | 171 | .check_image_type = fit_check_image_types, |
204 | 172 | .fflag_handle = fit_handle_file, |
205 | - .set_header = fit_set_header, | |
173 | + .set_header = NULL, /* FIT images use DTB header */ | |
206 | 174 | .check_params = fit_check_params, |
207 | 175 | }; |
208 | 176 |