920-device_tree_cmdline.patch 703 B

123456789101112131415161718192021
  1. From e08bcbbaa52fcc41f02743fd2e62a33255ce52da Mon Sep 17 00:00:00 2001
  2. From: OpenWrt community <[email protected]>
  3. Date: Wed, 13 Jul 2022 13:52:28 +0200
  4. Subject: [PATCH] of/ftd: add device tree cmdline
  5. ---
  6. drivers/of/fdt.c | 3 +++
  7. 1 file changed, 3 insertions(+)
  8. --- a/drivers/of/fdt.c
  9. +++ b/drivers/of/fdt.c
  10. @@ -1183,6 +1183,9 @@ int __init early_init_dt_scan_chosen(cha
  11. p = of_get_flat_dt_prop(node, "bootargs", &l);
  12. if (p != NULL && l > 0)
  13. strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE));
  14. + p = of_get_flat_dt_prop(node, "bootargs-append", &l);
  15. + if (p != NULL && l > 0)
  16. + strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE));
  17. handle_cmdline:
  18. /*