[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#762634: initramfs-tools: [armhf] mounting rootfs on USB disk fails / some USB host controller drivers missing in initramfs



On Tue, Sep 23, 2014 at 11:42:08PM +0200, Michael Prokop wrote:
> * Karsten Merker [Tue Sep 23, 2014 at 11:22:32PM +0200]:

> > Please always include ohci-platform, ehci-platform and
> > phy-sun4i-usb into the initramfs if they are provided by the
> > kernel for which the initramfs is built.
> 
> Does this look like it would provide what you're asking for?
> http://anonscm.debian.org/cgit/kernel/initramfs-tools.git/commit/?h=mika/bug_762634&id=3b835665015c0a9287284c2548b12ab7c8cabc78

Hello,

outside d-i and for the "MODULES=most" configuration, this works
fine:

$ grep MODULES /etc/initramfs-tools/initramfs.conf
# MODULES: [ most | netboot | dep | list ]
MODULES=most
$ sudo update-initramfs -u -k 3.16-2-armmp-lpae
update-initramfs: Generating /boot/initrd.img-3.16-2-armmp-lpae
Installing sun7i-a20-cubietruck.dtb 3.16-2-armmp-lpae into /boot
Installing sun7i-a20-cubietruck.dtb 3.16-2-armmp-lpae into /boot
flash-kernel: installing version 3.16-2-armmp-lpae
Generating boot script u-boot image... done.
Taking backup of boot.scr.
Installing new boot.scr.
$ lsinitramfs /boot/initrd.img-3.16-2-armmp-lpae |grep -e hci-platform -e phy-sun4i-usb
lib/modules/3.16-2-armmp-lpae/kernel/drivers/phy/phy-sun4i-usb.ko
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb/host/ohci-platform.ko
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb/host/ehci-platform.ko

Inside the /target chroot created by d-i, update-initramfs is by default
configured to run with "MODULES=dep" and gives only the following
modules on my armhf/sunxi test system:

lib/modules/3.16-2-armmp-lpae/kernel/drivers
lib/modules/3.16-2-armmp-lpae/kernel/drivers/scsi
lib/modules/3.16-2-armmp-lpae/kernel/drivers/scsi/scsi_mod.ko
lib/modules/3.16-2-armmp-lpae/kernel/drivers/scsi/sd_mod.ko
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb/host
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb/host/ehci-hcd.ko
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb/host/ehci-platform.ko
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb/storage
lib/modules/3.16-2-armmp-lpae/kernel/drivers/usb/storage/usb-storage.ko
lib/modules/3.16-2-armmp-lpae/kernel/drivers/md
lib/modules/3.16-2-armmp-lpae/kernel/drivers/md/dm-mod.ko
lib/modules/3.16-2-armmp-lpae/kernel/lib
lib/modules/3.16-2-armmp-lpae/kernel/lib/crc16.ko
lib/modules/3.16-2-armmp-lpae/kernel/lib/crc-t10dif.ko
lib/modules/3.16-2-armmp-lpae/kernel/fs
lib/modules/3.16-2-armmp-lpae/kernel/fs/mbcache.ko
lib/modules/3.16-2-armmp-lpae/kernel/fs/ext4
lib/modules/3.16-2-armmp-lpae/kernel/fs/ext4/ext4.ko
lib/modules/3.16-2-armmp-lpae/kernel/fs/jbd2
lib/modules/3.16-2-armmp-lpae/kernel/fs/jbd2/jbd2.ko
lib/modules/3.16-2-armmp-lpae/kernel/crypto
lib/modules/3.16-2-armmp-lpae/kernel/crypto/crct10dif_generic.ko
lib/modules/3.16-2-armmp-lpae/kernel/crypto/crct10dif_common.ko

The phy-sun4i-usb module is missing there, although it is loaded
by the running kernel:

# lsmod  |grep phy_sun4i_usb
phy_sun4i_usb           4260  4

Without phy_sun4i_usb, USB support does not work at all on this
platform, so this module would always have to be included.

The missing ohci-hcd and ohci-platform modules would be explained
by the fact that this particular device technically has both EHCI
and OHCI controllers, but the platform-dependent OHCI glue code
is not yet implemented in the kernel, so the OHCI part is
currently invisible to the kernel.


When manually running update-initramfs with MODULES=most inside
the d-i /target chroot, all three modules (ohci-platform,
ehci-platform and phy-sun4i-usb) are there, but by default the
user is not presented with a choice regarding MODULES=dep vs. 
MODULES=most in d-i.  The relevant debconf prompt is only
presented at debconf priority "medium", i.e. when running d-i in
"expert" mode, so I would appreciate very much if you could
include the missing phy-sun4i-usb module also when building the
initramfs with MODULES=dep.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.


Reply to: