summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-03-14 16:16:02 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-04-04 07:44:26 +0200
commitd5e19a7ea2a9cdb156677ce957183a8c8b5a2fe5 (patch)
tree53637927bf18236629e4df1f4a65e588489cf426 /include
parentd4ff9c40baf3cf64565c423d6f7622f27ec48a84 (diff)
downloadbarebox-d5e19a7ea2a9cdb156677ce957183a8c8b5a2fe5.tar.gz
barebox-d5e19a7ea2a9cdb156677ce957183a8c8b5a2fe5.tar.xz
bootm: provide handlers the start of the OS image
The bootm code needs to read the beginning of the OS image in order to determine the filetype. If it does so already, then we can provide the handlers the buffer. This can help the handlers to find some image metadata before loading the full image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/bootm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/bootm.h b/include/bootm.h
index 35c18dc276..62951d6058 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -81,6 +81,13 @@ struct image_data {
struct fdt_header *oftree;
struct resource *oftree_res;
+ /*
+ * The first PAGE_SIZE bytes of the OS image. Can be used by the image
+ * handlers to analyze the OS image before actually loading the bulk of
+ * it.
+ */
+ void *os_header;
+
enum bootm_verify verify;
int verbose;
int force;