From 36f57504882ff0e4d00611494c2719a8597fc116 Mon Sep 17 00:00:00 2001 From: mb Date: Sun, 6 Feb 2011 12:45:21 +0000 Subject: [PATCH] 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 --- .../base-files/lib/preinit/99_bme_pmm_image | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 target/linux/omap24xx/base-files/lib/preinit/99_bme_pmm_image 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 000000000..8e29fd520 --- /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 -- 2.20.1