Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupModule ¶
LookupModule returns the kernel module name for a PCI vendor:device ID.
func RequiredModules ¶
RequiredModules returns the kernel modules needed for detected PCI hardware.
func UniqueModulesFrom ¶
UniqueModulesFrom extracts unique module names from a list of PCI devices.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles kernel module operations.
func NewManager ¶
NewManager creates a kernel module manager.
func (*Manager) FindModule ¶
FindModule searches for a .ko file in the modules directory.
func (*Manager) IsLoaded ¶
IsLoaded checks if a module is currently loaded by reading procModulesPath.
func (*Manager) ListLoaded ¶
ListLoaded returns currently loaded kernel modules from /proc/modules.
type Manifest ¶
type Manifest struct {
Common []string `yaml:"common" json:"common"`
NICs []string `yaml:"nics" json:"nics,omitempty"`
Storage []string `yaml:"storage" json:"storage,omitempty"`
USB []string `yaml:"usb" json:"usb,omitempty"`
Custom []string `yaml:"custom" json:"custom,omitempty"`
}
Manifest defines which modules to load per flavor.
func (*Manifest) AllModules ¶
AllModules returns all modules from the manifest in load order.
type Module ¶
type Module struct {
Name string `json:"name"`
Path string `json:"path,omitempty"`
// UsedBy is parsed from the 4th /proc/modules field.
UsedBy []string `json:"usedBy,omitempty"`
// Deprecated: kept for compatibility; mirrors UsedBy.
Dependencies []string `json:"dependencies,omitempty"`
Loaded bool `json:"loaded"`
}
Module represents a kernel module with its metadata.
type PCIDevice ¶
type PCIDevice struct {
Address string `json:"address"`
Vendor string `json:"vendor"`
Device string `json:"device"`
Class string `json:"class"`
Driver string `json:"driver,omitempty"`
Module string `json:"module,omitempty"`
}
PCIDevice represents a PCI device found in sysfs.
func ScanPCIDevices ¶
ScanPCIDevices reads PCI devices from sysfs.