diff options
author | Michael Büsch <mb@bu3sch.de> | 2011-02-06 14:42:42 +0000 |
---|---|---|
committer | Michael Büsch <mb@bu3sch.de> | 2011-02-06 14:42:42 +0000 |
commit | e15d4431ea47137b2dfd7429e9b10a28de18bb07 (patch) | |
tree | 0932fc76268c2c2dfe12296c949ef20b07811856 /target/linux/omap24xx/base-files/etc/hotplug.d | |
parent | b14b5c0093a8cb30dfff13cc495b2946095ebdbd (diff) | |
download | master-187ad058-e15d4431ea47137b2dfd7429e9b10a28de18bb07.tar.gz master-187ad058-e15d4431ea47137b2dfd7429e9b10a28de18bb07.tar.bz2 master-187ad058-e15d4431ea47137b2dfd7429e9b10a28de18bb07.zip |
n810: Add firmware generator hotplug scripts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25384 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/omap24xx/base-files/etc/hotplug.d')
-rw-r--r-- | target/linux/omap24xx/base-files/etc/hotplug.d/firmware/10-bme-pmm-image | 15 | ||||
-rw-r--r-- | target/linux/omap24xx/base-files/etc/hotplug.d/firmware/20-p54spi-eeprom | 30 |
2 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/omap24xx/base-files/etc/hotplug.d/firmware/10-bme-pmm-image b/target/linux/omap24xx/base-files/etc/hotplug.d/firmware/10-bme-pmm-image new file mode 100644 index 0000000000..d03c9dee03 --- /dev/null +++ b/target/linux/omap24xx/base-files/etc/hotplug.d/firmware/10-bme-pmm-image @@ -0,0 +1,15 @@ +#!/bin/sh + +n810_cal_bme_pmm_extract() { + [ -x /usr/bin/calvaria ] && { + /usr/bin/calvaria -p -n bme -i last /dev/mtdblock1 >/lib/firmware/n810-cal-bme-pmm.fw ||\ + echo "CAL-BME extract: Failed to extract blob" + } +} + +[ "$FIRMWARE" = "n810-cal-bme-pmm.fw" ] && { + [ -z "$(grep -e 'Nokia N810' /proc/cpuinfo)" ] || { + [ -e /lib/firmware/n810-cal-bme-pmm.fw ] ||\ + n810_cal_bme_pmm_extract + } +} diff --git a/target/linux/omap24xx/base-files/etc/hotplug.d/firmware/20-p54spi-eeprom b/target/linux/omap24xx/base-files/etc/hotplug.d/firmware/20-p54spi-eeprom new file mode 100644 index 0000000000..ca92f80bea --- /dev/null +++ b/target/linux/omap24xx/base-files/etc/hotplug.d/firmware/20-p54spi-eeprom @@ -0,0 +1,30 @@ +#!/bin/sh + +p54spi_eeprom_clean() { + rm -f /tmp/wlan-iq-align /tmp/wlan-tx-gen2 +} + +p54spi_eeprom_die() { + echo "$*" + p54spi_eeprom_clean + exit 1 +} + +p54spi_eeprom_extract() { + [ -x /usr/bin/calvaria -a -x /usr/bin/cal2p54 ] && { + /usr/bin/calvaria -p -n wlan-iq-align -i last /dev/mtdblock1 >/tmp/wlan-iq-align ||\ + p54spi_eeprom_die "p54spi EEPROM: Failed to extract wlan-iq-align" + /usr/bin/calvaria -p -n wlan-tx-gen2 -i last /dev/mtdblock1 >/tmp/wlan-tx-gen2 ||\ + p54spi_eeprom_die "p54spi EEPROM: Failed to extract wlan-tx-gen2" + /usr/bin/cal2p54 /tmp/wlan-tx-gen2 /tmp/wlan-iq-align >/lib/firmware/3826.eeprom ||\ + p54spi_eeprom_die "p54spi EEPROM: Failed to generate EEPROM" + p54spi_eeprom_clean + } +} + +[ "$FIRMWARE" = "3826.eeprom" ] && { + [ -z "$(grep -e 'Nokia N810' /proc/cpuinfo)" ] || { + [ -e /lib/firmware/3826.eeprom ] ||\ + p54spi_eeprom_extract + } +} |