wlan-ap-Telecominfraproject/patches/wlan-ap/0004-ipq806x-import-bootargs-append-from-IPQ40xx.patch
John Crispin ae51caf8a5 wlan-ap: initial import
based on the develop branch -> 6af07cd39cfa06ec8eb4d6182c7d7923236c2dbf

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-01 15:35:04 +02:00

42 lines
1.6 KiB
Diff

From a7dd83202c73e8dec2963d97d1a0580dcd4add7a 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 4/7] 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