summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/boot.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/boot.h b/include/boot.h
index a17bf25a4c..3ce0de125b 100644
--- a/include/boot.h
+++ b/include/boot.h
@@ -5,6 +5,7 @@
#include <filetype.h>
#include <of.h>
#include <linux/list.h>
+#include <environment.h>
struct image_data {
/* simplest case. barebox has already loaded the os here */
@@ -71,4 +72,19 @@ static inline int bootm_verbose(struct image_data *data)
}
#endif
+#ifdef CONFIG_FLEXIBLE_BOOTARGS
+const char *linux_bootargs_get(void);
+int linux_bootargs_overwrite(const char *bootargs);
+#else
+static inline const char *linux_bootargs_get(void)
+{
+ return getenv("bootargs");
+}
+
+static inline int linux_bootargs_overwrite(const char *bootargs)
+{
+ return setenv("bootargs", bootargs);
+}
+#endif
+
#endif /* __BOOT_H */