From 97581f1a435aafa298a4d0bbcfaf40c63a41ce92 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Tue, 9 Aug 2016 15:06:05 +0800 Subject: [PATCH] Fix armv7 build failure Upstream kexec-tools 2.0.13 tarball does not pack arm phys_to_virt.h and iomem.h, add them to avoid armv7 build failure. --- ...tools-2.0.13-fix-armv7-build-failure.patch | 28 +++++++++++++++++++ kexec-tools.spec | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 kexec-tools-2.0.13-fix-armv7-build-failure.patch diff --git a/kexec-tools-2.0.13-fix-armv7-build-failure.patch b/kexec-tools-2.0.13-fix-armv7-build-failure.patch new file mode 100644 index 0000000..9c1d482 --- /dev/null +++ b/kexec-tools-2.0.13-fix-armv7-build-failure.patch @@ -0,0 +1,28 @@ +Upstream kexec-tools 2.0.13 does not pack arm phys_to_virt.h and iomem.h, +include them here for a temporary fix + +diff -uprN kexec-tools/kexec/arch/arm/iomem.h kexec-tools.1/kexec/arch/arm/iomem.h +--- kexec-tools/kexec/arch/arm/iomem.h 1970-01-01 08:00:00.000000000 +0800 ++++ kexec-tools.1/kexec/arch/arm/iomem.h 2016-08-09 15:38:26.938594379 +0800 +@@ -0,0 +1,9 @@ ++#ifndef IOMEM_H ++#define IOMEM_H ++ ++#define SYSTEM_RAM "System RAM\n" ++#define SYSTEM_RAM_BOOT "System RAM (boot alias)\n" ++#define CRASH_KERNEL "Crash kernel\n" ++#define CRASH_KERNEL_BOOT "Crash kernel (boot alias)\n" ++ ++#endif +diff -uprN kexec-tools/kexec/arch/arm/phys_to_virt.h kexec-tools.1/kexec/arch/arm/phys_to_virt.h +--- kexec-tools/kexec/arch/arm/phys_to_virt.h 1970-01-01 08:00:00.000000000 +0800 ++++ kexec-tools.1/kexec/arch/arm/phys_to_virt.h 2016-08-09 14:50:30.104143361 +0800 +@@ -0,0 +1,8 @@ ++#ifndef PHYS_TO_VIRT_H ++#define PHYS_TO_VIRT_H ++ ++#include ++ ++extern uint64_t phys_offset; ++ ++#endif diff --git a/kexec-tools.spec b/kexec-tools.spec index bd9c4e1..b3066dc 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -84,6 +84,7 @@ ExcludeArch: aarch64 # Patch601: kexec-tools-2.0.3-disable-kexec-test.patch Patch602: kexec-tools-2.0.12-makedumpfile-Support-_count-_refcount-rename-in-struct-p.patch +Patch603: kexec-tools-2.0.13-fix-armv7-build-failure.patch %description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -109,6 +110,7 @@ tar -z -x -v -f %{SOURCE23} %patch601 -p1 %patch602 -p1 +%patch603 -p1 %ifarch ppc %define archdef ARCH=ppc