2 ##############################################################################
3 ## Copyright (c) 2015 Intel Corp.
5 ## All rights reserved. This program and the accompanying materials
6 ## are made available under the terms of the Apache License, Version 2.0
7 ## which accompanies this distribution, and is available at
8 ## http://www.apache.org/licenses/LICENSE-2.0
9 ###############################################################################
12 rpmdir=${1:-"/root/workspace/"}
13 rpmpat="kernel-4.1*.rpm"
14 rpm -ihv ${rpmdir}/rt-tests-0.96-1.el7.centos.x86_64.rpm
17 # The script's caller should passing the rpm directory that is built out from
18 # build.sh. The default rpmdir is the one used by yardstick scripts.
20 # Install the kernel rpm
21 filenum=`ls -l ${rpmdir}/${rpmpat} |wc -l`
24 echo "No kernel rpm found in workspace/rpm"
26 elif [ $filenum -gt 1 ]
28 echo "Multiple kernel rpm found in workspace/rpm"
31 krpm=`find "${rpmdir}" -name "${rpmpat}"`
40 if grep '[" ]'${key} /etc/default/grub > /dev/null ; then
41 sed -i 's/\([" ]\)'${key}'=[^ "]*/\1'${key}'='${val}'/' /etc/default/grub
43 sed -i 's/GRUB_CMDLINE_LINUX="\(.*\)"/GRUB_CMDLINE_LINUX="\1 '${key}'='${val}'"/' /etc/default/grub
47 # Isolate CPUs from the general scheduler
48 config_grub 'isolcpus' ${guest_isolcpus}
50 # Stop timer ticks on isolated CPUs whenever possible
51 config_grub 'nohz_full' ${guest_isolcpus}
53 # Disable machine check
54 config_grub 'mce' 'off'
56 # Use polling idle loop to improve performance
57 config_grub 'idle' 'poll'
59 ## Disable clocksource verification at runtime
60 config_grub 'tsc' 'reliable'
62 grub2-mkconfig -o /boot/grub2/grub.cfg