All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel-modules: Fix storage module selection for sdhci/mmc/ahci
@ 2014-05-23 10:54 Peter Robinson
       [not found] ` <1400842441-3728-1-git-send-email-pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Robinson @ 2014-05-23 10:54 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Peter Robinson

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: <pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] kernel-modules: Fix storage module selection for sdhci/mmc/ahci
@ 2014-05-23 11:28 Peter Robinson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Robinson @ 2014-05-23 11:28 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Peter Robinson

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: <pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel-modules: Fix storage module selection for sdhci/mmc/ahci
       [not found] ` <1400842441-3728-1-git-send-email-pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-05-23 14:39   ` Harald Hoyer
       [not found]     ` <537F5D8F.6020905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Harald Hoyer @ 2014-05-23 14:39 UTC (permalink / raw)
  To: Peter Robinson, initramfs-u79uwXL29TY76Z2rM5mHXA

On 23.05.2014 12:54, Peter Robinson wrote:
> 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: <pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  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
> 

Hmm.. increases the size of the generic x86 image by 1.4MB

most notably:

usr/lib/firmware/mrvl/sd8797_uapsta.bin 	458108
usr/lib/firmware/mrvl/sd8897_uapsta.bin 	639012

pulled in by
kernel/drivers/net/wireless/mwifiex/mwifiex_sdio.ko.xz

questionable module for the initramfs


Otherwise fine with me. At least, it's only the rescue image growing.

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel-modules: Fix storage module selection for sdhci/mmc/ahci
       [not found]     ` <537F5D8F.6020905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2014-05-23 15:16       ` Peter Robinson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Robinson @ 2014-05-23 15:16 UTC (permalink / raw)
  To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Fri, May 23, 2014 at 3:39 PM, Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> On 23.05.2014 12:54, Peter Robinson wrote:
>> 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: <pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  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
>>
>
> Hmm.. increases the size of the generic x86 image by 1.4MB
>
> most notably:
>
> usr/lib/firmware/mrvl/sd8797_uapsta.bin         458108
> usr/lib/firmware/mrvl/sd8897_uapsta.bin         639012
>
> pulled in by
> kernel/drivers/net/wireless/mwifiex/mwifiex_sdio.ko.xz
>
> questionable module for the initramfs

It must have picked up on the SDIO driver, interesting it only got two
(plus libertas) yet we have 15 SDIO drivers enabled in the kernel.
I'll review the drivers/functions see how it can be evolved. I'll post
a patch of top of this one once confirmed. I've got some other minor
bits to do too.

Thanks,
Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-23 15:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 10:54 [PATCH] kernel-modules: Fix storage module selection for sdhci/mmc/ahci Peter Robinson
     [not found] ` <1400842441-3728-1-git-send-email-pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-23 14:39   ` Harald Hoyer
     [not found]     ` <537F5D8F.6020905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-23 15:16       ` Peter Robinson
  -- strict thread matches above, loose matches on Subject: below --
2014-05-23 11:28 Peter Robinson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.