diff --git a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh index a552aed122..c170cb7595 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -293,7 +293,7 @@ install_kernel_nvidia_gpu_snp() { install_kernel_helper \ "assets.kernel.snp.version" \ "kernel-nvidia-gpu-snp" \ - "-x snp -g nvidia -u ${kernel_url} -H deb" + "-x sev -g nvidia -u ${kernel_url} -H deb" } #Install GPU and TDX experimental enabled kernel asset diff --git a/tools/packaging/kernel/build-kernel.sh b/tools/packaging/kernel/build-kernel.sh index c1f89cfebe..cb755b189d 100755 --- a/tools/packaging/kernel/build-kernel.sh +++ b/tools/packaging/kernel/build-kernel.sh @@ -241,7 +241,7 @@ get_kernel_frag_path() { local redefined_string="redefined" local redundant_string="redundant" - # Later, if we need to add kernel version specific subdirs in order to + # Later, if we need to add kernel version specifqic subdirs in order to # handle specific cases, then add the path definition and search/list/cat # here. local all_configs="${common_configs} ${arch_configs}" @@ -251,25 +251,21 @@ get_kernel_frag_path() { if [[ "${gpu_vendor}" != "" ]];then info "Add kernel config for GPU due to '-g ${gpu_vendor}'" - local gpu_configs="$(ls ${gpu_path}/${gpu_vendor}.conf)" - all_configs="${all_configs} ${gpu_configs}" # If conf_guest is set we need to update the CONFIG_LOCALVERSION # to match the suffix created in install_kata # -nvidia-gpu-{snp|tdx}, the linux headers will be named the very # same if build with make deb-pkg for TDX or SNP. + local gpu_configs=$(mktemp).conf + local gpu_subst_configs="$(ls ${gpu_path}/${gpu_vendor}.${arch_target}.conf.in)" if [[ "${conf_guest}" != "" ]];then - local gpu_cc_configs=$(mktemp).conf - local gpu_subst_configs="$(ls ${gpu_path}/${gpu_vendor}.conf.in)" - export CONF_GUEST_SUFFIX="-${conf_guest}" - envsubst <${gpu_subst_configs} >${gpu_cc_configs} - unset CONF_GUEST_SUFFIX - - all_configs="${all_configs} ${gpu_cc_configs}" else - local gpu_configs="$(ls ${gpu_path}/${gpu_vendor}.conf)" - all_configs="${all_configs} ${gpu_configs}" + export CONF_GUEST_SUFFIX="" fi + envsubst <${gpu_subst_configs} >${gpu_configs} + unset CONF_GUEST_SUFFIX + + all_configs="${all_configs} ${gpu_configs}" fi if [ "${MEASURED_ROOTFS}" == "yes" ]; then diff --git a/tools/packaging/kernel/configs/fragments/gpu/nvidia.conf b/tools/packaging/kernel/configs/fragments/gpu/nvidia.conf deleted file mode 100644 index 883c0f3af9..0000000000 --- a/tools/packaging/kernel/configs/fragments/gpu/nvidia.conf +++ /dev/null @@ -1,14 +0,0 @@ -# Support mmconfig PCI config space access. -# It's used to enable the MMIO access method for PCIe devices. -CONFIG_PCI_MMCONFIG=y - -# Support for loading modules. -# It is used to support loading GPU drivers. -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y - -# CRYPTO_FIPS requires this config when loading modules is enabled. -CONFIG_MODULE_SIG=y - -# Linux kernel version suffix -CONFIG_LOCALVERSION="-nvidia-gpu"