1Fix generate-keynames.sh script for cross-compilation
2
3generate-keynames.sh reads /usr/include/linux to find the keyname
4symbols. However, when cross-compiling, the include path points
5somewhere else. Allow the user to pass CROSS_ROOT to point to the
6root of the cross-compilation environment.
7
8Upstream-Status: Inappropriate [Cross-compile specific]
9Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
10---
11diff -rup dvb-apps-83c746462ccb.orig/util/av7110_loadkeys/generate-keynames.sh dvb-apps-83c746462ccb/util/av7110_loadkeys/generate-keynames.sh
12--- dvb-apps-83c746462ccb.orig/util/av7110_loadkeys/generate-keynames.sh	2012-12-06 10:38:07.000000000 +0100
13+++ dvb-apps-83c746462ccb/util/av7110_loadkeys/generate-keynames.sh	2013-08-29 21:47:09.717991439 +0200
14@@ -18,7 +18,7 @@ echo "};" >> $1
15 echo >> $1
16 echo >> $1
17 echo "static struct input_key_name key_name [] = {" >> $1
18-for x in $(cat /usr/include/linux/input.h input_fake.h | \
19+for x in $(cat ${CROSS_ROOT}/usr/include/linux/input.h input_fake.h | \
20            egrep "#define[ \t]+KEY_" | grep -v KEY_MAX | \
21            cut -f 1 | cut -f 2 -d " " | sort -u) ; do
22     echo "        { \"$(echo $x | cut -b 5-)\", $x }," >> $1
23@@ -26,7 +26,7 @@ done
24 echo "};" >> $1
25 echo >> $1
26 echo "static struct input_key_name btn_name [] = {" >> $1
27-for x in $(cat /usr/include/linux/input.h input_fake.h | \
28+for x in $(cat ${CROSS_ROOT}/usr/include/linux/input.h input_fake.h | \
29            egrep "#define[ \t]+BTN_" | \
30            cut -f 1 | cut -f 2 -d " " | sort -u) ; do
31      echo "        { \"$(echo $x | cut -b 5-)\", $x }," >> $1
32