lede/target/linux/generic/hack-5.18/920-device_tree_cmdline.patch
aakkll bb92ec6dfc
kernel: 5.18: refresh patches (#9714)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2022-07-09 01:05:05 +08:00

13 lines
471 B
Diff

--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1165,6 +1165,9 @@ int __init early_init_dt_scan_chosen(cha
p = of_get_flat_dt_prop(node, "bootargs", &l);
if (p != NULL && l > 0)
strlcpy(cmdline, p, min(l, COMMAND_LINE_SIZE));
+ p = of_get_flat_dt_prop(node, "bootargs-append", &l);
+ if (p != NULL && l > 0)
+ strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE));
/*
* CONFIG_CMDLINE is meant to be a default in case nothing else