linuxtorvalds / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
9423bd
#!/bin/bash
9423bd
kernelver=$1 && shift
9423bd
arch=$1 && shift
9423bd
rootfs=$1 && shift
9423bd
9423bd
output="${rootfs}/lib/modules/${kernelver}/crashkernel.default"
9423bd
9423bd
case $arch in
9423bd
x86_64|s390*)
9423bd
	ck_cmdline="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M"
9423bd
	;;
9423bd
arm64|aarch64)
9423bd
	ck_cmdline="crashkernel=2G-:448M"
9423bd
	;;
9423bd
powerpc|ppc64*)
9423bd
	ck_cmdline="crashkernel=2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G"
9423bd
	;;
9423bd
*)
9423bd
	ck_cmdline=""
9423bd
	;;
9423bd
esac
9423bd
9423bd
cat > "$output" <
9423bd
$ck_cmdline
9423bd
EOF