forked from pool/kernel-source
This commit is contained in:
committed by
Git OBS Bridge
parent
41724cba2e
commit
01c540322a
@@ -1,37 +1,18 @@
|
||||
#! /bin/bash
|
||||
|
||||
# these are updated by the spec file
|
||||
sourcedir=${0%/*}
|
||||
|
||||
trap 'rm -f "$filelist"' EXIT
|
||||
filelist=$(mktemp -t ${0##*/}.XXXXXXXXXX)
|
||||
trap "rm -f $filelist" EXIT
|
||||
cat >"$filelist"
|
||||
flavor=${1##*-}
|
||||
shopt -s nullglob
|
||||
|
||||
# pretend that /boot/vmlinux-* is in the -base package and not in -devel
|
||||
if grep -q '/boot/System\.map\>' "$filelist"; then
|
||||
prefix=$(sed -rn 's:(.*)/boot/System\.map\>.*:\1:p; T; q' "$filelist")
|
||||
for f in "$prefix"/boot/vmlinux*; do
|
||||
echo "$f" >>"$filelist"
|
||||
done
|
||||
else
|
||||
perl -ni -e 'next if /\/boot\/vmlinux/ && !/\.debug$/; print' "$filelist"
|
||||
fi
|
||||
|
||||
/usr/lib/rpm/find-provides "$@" <"$filelist"
|
||||
|
||||
case `uname -m` in
|
||||
ia64)
|
||||
image="vmlinuz"
|
||||
;;
|
||||
*)
|
||||
image="vmlinux"
|
||||
esac
|
||||
while read f; do
|
||||
test -e "$f" || continue
|
||||
case "$f" in
|
||||
*.ko | */$image* )
|
||||
echo "$f"
|
||||
esac
|
||||
done <"$filelist" | \
|
||||
xargs -r $sourcedir/symsets.pl --list-exported-symbols | \
|
||||
awk -v flavor="$flavor" '
|
||||
{
|
||||
sub(/^0x0*/, "", $1);
|
||||
if (!$1)
|
||||
$1 = "0";
|
||||
printf "ksym(%s:%s) = %s\n", flavor, $2, $1
|
||||
}'
|
||||
|
||||
exit 0
|
||||
|
||||
|
Reference in New Issue
Block a user