From de3d91ee8b7f268dbc5655daf17b76ac3d55ada3 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 20 Aug 2018 19:38:38 +0800 Subject: [PATCH] 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 --- init/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/init/main.c b/init/main.c index 18f8f0140fa0..d856f3bf2152 100644 --- a/init/main.c +++ b/init/main.c @@ -567,7 +567,23 @@ asmlinkage __visible void __init start_kernel(void) build_all_zonelists(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,