summaryrefslogtreecommitdiffstats
path: root/common/oftree.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-28 14:57:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-31 08:32:37 +0200
commitb5167ee51ca21195aff4707f1a503708febe51c3 (patch)
tree057346bfd44adfd7e401bbdfafb6a83190e8b60d /common/oftree.c
parent08026afdeb1276163b8e99cb85c1e56779ff5c2f (diff)
downloadbarebox-b5167ee51ca21195aff4707f1a503708febe51c3.tar.gz
barebox-b5167ee51ca21195aff4707f1a503708febe51c3.tar.xz
bootm: print Kernel commandline in verbose mode
Without devicetree support we print the Kernel commandline in verbose mode. Do the same with devicetree boot aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/oftree.c')
-rw-r--r--common/oftree.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/oftree.c b/common/oftree.c
index 19fed6b0bc..475d418849 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -98,6 +98,21 @@ void of_print_property(const void *data, int len)
}
}
+void of_print_cmdline(struct device_node *root)
+{
+ struct device_node *node = of_find_node_by_path(root, "/chosen");
+ const char *cmdline;
+
+ if (!node) {
+ printf("commandline: no /chosen node\n");
+ return;
+ }
+
+ cmdline = of_get_property(node, "bootargs", NULL);
+
+ printf("commandline: %s\n", cmdline);
+}
+
static int of_fixup_bootargs(struct device_node *root)
{
struct device_node *node;