blob: f3d14354b49fca615c5551c65eb57e98ca82ca32 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001Fix 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
Patrick Williams8e7b46e2023-05-01 14:19:06 -05008Upstream-Status: Inappropriate [Cross-compile specific]
Brad Bishop19323692019-04-05 15:28:33 -04009Signed-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