mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 07:22:20 +00:00
packaging/kernel: add option -s option
Add -s option to skip .config checks Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
88b3e9e848
commit
bc8464e04f
@ -53,6 +53,8 @@ hypervisor_target=""
|
|||||||
arch_target=""
|
arch_target=""
|
||||||
#
|
#
|
||||||
kernel_config_path=""
|
kernel_config_path=""
|
||||||
|
#
|
||||||
|
skip_config_checks="false"
|
||||||
# destdir
|
# destdir
|
||||||
DESTDIR="${DESTDIR:-/}"
|
DESTDIR="${DESTDIR:-/}"
|
||||||
#PREFIX=
|
#PREFIX=
|
||||||
@ -92,6 +94,7 @@ Options:
|
|||||||
-h : Display this help.
|
-h : Display this help.
|
||||||
-k <path> : Path to kernel to build.
|
-k <path> : Path to kernel to build.
|
||||||
-p <path> : Path to a directory with patches to apply to kernel.
|
-p <path> : Path to a directory with patches to apply to kernel.
|
||||||
|
-s : Skip .config checks
|
||||||
-t <hypervisor> : Hypervisor_target.
|
-t <hypervisor> : Hypervisor_target.
|
||||||
-v <version> : Kernel version to use if kernel path not provided.
|
-v <version> : Kernel version to use if kernel path not provided.
|
||||||
-x <type> : Confidential guest protection type, such as sev
|
-x <type> : Confidential guest protection type, such as sev
|
||||||
@ -233,6 +236,8 @@ get_kernel_frag_path() {
|
|||||||
# Do not care about options that are in whitelist
|
# Do not care about options that are in whitelist
|
||||||
results=$(grep -v -f ${default_config_whitelist} <<< "$results")
|
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?
|
# Did we request any entries that did not make it?
|
||||||
local missing=$(echo $results | grep -v -q "${not_in_string}"; echo $?)
|
local missing=$(echo $results | grep -v -q "${not_in_string}"; echo $?)
|
||||||
if [ ${missing} -ne 0 ]; then
|
if [ ${missing} -ne 0 ]; then
|
||||||
@ -438,7 +443,7 @@ install_kata() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
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
|
case "$opt" in
|
||||||
a)
|
a)
|
||||||
arch_target="${OPTARG}"
|
arch_target="${OPTARG}"
|
||||||
@ -472,6 +477,9 @@ main() {
|
|||||||
p)
|
p)
|
||||||
patches_path="${OPTARG}"
|
patches_path="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
|
s)
|
||||||
|
skip_config_checks="true"
|
||||||
|
;;
|
||||||
t)
|
t)
|
||||||
hypervisor_target="${OPTARG}"
|
hypervisor_target="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user