mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-10-30 08:52:39 +00:00 
			
		
		
		
	gpu: Add proper CONFIG_LOCALVERSION depending on TEE
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.
Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
			
			
This commit is contained in:
		| @@ -239,9 +239,24 @@ get_kernel_frag_path() { | |||||||
|  |  | ||||||
| 	if [[ "${gpu_vendor}" != "" ]];then | 	if [[ "${gpu_vendor}" != "" ]];then | ||||||
| 		info "Add kernel config for GPU due to '-g ${gpu_vendor}'" | 		info "Add kernel config for GPU due to '-g ${gpu_vendor}'" | ||||||
|  | 		# 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. | ||||||
|  | 		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)" | 			local gpu_configs="$(ls ${gpu_path}/${gpu_vendor}.conf)" | ||||||
| 			all_configs="${all_configs} ${gpu_configs}" | 			all_configs="${all_configs} ${gpu_configs}" | ||||||
| 		fi | 		fi | ||||||
|  | 	fi | ||||||
|  |  | ||||||
| 	if [[ "${conf_guest}" != "" ]];then | 	if [[ "${conf_guest}" != "" ]];then | ||||||
| 		info "Enabling config for '${conf_guest}' confidential guest protection" | 		info "Enabling config for '${conf_guest}' confidential guest protection" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user