]> git.baikalelectronics.ru Git - uboot.git/commit
image: fit: Add some helpers for getting data
authorSean Anderson <sean.anderson@seco.com>
Tue, 16 Aug 2022 15:16:03 +0000 (11:16 -0400)
committerPeng Fan <peng.fan@nxp.com>
Wed, 7 Sep 2022 05:40:44 +0000 (13:40 +0800)
commit9ee8fd4e4ecb702b71febee48ddb8ba4616b4137
treef0bd4bb1719af7594087e97511d023ff099e5924
parent010f55d86c18dc60af055185aa926ed39fa01901
image: fit: Add some helpers for getting data

Several different firmware users have repetitive code to extract the
firmware data from a FIT. Add some helper functions to reduce the amount
of repetition. fit_conf_get_prop_node (eventually) calls
fdt_check_node_offset_, so we can avoid an explicit if. In general, this
version avoids printing on error because the callers are typically
library functions, and because the FIT code generally has (debug)
prints of its own. One difference in these helpers is that they use
fit_image_get_data_and_size instead of fit_image_get_data, as the former
handles external data correctly.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
boot/image-fit.c
include/image.h