From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Marco d'Itri" Date: Tue, 22 Jun 2004 21:17:55 +0000 Subject: Re: Location of firmware files Message-Id: <20040622211755.GA17750@wonderland.linux.it> MIME-Version: 1 Content-Type: multipart/mixed; boundary="Nq2Wo0NMKNjxTN9z" List-Id: References: <40ACDCE3.5040500@us.ibm.com> In-Reply-To: <40ACDCE3.5040500@us.ibm.com> To: linux-hotplug@vger.kernel.org --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Jun 22, Brian King wrote: > Getting back to the following thread regarding the proper location > for firmware files: FYI, I applied this patch to the debian package, because some firmwares are needed before / is mounted. -- ciao, | Marco | [6878 svWwedgktgMa2] --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=firmware_dirs diff -ruN hotplug-2004_03_29.orig/etc/hotplug/firmware.agent hotplug-2004_03_29/etc/hotplug/firmware.agent --- hotplug-2004_03_29.orig/etc/hotplug/firmware.agent 2004-03-26 23:34:34.000000000 +0100 +++ hotplug-2004_03_29/etc/hotplug/firmware.agent 2004-06-06 17:05:35.000000000 +0200 @@ -19,8 +19,8 @@ . ./hotplug.functions # DEBUG=yes export DEBUG -# directory of the firmware files -FIRMWARE_DIR=/usr/lib/hotplug/firmware +# directories with the firmware files +FIRMWARE_DIRS="/lib/firmware /usr/lib/hotplug/firmware" # mountpoint of sysfs SYSFS=$(sed -n 's/^.* \([^ ]*\) sysfs .*$/\1/p' /proc/mounts) @@ -40,13 +40,16 @@ sleep 1 fi - if [ -f "$FIRMWARE_DIR/$FIRMWARE" ]; then + for DIR in $FIRMWARE_DIRS; do + [ -e "$DIR/$FIRMWARE" ] || continue echo 1 > $SYSFS/$DEVPATH/loading - cp "$FIRMWARE_DIR/$FIRMWARE" $SYSFS/$DEVPATH/data + cat "$DIR/$FIRMWARE" > $SYSFS/$DEVPATH/data echo 0 > $SYSFS/$DEVPATH/loading - else - echo -1 > $SYSFS/$DEVPATH/loading - fi + exit + done + + # the firmware was not found + echo -1 > $SYSFS/$DEVPATH/loading ;; --Nq2Wo0NMKNjxTN9z-- ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel