diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-12-18 04:36:54 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-12-18 04:49:39 +0100 |
commit | ffe71cbe19508320ed9820e1b8caee732d5d9ddf (patch) | |
tree | 31cb96ff32c0838778fc280a26ce6948e06dbd69 | |
parent | 2fe1daf804d652962aa16e765894766365ae2909 (diff) | |
download | nixlib-ffe71cbe19508320ed9820e1b8caee732d5d9ddf.tar nixlib-ffe71cbe19508320ed9820e1b8caee732d5d9ddf.tar.gz nixlib-ffe71cbe19508320ed9820e1b8caee732d5d9ddf.tar.bz2 nixlib-ffe71cbe19508320ed9820e1b8caee732d5d9ddf.tar.lz nixlib-ffe71cbe19508320ed9820e1b8caee732d5d9ddf.tar.xz nixlib-ffe71cbe19508320ed9820e1b8caee732d5d9ddf.tar.zst nixlib-ffe71cbe19508320ed9820e1b8caee732d5d9ddf.zip |
kexec-tools: Add patch to fix build on ARM
Building on ARM fails with the following error: kexec/arch/arm/phys_to_virt.o kexec/arch/arm/phys_to_virt.c kexec/arch/arm/phys_to_virt.c:3:26: fatal error: phys_to_virt.h: No such file or directory The patch I'm using is from Fedora: http://pkgs.fedoraproject.org/cgit/rpms/kexec-tools.git/tree/kexec-tools-2.0.13-fix-armv7-build-failure.patch?id=97581f1a435aafa298a4d0bbcfaf40c63a41ce92 It has been reported upstream as well: http://lists.infradead.org/pipermail/kexec/2016-September/017352.html I'm adding the patch for all architectures, so that the next person to upgrade kexec-tools doesn't forget that even while on x86. Tested building with i686-linux, x86_64-linux and armv7l-linux. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r-- | pkgs/os-specific/linux/kexectools/arm.patch | 28 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kexectools/default.nix | 2 |
2 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kexectools/arm.patch b/pkgs/os-specific/linux/kexectools/arm.patch new file mode 100644 index 000000000000..9c1d482c81ad --- /dev/null +++ b/pkgs/os-specific/linux/kexectools/arm.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 <stdint.h> ++ ++extern uint64_t phys_offset; ++ ++#endif diff --git a/pkgs/os-specific/linux/kexectools/default.nix b/pkgs/os-specific/linux/kexectools/default.nix index 1b18fb590170..cd2833617b92 100644 --- a/pkgs/os-specific/linux/kexectools/default.nix +++ b/pkgs/os-specific/linux/kexectools/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { sha256 = "1k75p9h29xx57l1c69ravm4pg9pmriqxmwja12hgrnvi251ayjw7"; }; + patches = [ ./arm.patch ]; + hardeningDisable = [ "format" "pic" "relro" ]; buildInputs = [ zlib ]; |