config-tools: genertate performance policy parameter

This patch is to generate an ACRN CPU performance policy type boot
parameter.

The generated parameter is either 'cpu_perf_policy=Performance’ or
‘cpu_perf_policy=Nominal’, according to the 'CPU performance policy type'
config item in configurator.

It will then be packed into acrn-hypervisor deb file, and will be
automatically added to grub cfg file through installation.

Tracked-On: #8168
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Wu Zhou
2022-09-02 14:55:26 +08:00
committed by acrnsi-robot
parent a971e12fc6
commit dd7a71900b
3 changed files with 28 additions and 4 deletions

View File

@@ -63,6 +63,8 @@ ACRN_BOOTARGS=$(for arg in ${ACRN_BOOTARGS}; do if [ "${arg##root=}" = "${arg}"
# special handling for memmap: make sure $ is escaped to \$. This is a GRUB requirement
ACRN_BOOTARGS="$(echo "${ACRN_BOOTARGS}" | sed 's/\(.*memmap=[^\$]*\)\$\(.*\)/\1\\\$\2/')"
GRUB_CMDLINE_ACRN="cpu_perf_policy=$(xmllint --xpath '//CPU_PERFORMANCE_POLICY/text()' ${ACRN_SCENARIO_FILE} 2>/dev/null || true) "$GRUB_CMDLINE_ACRN
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else