return 0;
}
+#ifndef USE_HOSTCC
+/**
+ * fit_image_hash_get_ignore - get hash ignore flag
+ * @fit: pointer to the FIT format image header
+ * @noffset: hash node offset
+ * @ignore: pointer to an int, will hold hash ignore flag
+ *
+ * fit_image_hash_get_ignore() finds hash ignore property in a given hash node.
+ * If the property is found and non-zero, the hash algorithm is not verified by
+ * u-boot automatically.
+ *
+ * returns:
+ * 0, on ignore not found
+ * value, on ignore found
+ */
+int fit_image_hash_get_ignore(const void *fit, int noffset, int *ignore)
+{
+ int len;
+ int *value;
+
+ value = (int *)fdt_getprop(fit, noffset, FIT_IGNORE_PROP, &len);
+ if (value == NULL || len != sizeof(int))
+ *ignore = 0;
+ else
+ *ignore = *value;
+
+ return 0;
+}
+#endif
+
/**
* fit_set_timestamp - set node timestamp property
* @fit: pointer to the FIT format image header
char *algo;
uint8_t *fit_value;
int fit_value_len;
+#ifndef USE_HOSTCC
+ int ignore;
+#endif
uint8_t value[FIT_MAX_HASH_LEN];
int value_len;
int noffset;
}
printf("%s", algo);
+#ifndef USE_HOSTCC
+ fit_image_hash_get_ignore(fit, noffset, &ignore);
+ if (ignore) {
+ printf("-skipped ");
+ continue;
+ }
+#endif
+
if (fit_image_hash_get_value(fit, noffset, &fit_value,
&fit_value_len)) {
err_msg = " error!\nCan't get hash value "
#define FIT_HASH_NODENAME "hash"
#define FIT_ALGO_PROP "algo"
#define FIT_VALUE_PROP "value"
+#define FIT_IGNORE_PROP "uboot-ignore"
/* image node */
#define FIT_DATA_PROP "data"
int fit_image_hash_get_algo(const void *fit, int noffset, char **algo);
int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value,
int *value_len);
+#ifndef USE_HOSTCC
+int fit_image_hash_get_ignore(const void *fit, int noffset, int *ignore);
+#endif
int fit_set_timestamp(void *fit, int noffset, time_t timestamp);
int fit_set_hashes(void *fit);