kernel: Update to version 4.4.182
[openwrt/staging/pepe2k.git] / target / linux / ipq806x / patches-4.4 / 996-ATAG_DTB_COMPAT_CMDLINE_MANGLE.patch
index 490886ee44daf43d803b02b4789d6bace94b3bab..41a5cd890e126765a9371783ee596b1fcc1184ba 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
 
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -1927,6 +1927,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1928,6 +1928,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
          The command-line arguments provided by the boot loader will be
          appended to the the device tree bootargs property.
  
@@ -64,9 +64,9 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
 +      ptr = str - 1;
 +
 +      do {
-+              ptr++;
 +              //first find an 'r' at the begining or after a space
 +              do {
++                      ptr++;
 +                      ptr = strchr(ptr, 'r');
 +                      if(!ptr) return dest;
 +
@@ -107,7 +107,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
  static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
  {
        char cmdline[COMMAND_LINE_SIZE];
-@@ -85,12 +134,21 @@ static void merge_fdt_bootargs(void *fdt
+@@ -85,12 +140,21 @@ static void merge_fdt_bootargs(void *fdt
  
        /* and append the ATAG_CMDLINE */
        if (fdt_cmdline) {
@@ -129,7 +129,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
        }
        *ptr = '\0';
  
-@@ -147,7 +205,9 @@ int atags_to_fdt(void *atag_list, void *
+@@ -147,7 +211,9 @@ int atags_to_fdt(void *atag_list, void *
                        else
                                setprop_string(fdt, "/chosen", "bootargs",
                                               atag->u.cmdline.cmdline);
@@ -140,7 +140,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
                        if (memcount >= sizeof(mem_reg_property)/4)
                                continue;
                        if (!atag->u.mem.size)
-@@ -186,6 +246,10 @@ int atags_to_fdt(void *atag_list, void *
+@@ -186,6 +252,10 @@ int atags_to_fdt(void *atag_list, void *
                setprop(fdt, "/memory", "reg", mem_reg_property,
                        4 * memcount * memsize);
        }
@@ -153,7 +153,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
  }
 --- a/init/main.c
 +++ b/init/main.c
-@@ -88,6 +88,10 @@
+@@ -89,6 +89,10 @@
  #include <asm/sections.h>
  #include <asm/cacheflush.h>
  
@@ -164,7 +164,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
  static int kernel_init(void *);
  
  extern void init_IRQ(void);
-@@ -585,6 +589,18 @@ asmlinkage __visible void __init start_k
+@@ -562,6 +566,18 @@ asmlinkage __visible void __init start_k
        page_alloc_init();
  
        pr_notice("Kernel command line: %s\n", boot_command_line);
@@ -180,6 +180,6 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
 +      }
 +#endif
 +
+       /* parameters may set static keys */
+       jump_label_init();
        parse_early_param();
-       after_dashes = parse_args("Booting kernel",
-                                 static_command_line, __start___param,