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

Bug#384043: initramfs-tools: hook manual_add_modules don't copy/link some kernel modules



Package: initramfs-tools
Version: 0.75
Severity: important


I'm working on a small thin client project based on initramfs called TCOS[1].

This is similar to pxes, but I copy my debian installed apps and libs 
into initramfs and boot from network throught tftp.

In older version of initramfs-tools sound work ok, but in newer not.
Not know when sound break.

Tcos have a dir in /etc like this:

/etc/tcos
|-- hooks
|   |-- tcosbin
|   `-- tcosmods
|-- hooks-addons
|   |-- debug
|   |-- devices
|   |-- dhclient
|   |-- discover
|   |-- freenx
|   |-- hwclock
|   |-- inetd
|   |-- italc
|   |-- sound
|   |-- ssh
|   |-- tcos
|   |-- tcosmonitor
|   |-- tinylogin
|   |-- vnc
|   |-- web_browser
|   `-- xorg
|-- initramfs.conf
|-- scripts
|   |-- tcos
|   |-- tcos-bottom
|   |   |-- 05inittcos
|   |   |-- 10initsound
|   |   |-- 20devices
|   |   |-- 25freespace
|   |   |-- 30startx
|   |   `-- 50error
|   |-- tcos-premount
|   |   |-- 05network
|   |   |-- 10fstab
|   |   |-- 15uselocal
|   |   |-- 20swapon
|   |   |-- 25download_settings
|   |   |-- 30sqmount
|   |   |-- 50ldconfig
|   |   `-- 60autofs
|   `-- tcos-top
|       `-- 10foo

There are some file not listed....

I create initramfs images with:

mkinitramfs -d /etc/tcos -o /tftpboot/tcos/initramfs 2.6.16-1-486

mkinitramfs work ok and generate initramfs that boot ok but without sound.

The important hook is tcosmods that copy some kernel modules into 
initramfs with manual_add_modules:

A simple hook like next will copy this modules into initramfs:

##################  8<  #######################

MODULES="ide-core ide-disk ide-generic ide-cd cdrom isofs ext3 vfat
 floppy autofs autofs4 ehci-hcd ohci-hcd uhci-hcd sl811-hcd usbcore
 usb-storage scsi_mod sr_mod sd_mod loop unionfs squashfs nls_cp437
 nls_iso8859-1 pcnet32 3c59x video psmouse mousedev evbug evdev agpgart
 vgastate lkkbd xtkbd pcspkr soundcore snd-seq-device snd-pcm snd-rawmidi
 snd snd-hwdep snd-mixer-oss snd-pcm-oss snd-ac97-codec snd-ens1371 snd-via82xx
 piix via82cxxx parport_pc"

for x in ${MODULES} ; do
      echo "Adding module ${x}"
      manual_add_modules ${x}
done

##################  >8  #######################

But, if I check later, next file/modules are not into initramfs:

snd-pcm.ko
snd.ko
snd-ens1371.ko
snd-via82xx.ko

If I debug manual_add_modules i obtain for example with snd-via82xx:

+ set -x
+ manual_add_modules snd-via82xx
++ modprobe --set-version=2.6.16-1-486 --show-depends snd-via82xx
++ awk '/^insmod/ { print $2 }'
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/soundcore.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/seq/snd-seq-device.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-rawmidi.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko ']'
++ dirname /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
+ mkdir -p /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401
++ dirname /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
+ ln -s /lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/drivers/mpu401
+ '[' -n n -a n = y ']'
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-page-alloc.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/core/snd-timer.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/pci/ac97/snd-ac97-bus.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/sound/pci/ac97/snd-ac97-codec.ko ']'
+ continue
+ for mam_x in '$(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '\''/^insmod/ { print $2 }'\'')'
+ '[' -e /tmp/mkinitramfs_t31173//lib/modules/2.6.16-1-486/kernel/drivers/input/gameport/gameport.ko ']'
+ continue
+ set +x


As you can see via-82xx.ko is not processed and linked....


I have uploaded code into mentors:

deb-src http://mentors.debian.net/debian unstable main

$ apt-get source initramfs-tools-tcos


[1] http://soleup.eup.uva.es/mediawiki/index.php/Tcos (now server is down)


No other important info...

Thanks for attention.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-k7
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)

Versions of packages initramfs-tools depends on:
ii  busybox                       1:1.1.3-2  Tiny utilities for small and embed
ii  cpio                          2.6-17     GNU cpio -- a program to manage ar
ii  klibc-utils                   1.4.19-2   small statically-linked utilities 
ii  module-init-tools             3.2.2-3    tools for managing Linux kernel mo
ii  udev                          0.097-2    /dev/ and hotplug management daemo

initramfs-tools recommends no packages.

-- no debconf information



Reply to: