summaryrefslogtreecommitdiffstats
path: root/include/bootstrap.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-01-22 15:40:43 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-22 22:03:44 +0100
commitdf132b9d7854507f7501b20d7134dd18c0c63f2b (patch)
treefe8daa797f0f49502b0008d8380de481c29554d6 /include/bootstrap.h
parent345dd514671a0afcad6b0d3291bca8c067b3930c (diff)
downloadbarebox-df132b9d7854507f7501b20d7134dd18c0c63f2b.tar.gz
barebox-df132b9d7854507f7501b20d7134dd18c0c63f2b.tar.xz
introduce common bootstrap code
This will allow to have a generic code to create different bootstrap As example Barebox as TI Xloader Barebox as AT91 Bootstrap Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/bootstrap.h')
-rw-r--r--include/bootstrap.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/bootstrap.h b/include/bootstrap.h
new file mode 100644
index 0000000000..0fa6b83157
--- /dev/null
+++ b/include/bootstrap.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
+ *
+ * Under GPLv2
+ */
+
+#ifndef __BOOSTRAP_H__
+#define __BOOSTRAP_H__
+
+#define bootstrap_err(fmt, arg...) printf(fmt, ##arg)
+
+void bootstrap_boot(int (*func)(void), bool barebox);
+
+#ifdef CONFIG_BOOTSTRAP_DEVFS
+void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
+ int default_size, int max_size);
+#else
+static inline void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
+ int default_size, int max_size)
+{
+ return NULL;
+}
+#endif
+
+#ifdef CONFIG_BOOTSTRAP_DISK
+void* bootstrap_read_disk(char *devname, char *fstype);
+#else
+static inline void* bootstrap_read_disk(char *devname, char *fstype)
+{
+ return NULL;
+}
+#endif
+
+#endif /* __BOOSTRAP_H__ */