All pastes #993043 Raw Edit

Mine

public text v1 · immutable
#993043 ·published 2008-04-22 09:26 UTC
rendered paste body
#!/bin/sh

# edf.sh: fwld's firmware uploading script.

# Copyright (C) 2007 Mr. KIKKO.
# This file is distributed under the term of the GNU GPL.

# NO WARRANTY!

##### SETTINGS #####
# FWDIR: specifies the directory where firmware files resides.
# The structure of this directory should be the one device derivers expects!
FWDIR=/lib/firmware/

if [ ! -e /sys/$DEVPATH/loading ]; then
  exit 0
fi

logger -i -t fwld_stdscript serving $FIRMWARE

logger -i -t fwld_stdscript Opening upload session...
echo 1 >/sys/$DEVPATH/loading
logger -i -t fwld_stdscript Writing firmware file to memory...
cat $FWDIR/$FIRMWARE >/sys/$DEVPATH/data
logger -i -t fwld_stdscript Upload to kernel memory completed, closing upload session...
echo 0 >/sys/$DEVPATH/loading
logger -i -t fwld_stdscript exit...