Patchwork [oneiric,1/3] UBUNTU: Extract firmware module info during getabi

login
register
mail settings
Submitter Andy Whitcroft
Date July 5, 2012, 12:46 p.m.
Message ID <1341492369-24650-2-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/169142/
State New
Headers show

Comments

Andy Whitcroft - July 5, 2012, 12:46 p.m.
From: Tim Gardner <tim.gardner@canonical.com>

Create $DEBIAN/abi/$ABI/fwinfo

BugLink: http://bugs.launchpad.net/bugs/1021174
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 debian/scripts/misc/getabis |    7 +++++++
 1 file changed, 7 insertions(+)

Patch

diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis
index 0556f8e..708b7b2 100755
--- a/debian/scripts/misc/getabis
+++ b/debian/scripts/misc/getabis
@@ -19,6 +19,7 @@  WGET="wget --quiet -c"
 abidir="`pwd`/$DEBIAN/abi/$verfull"
 tmpdir="`pwd`/abi-tmp-$verfull"
 origdir="`pwd`"
+fwinfo=$abidir/fwinfo
 
 test -d $tmpdir || mkdir $tmpdir
 
@@ -45,6 +46,9 @@  getall() {
 		if [ "$?" = "0" ]; then
 			echo -n "extracting..."
 			dpkg-deb --extract $filename tmp
+			find tmp -name "*.ko" | while read f; do
+				modinfo $f | grep ^firmware >> $fwinfo
+			done
 			if [ -f tmp/boot/abi-* ]; then
 				mv tmp/boot/abi-* $abidir/$arch/$sub
 			else
@@ -92,4 +96,7 @@  if [ "$compilers" != 1 ]; then
 	echo "WARNING: inconsistant compiler versions detected" 1>&2
 fi
 
+sort < $fwinfo | uniq > fwinfo.tmp
+mv fwinfo.tmp $fwinfo
+
 rmdir $tmpdir