2011-02-06 14:42:42 +00:00
|
|
|
#!/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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-09 11:00:36 +00:00
|
|
|
. /lib/functions.sh
|
|
|
|
|
2011-02-06 14:42:42 +00:00
|
|
|
[ "$FIRMWARE" = "3826.eeprom" ] && {
|
2017-07-09 11:00:36 +00:00
|
|
|
[ "$(board_name)" != "nokia,n810" ] || {
|
2011-02-06 14:42:42 +00:00
|
|
|
[ -e /lib/firmware/3826.eeprom ] ||\
|
|
|
|
p54spi_eeprom_extract
|
|
|
|
}
|
|
|
|
}
|