[OpenWrt-Devel] [PATCH] ramips: Don't override the bootloader cmdline args if none are provided in dtb
jstefek at datto.com
jstefek at datto.com
Thu Jun 20 18:57:54 EDT 2019
From: Joe Stefek <jstefek at datto.com>
This change allows cmdline arguments provided by the bootloader to be used
if no cmdline arguments are provided in the "custom" section of the device
tree.
---
target/linux/ramips/patches-4.14/0100-prom_fixes.patch | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/target/linux/ramips/patches-4.14/0100-prom_fixes.patch b/target/linux/ramips/patches-4.14/0100-prom_fixes.patch
index 91ac3b22c4..ae42e72070 100644
--- a/target/linux/ramips/patches-4.14/0100-prom_fixes.patch
+++ b/target/linux/ramips/patches-4.14/0100-prom_fixes.patch
@@ -39,19 +39,21 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
void __init plat_mem_setup(void)
{
void *dtb = NULL;
-@@ -82,7 +95,11 @@ void __init plat_mem_setup(void)
+@@ -82,9 +95,11 @@ void __init plat_mem_setup(void)
else if (__dtb_start != __dtb_end)
dtb = (void *)__dtb_start;
- __dt_setup_arch(dtb);
+-
+- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
+ __dt_setup_arch(&__image_dtb);
+
+ of_scan_flat_dt(early_init_dt_find_chosen, NULL);
+ if (chosen_dtb)
+ strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
-
+ of_scan_flat_dt(early_init_dt_find_memory, NULL);
+ if (memory_dtb)
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -85,6 +85,9 @@ EXPORT(__image_cmdline)
--
2.20.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list