feat: support duplicate device IDs in initramfs-tools and mkinitcpio

This commit is contained in:
jedrw 2025-01-12 13:34:47 +00:00
parent adedfb01b9
commit dfb889122e
7 changed files with 126 additions and 60 deletions

View file

@ -105,10 +105,12 @@ func viewGPU(config *configs.Config, ext ...int) {
}
logger.Printf("Checking for duplicate device Ids")
hasDuplicateDeviceIds := detectDuplicateDeviceIds(config.Gpu_Group, config.Gpu_IDs)
config.HasDuplicateDeviceIds = detectDuplicateDeviceIds(config.Gpu_Group, config.Gpu_IDs)
if hasDuplicateDeviceIds {
config.HasDuplicateDeviceIds = true
// TODO remove this
config.HasDuplicateDeviceIds = true
if config.HasDuplicateDeviceIds {
config.Gpu_Addresses = lsiommu.GetIOMMU("-g", mode, "-i", config.Gpu_Group, "--pciaddr")
}