From 768d9ce47f9cff55bb7e8dde6cac3b30e137bac9 Mon Sep 17 00:00:00 2001 From: WANG Chao Date: Mon, 15 Sep 2014 12:04:38 +0800 Subject: [PATCH] kexec/ppc64: move to device tree version 17 Backport the following commit from upstream kexec-tools: commit 2ca2203 Author: Laurent Dufour Date: Mon Jun 16 14:42:43 2014 +0200 kexec/ppc64: move to device tree version 17 Kernel commit e6a6928c3ea1d0195ed75a091e345696b916c09b changed the way the device tree is processed in the kernel. Now version 2 is no more supported. This patch move the version of the device tree generated in ppc64 environment from 2 to 17, allowing to kexec kernel 3.16. In addition, automates the define of NEED_STRUCTURE_BLOCK_EXTRA_PAD which should not be set for DT version 16 and above. Signed-off-by: Laurent Dufour Signed-off-by: Simon Horman This is part of the work to enable ppc64le. Signed-off-by: WANG Chao Acked-by: Vivek Goyal --- ...ppc64-move-to-device-tree-version-17.patch | 42 +++++++++++++++++++ kexec-tools.spec | 2 + 2 files changed, 44 insertions(+) create mode 100644 kexec-tools-2.0.7-kexec-ppc64-move-to-device-tree-version-17.patch diff --git a/kexec-tools-2.0.7-kexec-ppc64-move-to-device-tree-version-17.patch b/kexec-tools-2.0.7-kexec-ppc64-move-to-device-tree-version-17.patch new file mode 100644 index 0000000..c7a4bb4 --- /dev/null +++ b/kexec-tools-2.0.7-kexec-ppc64-move-to-device-tree-version-17.patch @@ -0,0 +1,42 @@ +From 2ca220389d212249cc842d49084c95e524fb299b Mon Sep 17 00:00:00 2001 +From: Laurent Dufour +Date: Mon, 16 Jun 2014 14:42:43 +0200 +Subject: [PATCH] kexec/ppc64: move to device tree version 17 + +Kernel commit e6a6928c3ea1d0195ed75a091e345696b916c09b changed the way the +device tree is processed in the kernel. Now version 2 is no more supported. + +This patch move the version of the device tree generated in ppc64 +environment from 2 to 17, allowing to kexec kernel 3.16. + +In addition, automates the define of NEED_STRUCTURE_BLOCK_EXTRA_PAD which +should not be set for DT version 16 and above. + +Signed-off-by: Laurent Dufour +Signed-off-by: Simon Horman +--- + kexec/arch/ppc64/kexec-ppc64.h | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/kexec/arch/ppc64/kexec-ppc64.h b/kexec/arch/ppc64/kexec-ppc64.h +index 9a0aecf..89ee942 100644 +--- a/kexec/arch/ppc64/kexec-ppc64.h ++++ b/kexec/arch/ppc64/kexec-ppc64.h +@@ -6,9 +6,11 @@ + #define CORE_TYPE_ELF32 1 + #define CORE_TYPE_ELF64 2 + +-#define BOOT_BLOCK_VERSION 2 +-#define BOOT_BLOCK_LAST_COMP_VERSION 2 +-#define NEED_STRUCTURE_BLOCK_EXTRA_PAD ++#define BOOT_BLOCK_VERSION 17 ++#define BOOT_BLOCK_LAST_COMP_VERSION 17 ++#if (BOOT_BLOCK_VERSION < 16) ++# define NEED_STRUCTURE_BLOCK_EXTRA_PAD ++#endif + #define HAVE_DYNAMIC_MEMORY + #define NEED_RESERVE_DTB + +-- +1.9.3 + diff --git a/kexec-tools.spec b/kexec-tools.spec index 9eb1ee3..60db2ef 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -67,6 +67,7 @@ Patch101: kexec-tools-2.0.7-Provide-an-option-to-use-new-kexec-system-call.patch # # Patches 301 through 400 are meant for ppc64 kexec-tools enablement # +Patch301: kexec-tools-2.0.7-kexec-ppc64-move-to-device-tree-version-17.patch # # Patches 401 through 500 are meant for s390 kexec-tools enablement @@ -128,6 +129,7 @@ tar -z -x -v -f %{SOURCE23} %patch605 -p1 %patch606 -p1 %patch607 -p1 +%patch301 -p1 %ifarch ppc %define archdef ARCH=ppc