summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorTao Huang <huangtao@rock-chips.com>2018-08-20 19:38:38 +0800
committerTao Huang <huangtao@rock-chips.com>2018-08-21 15:59:56 +0800
commitab350b549ae0f45e0842a56c5d71f1437451571d (patch)
treedaa2c4db671350600038be7ea31220048099ca2a /init
parent1d39cfca2ca3a5026eea26eb91e4b7bf2bb77331 (diff)
rk: init/main.c: support print long kernel command line
With features AVB / dm-verity enabled, cmdline content is about to exceed previous maximum 2048 bytes. printk can not support long line exceed LOG_LINE_MAX which less than 1024. So loop printk until all content are printed in init/main.c. Change-Id: I4c40b5302d82122b93161fe30082f5abcfcad069 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Diffstat (limited to 'init')
-rw-r--r--init/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index db6b6cbb846b..ad8ed67e7f4d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -534,7 +534,23 @@ asmlinkage __visible void __init start_kernel(void)
build_all_zonelists(NULL, NULL);
page_alloc_init();
+#ifdef CONFIG_ARCH_ROCKCHIP
+ {
+ const char *s = boot_command_line;
+ const char *e = &boot_command_line[strlen(boot_command_line)];
+ int n =
+ pr_notice("Kernel command line: %s\n", boot_command_line);
+ n -= strlen("Kernel command line: ");
+ s += n;
+ /* command line maybe too long to print one time */
+ while (n > 0 && s < e) {
+ n = pr_cont("%s\n", s);
+ s += n;
+ }
+ }
+#else
pr_notice("Kernel command line: %s\n", boot_command_line);
+#endif
parse_early_param();
after_dashes = parse_args("Booting kernel",
static_command_line, __start___param,