summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-01-29 10:10:14 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-02-08 08:55:57 +0100
commitd2411eaf76ef52f2ccf7f3e39226082fbdd3dcd1 (patch)
tree4ea2845c64579b6b24d3927ed00c68d3916a5762 /include
parentea76b402ece8cbecc85d573bcacf5652dba7f590 (diff)
downloadbarebox-d2411eaf76ef52f2ccf7f3e39226082fbdd3dcd1.tar.gz
barebox-d2411eaf76ef52f2ccf7f3e39226082fbdd3dcd1.tar.xz
FIT: Let user specify the configuration to use
The images in FIT images can be opened in two different ways. They can be either opened directly based on their names in the images/ node or as part of a configuration based on their names in the corresponding /configuration/ node. So far we only supported the latter. To prepare supporting the former we return a cookie belonging to the configuration from fit_open_configuration() which we use in fit_open_image() to refer to the desired configuration. While at it document fit_open_configuration(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/bootm.h1
-rw-r--r--include/image-fit.h11
2 files changed, 7 insertions, 5 deletions
diff --git a/include/bootm.h b/include/bootm.h
index 7ba7b8b96f..35c18dc276 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -75,6 +75,7 @@ struct image_data {
const void *fit_kernel;
unsigned long fit_kernel_size;
+ void *fit_config;
struct device_node *of_root_node;
struct fdt_header *oftree;
diff --git a/include/image-fit.h b/include/image-fit.h
index 0e26a40ef7..31e23b235a 100644
--- a/include/image-fit.h
+++ b/include/image-fit.h
@@ -29,15 +29,16 @@ struct fit_handle {
enum bootm_verify verify;
struct device_node *root;
- struct device_node *conf_node;
};
struct fit_handle *fit_open(const char *filename, bool verbose,
enum bootm_verify verify);
-int fit_open_configuration(struct fit_handle *handle, const char *name);
-int fit_has_image(struct fit_handle *handle, const char *name);
-int fit_open_image(struct fit_handle *handle, const char *name,
- const void **outdata, unsigned long *outsize);
+void *fit_open_configuration(struct fit_handle *handle, const char *name);
+int fit_has_image(struct fit_handle *handle, void *configuration,
+ const char *name);
+int fit_open_image(struct fit_handle *handle, void *configuration,
+ const char *name, const void **outdata,
+ unsigned long *outsize);
void fit_close(struct fit_handle *handle);