projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SPDX: Convert all of our single license tags to Linux Kernel style
[oweals/u-boot.git]
/
common
/
spl
/
spl_fit.c
diff --git
a/common/spl/spl_fit.c
b/common/spl/spl_fit.c
index cc07fbc8a02adc332fd4a7b45b574aa0f74b17ad..8b5befcec2b124aabdd4158772028f83bb0065a3 100644
(file)
--- a/
common/spl/spl_fit.c
+++ b/
common/spl/spl_fit.c
@@
-1,14
+1,13
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2016 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
/*
* Copyright (C) 2016 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <errno.h>
#include <image.h>
*/
#include <common.h>
#include <errno.h>
#include <image.h>
-#include <libfdt.h>
+#include <li
nux/li
bfdt.h>
#include <spl.h>
#ifndef CONFIG_SYS_BOOTM_LEN
#include <spl.h>
#ifndef CONFIG_SYS_BOOTM_LEN
@@
-174,6
+173,9
@@
static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
uint8_t image_comp = -1, type = -1;
const void *data;
bool external_data = false;
uint8_t image_comp = -1, type = -1;
const void *data;
bool external_data = false;
+#ifdef CONFIG_SPL_FIT_SIGNATURE
+ int ret;
+#endif
if (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP)) {
if (fit_image_get_comp(fit, node, &image_comp))
if (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP)) {
if (fit_image_get_comp(fit, node, &image_comp))
@@
-252,7
+254,16
@@
static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
image_info->entry_point = fdt_getprop_u32(fit, node, "entry");
}
image_info->entry_point = fdt_getprop_u32(fit, node, "entry");
}
+#ifdef CONFIG_SPL_FIT_SIGNATURE
+ printf("## Checking hash(es) for Image %s ...\n",
+ fit_get_name(fit, node, NULL));
+ ret = fit_image_verify_with_data(fit, node,
+ (const void *)load_addr, length);
+ printf("\n");
+ return !ret;
+#else
return 0;
return 0;
+#endif
}
static int spl_fit_append_fdt(struct spl_image_info *spl_image,
}
static int spl_fit_append_fdt(struct spl_image_info *spl_image,
@@
-383,7
+394,8
@@
int spl_load_simple_fit(struct spl_image_info *spl_image,
* - fall back to using the first 'loadables' entry
*/
if (node < 0)
* - fall back to using the first 'loadables' entry
*/
if (node < 0)
- node = spl_fit_get_image_node(fit, images, "firmware", 0);
+ node = spl_fit_get_image_node(fit, images, FIT_FIRMWARE_PROP,
+ 0);
#ifdef CONFIG_SPL_OS_BOOT
if (node < 0)
node = spl_fit_get_image_node(fit, images, FIT_KERNEL_PROP, 0);
#ifdef CONFIG_SPL_OS_BOOT
if (node < 0)
node = spl_fit_get_image_node(fit, images, FIT_KERNEL_PROP, 0);