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>
This commit is contained in:
parent
08026afdeb
commit
b5167ee51c
|
@ -91,6 +91,8 @@ static int __do_bootm_linux(struct image_data *data, int swap)
|
|||
of_add_reserve_entry(initrd_start, initrd_end);
|
||||
data->oftree = of_get_fixed_tree(data->of_root_node);
|
||||
fdt_add_reserve_map(data->oftree);
|
||||
if (bootm_verbose(data))
|
||||
of_print_cmdline(data->of_root_node);
|
||||
if (bootm_verbose(data) > 1)
|
||||
of_print_nodes(data->of_root_node, 0);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -138,6 +138,7 @@ int of_get_named_gpio(struct device_node *np,
|
|||
|
||||
struct device_node *of_find_node_by_phandle(phandle phandle);
|
||||
void of_print_property(const void *data, int len);
|
||||
void of_print_cmdline(struct device_node *root);
|
||||
|
||||
int of_device_is_compatible(const struct device_node *device,
|
||||
const char *compat);
|
||||
|
|
Loading…
Reference in New Issue