]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(dracut-functions.sh): convert mmcblk to the real kernel module name
authorTao Liu <ltao@redhat.com>
Wed, 12 Apr 2023 15:02:25 +0000 (23:02 +0800)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 14 Apr 2023 04:40:04 +0000 (04:40 +0000)
commita62e895db9510f0fc4c47ee81b1436096eca4d64
tree4d74ce4f4824c8edc5e44a94eb253adab91c5493
parent297525c5c0781e13c4bf86aa42e81b9f166802ad
fix(dracut-functions.sh): convert mmcblk to the real kernel module name

In some x86_64 platforms such as Intel Elkhartlake, an issue of missing
necessary modules due to udevadm drivers field unmatch the real kernel module
name is found:

  $ udevadm info -a /dev/block/179:1

  looking at parent device '/devices/pci0000:00/0000:00:1a.0/mmc_host/mmc0/mmc0:0001':
    KERNELS=="mmc0:0001"
    SUBSYSTEMS=="mmc"
    DRIVERS=="mmcblk"
    ....

The DRIVERS field, aka mmcblk will be given to instmods to install the
corresponding mmc_block.ko kernel module. However mmc_block.ko cannot be
selected by string mmcblk, as a result, mmc_block.ko cannot be installed
in hostonly-mode strict, which will fail to bootup the machine such as in
kdump cases:

  $ /usr/lib/dracut/dracut-install -D /var/tmp --kerneldir /lib/modules/$(uname -r)/ -m mmcblk
  dracut-install: Failed to find module 'mmcblk'

In this patch, we will convert the string mmcblk to mmc_block, so the
kernel module can be successfully loaded.

Signed-off-by: Tao Liu <ltao@redhat.com>
dracut-functions.sh