feat: support duplicate device IDs in dracut
This commit is contained in:
parent
c1f11ce1c3
commit
adedfb01b9
5 changed files with 170 additions and 57 deletions
|
@ -51,7 +51,7 @@ func getBootloader(config *Config) {
|
|||
// This function adds the default kernel arguments we want to the config/cmdline file
|
||||
// This gives us a file we can read all the kernel arguments this system needs
|
||||
// in case of an unknown bootloader
|
||||
func Set_Cmdline(gpu_IDs []string) {
|
||||
func Set_Cmdline(gpu_IDs []string, includeDeviceIdsForVfio bool) {
|
||||
// Get the system info
|
||||
cpuinfo := cpuid.CPU
|
||||
|
||||
|
@ -69,8 +69,10 @@ func Set_Cmdline(gpu_IDs []string) {
|
|||
fileio.AppendContent(" intel_iommu=on", config.Path.CMDLINE)
|
||||
}
|
||||
|
||||
// Add the GPU ids for vfio to the kernel arguments
|
||||
fileio.AppendContent(fmt.Sprintf(" vfio_pci.ids=%s", strings.Join(gpu_IDs, ",")), config.Path.CMDLINE)
|
||||
if includeDeviceIdsForVfio {
|
||||
// Add the GPU ids for vfio to the kernel arguments
|
||||
fileio.AppendContent(fmt.Sprintf(" vfio_pci.ids=%s", strings.Join(gpu_IDs, ",")), config.Path.CMDLINE)
|
||||
}
|
||||
}
|
||||
|
||||
// Set_KernelStub configures systemd-boot using kernelstub.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue