aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap24xx/base-files
diff options
context:
space:
mode:
authorMichael Büsch <mb@bu3sch.de>2011-02-06 12:45:21 +0000
committerMichael Büsch <mb@bu3sch.de>2011-02-06 12:45:21 +0000
commita536870cc5a2025965d53fd19e72e1b3eddffbdd (patch)
tree654d82e9c13d011736d9329c83a362a59260526d /target/linux/omap24xx/base-files
parenta5e3f70b18c4d13055c79f9967d704ad2bc36826 (diff)
downloadmaster-187ad058-a536870cc5a2025965d53fd19e72e1b3eddffbdd.tar.gz
master-187ad058-a536870cc5a2025965d53fd19e72e1b3eddffbdd.tar.bz2
master-187ad058-a536870cc5a2025965d53fd19e72e1b3eddffbdd.zip
n810: Add the CAL BME PMM extractor script to preinit.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25381 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/omap24xx/base-files')
-rw-r--r--target/linux/omap24xx/base-files/lib/preinit/99_bme_pmm_image14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/omap24xx/base-files/lib/preinit/99_bme_pmm_image b/target/linux/omap24xx/base-files/lib/preinit/99_bme_pmm_image
new file mode 100644
index 0000000000..8e29fd520e
--- /dev/null
+++ b/target/linux/omap24xx/base-files/lib/preinit/99_bme_pmm_image
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+do_extract_cal_bme_pmm() {
+ [ -e /lib/firmware/n810-cal-bme-pmm.fw ] && return 0
+
+ [ -x /usr/bin/calvaria ] || { echo "CAL-BME extract: calvaria not found"; return 1; }
+
+ /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"
+ return 1
+ }
+}
+
+boot_hook_add preinit_mount_root do_extract_cal_bme_pmm