1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00

nixos-generate-config: look at mmc_host for device drivers

I needed to add sdhci_acpi and mmc_block to my initrd modules in order to boot
my Chromebook. Looking under /sys/class/mmc_host/*/device/driver/module will
give us the sdhci_acpi dependency.
This commit is contained in:
Brian McKenna 2015-10-16 17:38:41 +11:00
parent a7f09b201e
commit 3ef956eb50

View file

@ -233,8 +233,8 @@ foreach my $path (glob "/sys/bus/usb/devices/*") {
}
# Add the modules for all block devices.
foreach my $path (glob "/sys/class/block/*") {
# Add the modules for all block and MMC devices.
foreach my $path (glob "/sys/class/{block,mmc_host}/*") {
my $module;
if (-e "$path/device/driver/module") {
$module = basename `readlink -f $path/device/driver/module`;