Skip to content

Commit

Permalink
Add support for MMC based root filesystems
Browse files Browse the repository at this point in the history
Add mmc drivers to the default filter
Add a workaround for mmc:block alias for mmc bus.

Closes #90
  • Loading branch information
anatol committed Jun 7, 2021
1 parent 7f42685 commit 6afd40e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ var defaultModulesList = []string{
"kernel/drivers/usb/host/",
"kernel/drivers/hid/usbhid/",
"hid_generic", "sd_mod", "ahci",
"sdhci", "sdhci_pci", "mmc_block", // mmc
"virtio_pci", "virtio_blk", "virtio_scsi", "virtio_crypto",
}

Expand Down
8 changes: 7 additions & 1 deletion generator/kmod.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ func (k *Kmod) filterAliasesForRequiredModules(conf *generatorConfig) ([]alias,
}

if !k.universal {
devAliases, err := conf.readDeviceAliases()
devAliases, err := conf.readDeviceAliases() // list of current host aliases as reported by /sys/devices
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -636,6 +636,12 @@ func readDeviceAliases() (set, error) {
return nil
})

// Buses might have associated modaliases e.g. mmc bus sends an udev event modalias 'mmc:block' (see Linux drivers/mmc/core/bus.c)
// But it seems that this modalias is not reported anywhere under /sys/devices, see https://github.com/anatol/booster/issues/90

// insert implicit modaliases. TODO: find a more straightforward way to detect all buses modaliases
aliases["mmc:block"] = true

return aliases, err
}

Expand Down

0 comments on commit 6afd40e

Please sign in to comment.