Blame generate_crashkernel_default.sh

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