kata_integration/scripts/enable_debug_configuration.sh
2019-12-30 15:23:29 +08:00

23 lines
976 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved.
# kata_integration is licensed under the Mulan PSL v1.
# You can use this software according to the terms and conditions of the Mulan PSL v1.
# You may obtain a copy of Mulan PSL v1 at:
#     http://license.coscl.org.cn/MulanPSL
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v1 for more details.
# Description: enable debug configuration
# Author: caihaomin
# Create: 2019-01-22
# This shell script enable debug options in configuration.toml file
KATA_RUNTIME_PATH=$(readlink -f $1)
KATA_CONFIG_PATH=$KATA_RUNTIME_PATH/cli/config/configuration-qemu.toml
sed -i 's/^#enable_debug/enable_debug/g' $KATA_CONFIG_PATH
sed -i 's/kernel_params = \"\"/kernel_params = \"agent\.log=debug\"/' $KATA_CONFIG_PATH