summaryrefslogtreecommitdiffstats
path: root/common/image-fit.c
Commit message (Collapse)AuthorAgeFilesLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* bootm: Use selected configuration for ramdisk and fdtSimon Glass2013-07-121-1/+5
| | | | | | | | | | | | | | | If a specific configuraion is selected by the bootm command, e.g. with 'bootm 84000000#recoveryconf' we must honour this for not just the kernel, but also the ramdisk and FDT. In the conversion to using a common fit_image_load() function for loading images from FITs (commits a51ec63 and 53f375f) this feature was lost. Reinstate it by passing the selected configuration back from fit_image_load() to boot_get_kernel(), then use this configuration (which is stored in images->fit_uname_cfg) in both boot_get_ramdisk() and boot_get_fdt(). Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Support signing of imagesSimon Glass2013-06-261-23/+60
| | | | | | | | Add support for signing images using a new signature node. The process is handled by fdt_add_verification_data() which now takes parameters to provide the keys and related information. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Use ENOENT instead of ENOMEDIUM for better compatibilitySimon Glass2013-06-171-1/+1
| | | | | | | | | This error may not be defined on some platforms such as MacOS so host compilation will fail. Use one of the more common errors instead. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Andreas Bießmann <andreas.devel@googlemail.com> Tested-by: Lubomir Popov <lpopov@mm-sol.com>
* sandbox: image: Adjust FIT image printing to work with sandboxSimon Glass2013-06-041-3/+6
| | | | | | | Use map_sysmem() to convert from address to pointer, so that sandbox can print FIT information without crashing. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Use fit_image_load() to load kernelSimon Glass2013-06-041-19/+0
| | | | | | | Use the new common code to load a kernel. The functionality should not change. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Use fit_image_load() to load FDTSimon Glass2013-06-041-19/+0
| | | | | | | | Use the new common code to load a flat device tree. Also fix up a few casts so that this code works with sandbox. Other than that the functionality should not change. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Use fit_image_load() to load ramdiskSimon Glass2013-06-041-62/+0
| | | | | | | Use the new common code to load a ramdisk. The functionality should not change. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Introduce fit_image_load() to load images from FITsSimon Glass2013-06-041-0/+231
| | | | | | | | | | | At present code to load an image from a FIT is duplicated in the three places where it is needed (kernel, fdt, ramdisk). The differences between these different code copies is fairly minor. Create a new function in the fit code which can handle any of the requirements of those cases. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Add CONFIG_FIT_SPL_PRINT to control FIT image printing in SPLSimon Glass2013-05-141-3/+5
| | | | | | | | This code is very large, and in SPL it isn't always useful to print out image information (in fact there might not even be a console active). So disable this feature unless this option is set. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Remove remaining #ifdefs in image-fit.cSimon Glass2013-05-141-7/+2
| | | | | | | There are only two left. One is unnecessary and the other can be moved to the header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Rename hash printing to fit_image_print_verification_data()Simon Glass2013-05-141-52/+79
| | | | | | | | This function will be used to print signatures as well as hashes, so rename it. Also make it static since it is not used outside this file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Export fit_conf_get_prop_node()Simon Glass2013-05-141-4/+4
| | | | | | | This function will be needed by signature checking code, so export it, and also add docs. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Move error! string to common placeSimon Glass2013-05-141-11/+8
| | | | | | | | The string " error\n" appears in each error string. Move it out to a common place. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Move hash checking into its own functionSimon Glass2013-05-141-62/+66
| | | | | | | | The existing function is long and most of the code is indented a long way. Before adding yet more code, split this out into its own function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> (v1)
* image: Rename fit_image_check_hashes() to fit_image_verify()Simon Glass2013-05-141-8/+8
| | | | | | | | | This is the main entry point to the FIT image verification code. We will be using it to handle image verification with signatures, so rename the function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Move HOSTCC image code to tools/Simon Glass2013-05-141-170/+1
| | | | | | | | This code is never compiled into U-Boot, so move it into a separate file in tools/ to avoid the large #ifdef. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Split FIT code into new image-fit.cSimon Glass2013-05-141-0/+1636
The FIT code is about half the size of the >3000-line image.c. Split this code into its own file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
OpenPOWER on IntegriCloud