0001-Fix-generate-keynames.patch 1.5 KB

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