diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2021-09-23 19:55:36 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2021-09-23 19:55:36 +0200 |
commit | 9fb6bf821ee9fc909ed3348cdab0d13d4621bd05 (patch) | |
tree | 8e11b5e2bffba325071cec5ac0b402da891dcdf7 /SOURCES/generate_crashkernel_default.sh | |
parent | f79cd94d7370f65ca81d9897d1bfbb2f220c467a (diff) | |
download | kernel-fsync-9fb6bf821ee9fc909ed3348cdab0d13d4621bd05.tar.gz kernel-fsync-9fb6bf821ee9fc909ed3348cdab0d13d4621bd05.zip |
kernel 5.14.7
Diffstat (limited to 'SOURCES/generate_crashkernel_default.sh')
-rwxr-xr-x | SOURCES/generate_crashkernel_default.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/SOURCES/generate_crashkernel_default.sh b/SOURCES/generate_crashkernel_default.sh new file mode 100755 index 0000000..46d4546 --- /dev/null +++ b/SOURCES/generate_crashkernel_default.sh @@ -0,0 +1,25 @@ +#!/bin/bash +kernelver=$1 && shift +arch=$1 && shift +rootfs=$1 && shift + +output="${rootfs}/lib/modules/${kernelver}/crashkernel.default" + +case $arch in +x86_64|s390*) + ck_cmdline="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M" + ;; +arm64|aarch64) + ck_cmdline="crashkernel=2G-:448M" + ;; +powerpc|ppc64*) + ck_cmdline="crashkernel=2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G" + ;; +*) + ck_cmdline="" + ;; +esac + +cat > "$output" <<EOF +$ck_cmdline +EOF |