common: fdt_support: add hotkey to dump cmdline

Change-Id: Icb95fc242f9cb5ee33807aac6c25ebe093ba6ecd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-10-14 19:34:03 +08:00
parent 16bd710246
commit 7ceab85022
1 changed files with 11 additions and 3 deletions

View File

@ -286,6 +286,9 @@ int fdt_chosen(void *fdt)
int err;
int i;
char *str; /* used to set string properties */
int dump;
dump = is_hotkey(HK_CMDLINE);
err = fdt_check_header(fdt);
if (err < 0) {
@ -303,12 +306,16 @@ int fdt_chosen(void *fdt)
#ifdef CONFIG_ARCH_ROCKCHIP
const char *bootargs;
debug("uboot bootargs: %s\n\n", str);
if (dump)
printf("## U-Boot bootargs: %s\n", str);
for (i = 0; i < ARRAY_SIZE(arr_bootargs); i++) {
bootargs = fdt_getprop(fdt, nodeoffset,
arr_bootargs[i], NULL);
if (bootargs) {
debug("kernel %s: %s\n\n", arr_bootargs[i], bootargs);
if (dump)
printf("## Kernel %s: %s\n",
arr_bootargs[i], bootargs);
/*
* Append kernel bootargs
* If use AB system, delete default "root=" which route
@ -349,7 +356,8 @@ int fdt_chosen(void *fdt)
}
}
debug("merged bootargs: %s\n\n", env_get("bootargs"));
if (dump)
printf("## Merged bootargs: %s\n", env_get("bootargs"));
return fdt_fixup_stdout(fdt, nodeoffset);
}