summaryrefslogtreecommitdiff
path: root/target/linux/omap24xx/base-files/etc/hotplug.d/firmware/10-bme-pmm-image
diff options
context:
space:
mode:
authormb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-02-06 14:42:42 +0000
committermb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-02-06 14:42:42 +0000
commit6b20955cca6fb3518c4d77afb68938749fdf3201 (patch)
tree0932fc76268c2c2dfe12296c949ef20b07811856 /target/linux/omap24xx/base-files/etc/hotplug.d/firmware/10-bme-pmm-image
parent98292bc12a392a5c6ddb30fdc3e029b32b056f5c (diff)
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/firmware/10-bme-pmm-image')
-rw-r--r--target/linux/omap24xx/base-files/etc/hotplug.d/firmware/10-bme-pmm-image15
1 files changed, 15 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
+ }
+}