aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/boot/kexec-tools/files/kdump.defaults14
-rwxr-xr-xpackage/boot/kexec-tools/files/kdump.init2
-rw-r--r--package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch14
3 files changed, 29 insertions, 1 deletions
diff --git a/package/boot/kexec-tools/files/kdump.defaults b/package/boot/kexec-tools/files/kdump.defaults
index 2f15e757bf..62366a2950 100644
--- a/package/boot/kexec-tools/files/kdump.defaults
+++ b/package/boot/kexec-tools/files/kdump.defaults
@@ -1,10 +1,22 @@
#!/bin/sh
+# kB disable if mem low than 256MB
+memtotal=`grep MemTotal /proc/meminfo | awk '{print $2}'`
+if test $memtotal -le 262144; then
+ exit 0
+fi
+KZ=128
+if test $memtotal -ge 8388608; then
+ KZ=512
+elif test $memtotal -ge 4194304; then
+ KZ=256
+fi
+
case $(uname -m) in
i?86|x86_64)
if ! grep -q crashkernel /boot/grub/grub.cfg; then
mount /boot -o remount,rw
- sed -i 's/linux.*/& crashkernel=32M@32M/' /boot/grub/grub.cfg
+ sed -i "s/linux.*/& crashkernel=${KZ}M/" /boot/grub/grub.cfg
mount /boot -o remount,ro
fi
;;
diff --git a/package/boot/kexec-tools/files/kdump.init b/package/boot/kexec-tools/files/kdump.init
index 0955047156..9d0d2fc2fb 100755
--- a/package/boot/kexec-tools/files/kdump.init
+++ b/package/boot/kexec-tools/files/kdump.init
@@ -3,6 +3,8 @@
START=41
STOP=90
+BOOT_IMAGE=/boot/vmlinuz
+
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Print crashkernel status"
diff --git a/package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch b/package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch
new file mode 100644
index 0000000000..dfad21992b
--- /dev/null
+++ b/package/boot/kexec-tools/patches/100-kexec-tools-fix-for-Unhandled-rela-relocation-R_X86_64_PLT32-error.patch
@@ -0,0 +1,14 @@
+diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+index 7fdde73..af33689 100644
+--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
++++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+@@ -78,7 +78,8 @@ void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr),
+ if ((int64_t)value != *(int32_t *)location)
+ goto overflow;
+ break;
+- case R_X86_64_PC32:
++ case R_X86_64_PC32:
++ case R_X86_64_PLT32:
+ *(uint32_t *)location = value - address;
+ break;
+ default: