From 3b4ce4f9aafa8affeed372aec022e1a24b052f00 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 23 May 2014 14:26:18 +0100 Subject: [PATCH] Fix achi/mmc/sdhci selection for non host based initrd --- ...ix-storage-module-selection-for-sdhc.patch | 52 +++++++++++++++++++ dracut.spec | 6 ++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch diff --git a/0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch b/0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch new file mode 100644 index 0000000..8f4006e --- /dev/null +++ b/0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch @@ -0,0 +1,52 @@ +From e1ec3b48b3f63b30082bcfe7b0110ee24a989b67 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Fri, 23 May 2014 11:33:42 +0100 +Subject: [PATCH] kernel-modules: Fix storage module selection for + sdhci/mmc/ahci + +Currently the block driver detection for generic initrd doesn't include +the SD/MMC drivers so we fail to boot generic images on any device using +those platforms as boot devices when using a generic initrd. Add logic +to detect those modules. This primarily fixes embedded ARM devices but +also likely intel tablets/dev boards and enterprise hypervisors that +have the ability to boot from SD. + +Also the ahci_init_controller misses a number of drivers that use the +libahci_platform module for the init so this fixes some missing achi +moduless too. + +Finally it cleans up the ARM storage module hacks that the above now +deals with in a more generic manner. + +Signed-off-by: +--- + modules.d/90kernel-modules/module-setup.sh | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 2378663..5271438 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -6,7 +6,7 @@ + installkernel() { + if [[ -z $drivers ]]; then + block_module_filter() { +- local _blockfuncs='ahci_init_controller|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect' ++ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_pltfm_init' + # subfunctions inherit following FDs + local _merge=8 _side2=9 + function bmf1() { +@@ -51,9 +51,7 @@ installkernel() { + + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules +- hostonly='' instmods sdhci_esdhc_imx mmci sdhci_tegra mvsdio omap omapdrm \ +- omap_hsmmc panel-tfp410 sdhci_dove ahci_platform pata_imx sata_mv \ +- ehci-tegra mmc_block usb_storage ++ hostonly='' instmods omapdrm panel-tfp410 + fi + + # install virtual machine support +-- +1.9.3 + diff --git a/dracut.spec b/dracut.spec index a3c14f8..4a743a8 100644 --- a/dracut.spec +++ b/dracut.spec @@ -11,7 +11,7 @@ Name: dracut Version: 037 -Release: 11.git20140402%{?dist} +Release: 12.git20140402%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -39,6 +39,7 @@ Patch6: 0006-network-DCHPv6-set-valid_lft-and-preferred_lft.patch Patch7: 0007-dm-add-dm-cache-modules.patch Patch8: 0008-fcoe-workaround-fcoe-timing-issues.patch Patch9: 0009-fstab-do-not-mount-and-fsck-from-fstab-if-using-syst.patch +Patch10: 0001-kernel-modules-Fix-storage-module-selection-for-sdhc.patch # Revert dangerous behaviour change which breaks boot for multiple reporters # https://bugzilla.redhat.com/show_bug.cgi?id=1084766 @@ -491,6 +492,9 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Fri May 23 2014 Peter Robinson 037-12.git20140402 +- Fix achi/mmc/sdhci selection for non host based initrd + * Thu Apr 17 2014 Adam Williamson - 037-11.git20140402 - revert broken upstream change that causes RHBZ#1084766