3
0
Fork 0
forked from mirrors/nixpkgs

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. # Add the modules for all block and MMC devices.
foreach my $path (glob "/sys/class/block/*") { foreach my $path (glob "/sys/class/{block,mmc_host}/*") {
my $module; my $module;
if (-e "$path/device/driver/module") { if (-e "$path/device/driver/module") {
$module = basename `readlink -f $path/device/driver/module`; $module = basename `readlink -f $path/device/driver/module`;