
On Tue, 16 Aug 2022 at 09:16, Sean Anderson sean.anderson@seco.com wrote:
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
Changes in v2:
- Document helpers
boot/image-fit.c | 37 +++++++++++++++++++++++++ include/image.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org