source: udev/firmware.sh@ e3fd238

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since e3fd238 was 7e161ea, checked in by Jim Gifford <clfs@…>, 19 years ago

r833@server (orig r831): jim | 2005-12-05 10:42:24 -0800
Added: udev package for Cross-LFS. Work in Progress

  • Property mode set to 100755
File size: 865 bytes
Line 
1#!/bin/sh
2########################################################################
3#
4# Description : Firmware Script
5#
6# Authors : Based on Open Suse Udev Rules
7# kay.sievers@suse.de
8#
9# Adapted to : Jim Gifford
10# LFS
11#
12# Version : 00.00
13#
14# Notes :
15#
16########################################################################
17
18. /etc/sysconfig/rc
19. ${rc_functions}
20
21FIRMWARE_DIRS="/lib/firmware"
22
23if [ ! -e /sys/$DEVPATH/loading ]; then
24 boot_mesg "firmware loader misses sysfs directory"
25 exit 0
26fi
27
28for DIR in $FIRMWARE_DIRS; do
29 [ -e "$DIR/$FIRMWARE" ] || continue
30 boot_mesg "loading $DIR/$FIRMWARE"
31 echo 1 > /sys/$DEVPATH/loading
32 cat "$DIR/$FIRMWARE" > /sys/$DEVPATH/data
33 echo 0 > /sys/$DEVPATH/loading
34 exit
35done
36
37echo -1 > /sys/$DEVPATH/loading
38boot_mesg "Cannot find firmware file '$FIRMWARE'"
39exit 1
Note: See TracBrowser for help on using the repository browser.