reset upstream subtrees to HEAD

Reset the following subtrees on HEAD:
  poky: 8217b477a1(master)
  meta-xilinx: 64aa3d35ae(master)
  meta-openembedded: 0435c9e193(master)
  meta-raspberrypi: 490a4441ac(master)
  meta-security: cb6d1c85ee(master)

Squashed patches:
  meta-phosphor: drop systemd 239 patches
  meta-phosphor: mrw-api: use correct install path

Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/140-mips_disable_devicetree_support.patch b/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/140-mips_disable_devicetree_support.patch
new file mode 100644
index 0000000..b3ef3c8
--- /dev/null
+++ b/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/140-mips_disable_devicetree_support.patch
@@ -0,0 +1,163 @@
+From 5ea7cd78cd252ffd3a9f3fbc8dc795d6e1596084 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <andrea.adami@gmail.com>
+Date: Mon, 17 Dec 2018 11:25:20 +0100
+Subject: [PATCH] kexec-tools: fix non-device tree devices on mips
+
+Add additional argument '--no-dtb' which disables device tree
+search in currently loaded kernel.
+
+Taken from LEDE-DEV:
+https://patchwork.ozlabs.org/patch/852961/
+
+Rebased for kexec-tools 2.0.18
+Removed ppc change (unwanted ?)
+
+Signed-off-by: Konstantin Kuzov <master.nosferatu@gmail.com>
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ kexec/arch/mips/include/arch/options.h |  4 +-
+ kexec/arch/mips/kexec-elf-mips.c       | 58 ++++++++++++++------------
+ kexec/arch/mips/kexec-mips.c           |  4 ++
+ kexec/arch/mips/kexec-mips.h           |  1 +
+ 4 files changed, 39 insertions(+), 28 deletions(-)
+
+diff --git a/kexec/arch/mips/include/arch/options.h b/kexec/arch/mips/include/arch/options.h
+index 416e224..18d2811 100644
+--- a/kexec/arch/mips/include/arch/options.h
++++ b/kexec/arch/mips/include/arch/options.h
+@@ -5,6 +5,7 @@
+ #define OPT_APPEND	(OPT_ARCH_MAX+0)
+ #define OPT_DTB		(OPT_ARCH_MAX+1)
+ #define OPT_RAMDISK	(OPT_ARCH_MAX+2)
++#define OPT_NO_DTB	(OPT_ARCH_MAX+3)
+ 
+ /* Options relevant to the architecture (excluding loader-specific ones),
+  * in this case none:
+@@ -14,7 +15,8 @@
+ 	{"command-line", 1, 0, OPT_APPEND}, \
+ 	{"append",	 1, 0, OPT_APPEND}, \
+ 	{"dtb",		1, 0, OPT_DTB }, \
+-	{"initrd",	1, 0, OPT_RAMDISK },
++	{"initrd",	1, 0, OPT_RAMDISK }, \
++	{"no-dtb",	0, 0, OPT_NO_DTB },
+ 
+ 
+ #define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR ""
+diff --git a/kexec/arch/mips/kexec-elf-mips.c b/kexec/arch/mips/kexec-elf-mips.c
+index 849a7ba..5c0e535 100644
+--- a/kexec/arch/mips/kexec-elf-mips.c
++++ b/kexec/arch/mips/kexec-elf-mips.c
+@@ -141,35 +141,37 @@ int elf_mips_load(int argc, char **argv, const char *buf, off_t len,
+ 	else
+ 		cmdline_addr = 0;
+ 
+-	/* MIPS systems that have been converted to use device tree
+-	 * passed through UHI will use commandline in the DTB and
+-	 * the DTB passed as a separate buffer. Note that
+-	 * CMDLINE_PREFIX is skipped here intentionally, as it is
+-	 * used only in the legacy method */
+-
+-	if (arch_options.dtb_file) {
+-		dtb_buf = slurp_file(arch_options.dtb_file, &dtb_length);
+-	} else {
+-		create_flatten_tree(&dtb_buf, &dtb_length, cmdline_buf + strlen(CMDLINE_PREFIX));
+-	}
+ 
+-	if (arch_options.initrd_file) {
+-		initrd_buf = slurp_file(arch_options.initrd_file, &initrd_size);
++	if (!arch_options.no_dtb) {
++		/* MIPS systems that have been converted to use device tree
++		 * passed through UHI will use commandline in the DTB and
++		 * the DTB passed as a separate buffer. Note that
++		 * CMDLINE_PREFIX is skipped here intentionally, as it is
++		 * used only in the legacy method */
++
++		if (arch_options.dtb_file) {
++			dtb_buf = slurp_file(arch_options.dtb_file, &dtb_length);
++		} else {
++			create_flatten_tree(&dtb_buf, &dtb_length, cmdline_buf + strlen(CMDLINE_PREFIX));
++		}
+ 
+-		/* Create initrd entries in dtb - although at this time
+-		 * they would not point to the correct location */
+-		dtb_set_initrd(&dtb_buf, &dtb_length, initrd_buf, initrd_buf + initrd_size);
++		if (arch_options.initrd_file) {
++			initrd_buf = slurp_file(arch_options.initrd_file, &initrd_size);
+ 
+-		initrd_base = add_buffer(info, initrd_buf, initrd_size,
+-					initrd_size, sizeof(void *),
+-					_ALIGN_UP(kernel_addr + kernel_size + dtb_length,
+-						pagesize), 0x0fffffff, 1);
++			/* Create initrd entries in dtb - although at this time
++			 * they would not point to the correct location */
++			dtb_set_initrd(&dtb_buf, &dtb_length, initrd_buf, initrd_buf + initrd_size);
+ 
+-		/* Now that the buffer for initrd is prepared, update the dtb
+-		 * with an appropriate location */
+-		dtb_set_initrd(&dtb_buf, &dtb_length, initrd_base, initrd_base + initrd_size);
+-	}
++			initrd_base = add_buffer(info, initrd_buf, initrd_size,
++						initrd_size, sizeof(void *),
++						_ALIGN_UP(kernel_addr + kernel_size + dtb_length,
++							pagesize), 0x0fffffff, 1);
+ 
++			/* Now that the buffer for initrd is prepared, update the dtb
++			 * with an appropriate location */
++			dtb_set_initrd(&dtb_buf, &dtb_length, initrd_base, initrd_base + initrd_size);
++		}
++	}
+ 
+ 	/* This is a legacy method for commandline passing used
+ 	 * currently by Octeon CPUs only */
+@@ -177,9 +179,11 @@ int elf_mips_load(int argc, char **argv, const char *buf, off_t len,
+ 			sizeof(cmdline_buf), sizeof(void *),
+ 			cmdline_addr, 0x0fffffff, 1);
+ 
+-	add_buffer(info, dtb_buf, dtb_length, dtb_length, 0,
+-		_ALIGN_UP(kernel_addr + kernel_size, pagesize),
+-		0x0fffffff, 1);
++	if (!arch_options.no_dtb) {
++		add_buffer(info, dtb_buf, dtb_length, dtb_length, 0,
++			_ALIGN_UP(kernel_addr + kernel_size, pagesize),
++			0x0fffffff, 1);
++	}
+ 
+ 	return 0;
+ }
+diff --git a/kexec/arch/mips/kexec-mips.c b/kexec/arch/mips/kexec-mips.c
+index 415c2ed..e557f8b 100644
+--- a/kexec/arch/mips/kexec-mips.c
++++ b/kexec/arch/mips/kexec-mips.c
+@@ -89,6 +89,7 @@ void arch_usage(void)
+ 	"    --append=STRING       Set the kernel command line to STRING.\n"
+ 	"    --dtb=FILE            Use FILE as the device tree blob.\n"
+ 	"    --initrd=FILE         Use FILE as initial ramdisk.\n"
++	"    --no-dtb              Don't try to find device tree\n"
+ 	);
+ }
+ 
+@@ -121,6 +122,9 @@ int arch_process_options(int argc, char **argv)
+ 		case OPT_RAMDISK:
+ 			arch_options.initrd_file = optarg;
+ 			break;
++		case OPT_NO_DTB:
++			arch_options.no_dtb = 1;
++			break;
+ 		default:
+ 			break;
+ 		}
+diff --git a/kexec/arch/mips/kexec-mips.h b/kexec/arch/mips/kexec-mips.h
+index 222c815..90b21c3 100644
+--- a/kexec/arch/mips/kexec-mips.h
++++ b/kexec/arch/mips/kexec-mips.h
+@@ -22,6 +22,7 @@ struct arch_options_t {
+ 	char *dtb_file;
+ 	char *initrd_file;
+ 	int core_header_type;
++	int no_dtb;
+ };
+ 
+ extern struct memory_ranges usablemem_rgns;
+-- 
+2.17.1
+
diff --git a/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch b/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch
new file mode 100644
index 0000000..be1301d
--- /dev/null
+++ b/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch
@@ -0,0 +1,11 @@
+--- a/kexec/kexec.c
++++ b/kexec/kexec.c
+@@ -901,7 +901,7 @@ static int my_exec(void)
+ 	if (xen_present())
+ 		xen_kexec_exec();
+ 	else
+-		reboot(LINUX_REBOOT_CMD_KEXEC);
++		reboot(LINUX_REBOOT_CMD_KEXEC, NULL);
+ 	/* I have failed if I make it here */
+ 	fprintf(stderr, "kexec failed: %s\n", 
+ 		strerror(errno));
diff --git a/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb b/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
index cc1c551..7ad55d8 100644
--- a/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
+++ b/meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
@@ -6,14 +6,14 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \
                     file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
