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

Bug#459210: initramfs-tools: Initramfs problem with module which needs firmware (e.g. aic94xx)



Package: initramfs-tools
Version: 0.85h
Severity: normal
Tags: patch

Firmware installation for aic94xx

I had to create a hooks file and a hotplug file to load the driver
correctly during system boot.

Download http://kernel.org/pub/linux/kernel/people/jejb/aic94xx-seq.fw
cp aic94xx-seq.fw /lib/firmware

Create /etc/initramfs-tools/hooks/firmware_aic94xx

---BEGIN OF /etc/initramfs-tools/hooks/firmware_aic94xx---
#!/bin/sh


PREREQ="udev"


prereqs()
{
 echo "$PREREQ"
 }


 case $1 in
 prereqs)
  prereqs
   exit 0
    ;;
    esac


    . /usr/share/initramfs-tools/hook-functions


    copy_exec /lib/udev/firmware.agent /lib/udev/


    mkdir -p $DESTDIR/lib/firmware
    cp /lib/firmware/aic94xx-seq.fw $DESTDIR/lib/firmware

    copy_exec /sbin/hotplug /sbin

---END OF /etc/initramfs-tools/hooks/firmware_aic94xx---

Create /sbin/hotplug

---BEGIN OF /sbin/hotplug---
#!/bin/sh


# Simple hotplug script sample:
# Both $DEVPATH and $FIRMWARE are already provided in the environment.


HOTPLUG_FW_DIR=/lib/firmware/


if [ ! -e /sys/$DEVPATH/loading ]; then
  echo /sys not found
    exit 1
    fi


    echo 1 > /sys/$DEVPATH/loading
    cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
    echo 0 > /sys/$DEVPATH/loading
---END OF /sbin/hotplug---

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (900, 'stable')
Architecture: amd64 (amd64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.23.9
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)



Reply to: