Commit 9e1691b7 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Juerg Haefliger
parent 50551364
...@@ -67,39 +67,54 @@ getall() { ...@@ -67,39 +67,54 @@ getall() {
do do
dpkg-deb --extract $filename tmp dpkg-deb --extract $filename tmp
done done
find tmp -name "*.ko" | while read f; do # FORM 1: linux-image et al extracted here.
modinfo $f | grep ^firmware >> $fwinfo if [ -d tmp/boot ]; then
done echo -n "images..."
if [ -f tmp/boot/abi-* ]; then find tmp -name "*.ko" | while read f; do
mv tmp/boot/abi-* $abidir/$arch/$sub modinfo $f | grep ^firmware >> $fwinfo
else done
echo -n "NO ABI FILE..." if [ -f tmp/boot/abi-* ]; then
fi mv tmp/boot/abi-* $abidir/$arch/$sub
if [ -f tmp/boot/retpoline-* ]; then else
mv tmp/boot/retpoline-* $abidir/$arch/$sub.retpoline echo -n "NO ABI FILE..."
fi
if [ -f tmp/boot/retpoline-* ]; then
mv tmp/boot/retpoline-* $abidir/$arch/$sub.retpoline
else
echo -n "NO RETPOLINE FILE..."
fi
(cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \
sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \
$abidir/$arch/$sub.modules
(
cd tmp;
# Prevent exposing some errors when called by python scripts. SIGPIPE seems to get
# exposed when using the `find ...` form of the command.
ko=$(find lib/modules/$verabi-$sub/kernel \
-name '*.ko' | head -1)
readelf -p .comment "$ko" | gawk '
($1 == "[") {
printf("%s", $3);
for (n=4; n<=NF; n++) {
printf(" %s", $n);
}
print ""
}' | sort -u >$abidir/$arch/$sub.compiler
version=`cat $abidir/$arch/$sub.compiler`
echo -n "$version..."
)
# FORM 2: moduleinfo packages
# cranky-fix -- modinfo supported
else else
echo -n "NO RETPOLINE FILE..." echo -n "buildinfo..."
base="tmp/usr/lib/linux/${verabi}-${sub}"
mv "$base/abi" "$abidir/$arch/$sub"
for comp in 'modules' 'retpoline' 'compiler'
do
mv "$base/$comp" "$abidir/$arch/$sub.$comp"
done
cat "$base/fwinfo" >>"$fwinfo"
fi fi
(cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \
sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \
$abidir/$arch/$sub.modules
(
cd tmp;
# Prevent exposing some errors when called by python scripts. SIGPIPE seems to get
# exposed when using the `find ...` form of the command.
ko=$(find lib/modules/$verabi-$sub/kernel \
-name '*.ko' | head -1)
readelf -p .comment "$ko" | gawk '
($1 == "[") {
printf("%s", $3);
for (n=4; n<=NF; n++) {
printf(" %s", $n);
}
print ""
}' | sort -u >$abidir/$arch/$sub.compiler
version=`cat $abidir/$arch/$sub.compiler`
echo -n "$version..."
)
rm -rf tmp $filenames rm -rf tmp $filenames
echo "done." echo "done."
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment