summaryrefslogtreecommitdiff
path: root/include/image.h
diff options
context:
space:
mode:
authorKarl Apsite <karl.apsite@dornerworks.com>2015-05-21 09:52:48 -0400
committerTom Rini <trini@konsulko.com>2015-05-28 08:18:20 -0400
commit84a07dbfd8e916788d685a4227f9a4e770375ffd (patch)
tree544aa02e596f6125acf9e9745dc6c3ab43c76a62 /include/image.h
parentecf8cd653530acb0ed8217a1d80c93841ec2005e (diff)
downloadu-boot-imx-84a07dbfd8e916788d685a4227f9a4e770375ffd.zip
u-boot-imx-84a07dbfd8e916788d685a4227f9a4e770375ffd.tar.gz
u-boot-imx-84a07dbfd8e916788d685a4227f9a4e770375ffd.tar.bz2
add boot_get_loadables() to load listed images
Added a trimmed down instance of boot_get_<thing>() to satisfy the minimum requierments of the added feature. The function follows the normal patterns set by other boot_get<thing>'s, which should make it a bit easier to combine them all together into one boot_get_image() function in a later refactor. Documentation for the new function can be found in source: include/image.h Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/image.h')
-rw-r--r--include/image.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/image.h b/include/image.h
index 97b96b3..b6eb57e 100644
--- a/include/image.h
+++ b/include/image.h
@@ -244,6 +244,7 @@ struct lmb;
#define IH_TYPE_SOCFPGAIMAGE 19 /* Altera SOCFPGA Preloader */
#define IH_TYPE_X86_SETUP 20 /* x86 setup.bin Image */
#define IH_TYPE_LPC32XXIMAGE 21 /* x86 setup.bin Image */
+#define IH_TYPE_LOADABLE 22 /* A list of typeless images */
/*
* Compression Types
@@ -455,7 +456,31 @@ ulong genimg_get_image(ulong img_addr);
int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
uint8_t arch, ulong *rd_start, ulong *rd_end);
-#endif
+
+/**
+ * boot_get_loadable - routine to load a list of binaries to memory
+ * @argc: Ignored Argument
+ * @argv: Ignored Argument
+ * @images: pointer to the bootm images structure
+ * @arch: expected architecture for the image
+ * @ld_start: Ignored Argument
+ * @ld_len: Ignored Argument
+ *
+ * boot_get_loadable() will take the given FIT configuration, and look
+ * for a field named "loadables". Loadables, is a list of elements in
+ * the FIT given as strings. exe:
+ * loadables = "linux_kernel@1", "fdt@2";
+ * this function will attempt to parse each string, and load the
+ * corresponding element from the FIT into memory. Once placed,
+ * no aditional actions are taken.
+ *
+ * @return:
+ * 0, if only valid images or no images are found
+ * error code, if an error occurs during fit_image_load
+ */
+int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
+ uint8_t arch, const ulong *ld_start, ulong * const ld_len);
+#endif /* !USE_HOSTCC */
int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch,
ulong *setup_start, ulong *setup_len);