From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../etc/hotplug.d/firmware/20-p54spi-eeprom | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 target/linux/omap24xx/base-files/etc/hotplug.d/firmware/20-p54spi-eeprom (limited to 'target/linux/omap24xx/base-files/etc/hotplug.d/firmware/20-p54spi-eeprom') 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 000000000..ca92f80be --- /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 + } +} -- cgit v1.2.3