06e2329636
The 'GPL-2.0' license identifier has been deprecated since license list version 3.0 [1] and replaced by the 'GPL-2.0-only' tag [2]. [1] https://spdx.org/licenses/GPL-2.0.html [2] https://spdx.org/licenses/GPL-2.0-only.html Mechanical patch running: $ sed -i -e s/GPL-2.0/GPL-2.0-only/ \ $(git grep -l 'SPDX-License-Identifier: GPL-2.0[ $]' \ | egrep -v '^linux-headers|^include/standard-headers') Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
32 lines
781 B
Bash
32 lines
781 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
in="$1"
|
|
out="$2"
|
|
my_abis=`echo "($3)" | tr ',' '|'`
|
|
prefix="$4"
|
|
offset="$5"
|
|
|
|
fileguard=LINUX_USER_ARM_`basename "$out" | sed \
|
|
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
|
|
-e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
|
|
if echo $out | grep -q uapi; then
|
|
fileguard="_UAPI$fileguard"
|
|
fi
|
|
grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
|
|
echo "#ifndef ${fileguard}"
|
|
echo "#define ${fileguard} 1"
|
|
echo ""
|
|
|
|
while read nr abi name entry ; do
|
|
if [ -z "$offset" ]; then
|
|
echo "#define TARGET_NR_${prefix}${name} $nr"
|
|
else
|
|
echo "#define TARGET_NR_${prefix}${name} ($offset + $nr)"
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo "#endif /* ${fileguard} */"
|
|
) > "$out"
|