wlan-ap-Telecominfraproject/patches/0012-ipq806x-import-bootargs-append-from-IPQ40xx.patch
John Crispin 2837dc61e6 patches: move all patches into a single folder
This allows easier managing of updated patches.

Signed-off-by: John Crispin <john@phrozen.org>
2020-09-22 18:20:11 +02:00

42 lines
1.6 KiB
Diff

From c938f2d93c3140899e1b234a37a2219d680d86d3 Mon Sep 17 00:00:00 2001
From: Robert Marko <robert.marko@sartura.hr>
Date: Mon, 18 May 2020 12:35:15 +0200
Subject: [PATCH 12/30] ipq806x: import bootargs-append from IPQ40xx
This imports the patch that adds bootargs-append support from IPQ40xx.
This way we can append additional boot arguments from DTS instead of only being able to overwrite them.
This way dual firmware devices can use the rootfs number that bootloader passes to decide from what to boot.
But we still need to append console info and ubi root info.
This is used by Edgecore ECW5410.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
.../patches-4.14/997-device_tree_cmdline.patch | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 target/linux/ipq806x/patches-4.14/997-device_tree_cmdline.patch
diff --git a/target/linux/ipq806x/patches-4.14/997-device_tree_cmdline.patch b/target/linux/ipq806x/patches-4.14/997-device_tree_cmdline.patch
new file mode 100644
index 0000000000..8b5e64a2d4
--- /dev/null
+++ b/target/linux/ipq806x/patches-4.14/997-device_tree_cmdline.patch
@@ -0,0 +1,12 @@
+--- a/drivers/of/fdt.c
++++ b/drivers/of/fdt.c
+@@ -1130,6 +1130,9 @@ int __init early_init_dt_scan_chosen(uns
+ p = of_get_flat_dt_prop(node, "bootargs", &l);
+ if (p != NULL && l > 0)
+ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
++ p = of_get_flat_dt_prop(node, "bootargs-append", &l);
++ if (p != NULL && l > 0)
++ strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE));
+
+ /*
+ * CONFIG_CMDLINE is meant to be a default in case nothing else
--
2.25.1