-PV = "2.0.17+git${SRCPV}"
+PV = "2.0.18+git${SRCPV}"
 
 DEPENDS = "zlib xz"
 
 inherit klibc autotools
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
-SRCREV = "b9de21ef51a7ceab7122a707c188602eae22c4ee"
+SRCREV = "5750980cdbbc33ef75bfba6660295b932376ce15"
 
 BUILD_PATCHES = "file://0001-force-static-build.patch \
                  file://0002-Adjust-the-order-of-headers-to-fix-build-for-musl.patch"
@@ -31,7 +31,8 @@
             file://0012-purgatory-string.c-avoid-inclusion-of-string.h.patch \
             file://0013-sha256.h-avoid-inclusion-of-sys-types.h.patch \
             file://0014-add-if_nameindex-from-musl.patch \
-            file://0015-vmcore-dmesg-fix-warning.patch"
+            file://0015-vmcore-dmesg-fix-warning.patch \
+            file://klibc-reboot.patch"
 
 WARNING_FIXES = ""
 FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \
@@ -42,6 +43,9 @@
 
 SRC_URI_append_arm = " file://arm_crashdump.patch"
 
+SRC_URI_append_mips = " file://140-mips_disable_devicetree_support.patch"
+SRC_URI_append_mipsel = " file://140-mips_disable_devicetree_support.patch"
+
 SRC_URI_append_x86 = " file://x86_sys_io.patch file://x86_basename.patch \
                        file://x86_vfscanf.patch file://x86_kexec_test.patch"