Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
24 lines
475 B
Bash
24 lines
475 B
Bash
#!/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=${KZ}M/" /boot/grub/grub.cfg
|
|
mount /boot -o remount,ro
|
|
fi
|
|
;;
|
|
esac
|