From bc8464e04f5df72811c3b8fe99ae8a81b0e33329 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Fri, 11 Feb 2022 15:27:12 -0600 Subject: [PATCH] packaging/kernel: add option -s option Add -s option to skip .config checks Signed-off-by: Julio Montes --- tools/packaging/kernel/build-kernel.sh | 10 +++++++++- .../kernel/patches/tdx-guest-v5.15-4.x/no_patches.txt | 0 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tools/packaging/kernel/patches/tdx-guest-v5.15-4.x/no_patches.txt diff --git a/tools/packaging/kernel/build-kernel.sh b/tools/packaging/kernel/build-kernel.sh index 0aa831f657..a67b922cc5 100755 --- a/tools/packaging/kernel/build-kernel.sh +++ b/tools/packaging/kernel/build-kernel.sh @@ -53,6 +53,8 @@ hypervisor_target="" arch_target="" # kernel_config_path="" +# +skip_config_checks="false" # destdir DESTDIR="${DESTDIR:-/}" #PREFIX= @@ -92,6 +94,7 @@ Options: -h : Display this help. -k : Path to kernel to build. -p : Path to a directory with patches to apply to kernel. + -s : Skip .config checks -t : Hypervisor_target. -v : Kernel version to use if kernel path not provided. -x : Confidential guest protection type, such as sev @@ -233,6 +236,8 @@ get_kernel_frag_path() { # Do not care about options that are in whitelist results=$(grep -v -f ${default_config_whitelist} <<< "$results") + [[ "${skip_config_checks}" == "true" ]] && echo "${config_path}" && return + # Did we request any entries that did not make it? local missing=$(echo $results | grep -v -q "${not_in_string}"; echo $?) if [ ${missing} -ne 0 ]; then @@ -438,7 +443,7 @@ install_kata() { } main() { - while getopts "a:b:c:defg:hk:p:t:v:x:" opt; do + while getopts "a:b:c:defg:hk:p:st:v:x:" opt; do case "$opt" in a) arch_target="${OPTARG}" @@ -472,6 +477,9 @@ main() { p) patches_path="${OPTARG}" ;; + s) + skip_config_checks="true" + ;; t) hypervisor_target="${OPTARG}" ;; diff --git a/tools/packaging/kernel/patches/tdx-guest-v5.15-4.x/no_patches.txt b/tools/packaging/kernel/patches/tdx-guest-v5.15-4.x/no_patches.txt new file mode 100644 index 0000000000..e69de29bb2