# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/rockplug/rockplug_firmware.patch # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- diff -ruN rockplug-0.0.9/Makefile rockplug-0.0.9-new/Makefile --- rockplug-0.0.9/Makefile 2004-03-22 07:08:30.000000000 +0100 +++ rockplug-0.0.9-new/Makefile 2004-10-06 09:31:01.178453224 +0200 @@ -1,5 +1,5 @@ PACKAGE = rockplug -VERSION = 0.0.7 +VERSION = 0.0.9 SCRIPTS = \ etc/rockplug/usb.init \ @@ -19,6 +19,7 @@ etc/rockplug/scsi.init \ etc/rockplug/scsi.plug \ etc/rockplug/ieee1394.plug \ +etc/rockplug/firmware.plug \ sbin/rockplug \ sbin/rockscan diff -ruN rockplug-0.0.9/etc/rockplug/firmware.plug rockplug-0.0.9-new/etc/rockplug/firmware.plug --- rockplug-0.0.9/etc/rockplug/firmware.plug 1970-01-01 01:00:00.000000000 +0100 +++ rockplug-0.0.9-new/etc/rockplug/firmware.plug 2004-10-06 09:30:32.561803616 +0200 @@ -0,0 +1,51 @@ +#!/bin/bash +# Copyright (C) 2003 Juergen "George" Sawinski +# Rene Rebe +# All rights reserved. +# Partially copied from/rewritten based on hotplug. +# See README file for further explanation and +# LICENCING TERMS (GPL v2 or later). + +. /etc/rockplug/functions + +# config +FIRMWARE_DIR=/usr/lib/rockplug/firmware +[ -f /etc/conf/firmware ] && . /etc/conf/firmware + +# sanity checks +if [ "$FIRMWARE" = "" -o "$ACTION" = "" -o "$DEVPATH" = ""]; then + #@FIXME meaningfull message + mesg "Invalid invocation of $0" + exit 1 +fi + +SYSFS=$(sed -n 's/^.* \([^ ]*\) sysfs .*$/\1/p' /proc/mounts) + +# use /proc for 2.4 kernels +if [ "$SYSFS" = "" ]; then + SYSFS=/proc +fi + +case $ACTION in + add) + mesg "Firmware: Loading $FIRMWARE for $DEVPATH" + if [ -f $FIRMWARE_DIR/$FIRMWARE ]; then + echo 1 > $SYSFS/$DEVPATH/loading + cp $FIRMWARE_DIR/$FIRMWARE $SYSFS/$DEVPATH/data + echo 0 > $SYSFS/$DEVPATH/loading + else + echo -1 > $SYSFS/$DEVPATH/loading + fi + ;; + remove) + mesg "Firmware: Not removing anything" + ;; + *) + mesg "Firmware: Nothing to do for $ACTION" + ;; +esac + +# Local variables: +# mode: shell-script +# basic-offset: 2 +# End: