summaryrefslogtreecommitdiffstats
path: root/include/boot.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-09-23 11:15:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-09-24 09:03:18 +0200
commitb15c5eeecfbe4e4d1167b67a897d6c61dbae4251 (patch)
tree4fe11d458b5732eb716f5231c65c6bd9415486fd /include/boot.h
parent172fc40f617799023e56cb005f088a522ab6fe6f (diff)
downloadbarebox-b15c5eeecfbe4e4d1167b67a897d6c61dbae4251.tar.gz
barebox-b15c5eeecfbe4e4d1167b67a897d6c61dbae4251.tar.xz
bootm: separate bootm input data and internal data
We used to use struct image_data as the central data structure for bootm and also as the input data structure. This makes it unclear which of the fields are actually input data. This patch creates a struct bootm_data which is exclusively used for input data to make usage clearer. Also it moves the dispatching of multifile uImage pathnames to the core bootm code so that the core code gets more flexible and the command code simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/boot.h')
-rw-r--r--include/boot.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/boot.h b/include/boot.h
index 8d42d39103..3bb55e7b2e 100644
--- a/include/boot.h
+++ b/include/boot.h
@@ -7,6 +7,20 @@
#include <linux/list.h>
#include <environment.h>
+struct bootm_data {
+ const char *os_file;
+ const char *initrd_file;
+ const char *oftree_file;
+ int verbose;
+ bool verify;
+ bool force;
+ unsigned long initrd_address;
+ unsigned long os_address;
+ unsigned long os_entry;
+};
+
+int bootm_boot(struct bootm_data *data);
+
struct image_data {
/* simplest case. barebox has already loaded the os here */
struct resource *os_res;
@@ -94,8 +108,6 @@ static inline int linux_bootargs_overwrite(const char *bootargs)
#define UIMAGE_SOME_ADDRESS (UIMAGE_INVALID_ADDRESS - 1)
-int bootm_boot(struct image_data *);
-
unsigned long long getenv_loadaddr(const char *name);
#endif /* __BOOT_H */