LIRC installation broken in Edgy with kernels 2.6.19 and greater.

Dave M G martin at autotelic.com
Fri Mar 9 12:51:03 UTC 2007


Ubuntu Users,

Apparently, installing LIRC in Ubuntu Edgy (kernel 2.6.20) won't work, 
because of some changes (which I don't understand).

Installation instructions are here:
http://www.mythtv.org/wiki/index.php/LIRC_on_Ubuntu_Edgy_Eft

And there is a descirption of how to fix the "linux/config.h: No such 
file or directory" error is here:
http://stacktrace.org/

Apparently one needs to create a shell script and run it to patch the 
problem. I've posted the shell script below.

However, I can't figure out where in the process to apply the patch. 
When place the code below into a shell file and try to run it, I get the 
following error:
$ sudo sh patch.sh
tar: /usr/src/lirc-modules.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
grep: *: No such file or directory
sed: no input files
mv: cannot stat `/usr/src/lirc-modules.tar.gz': No such file or directory

Can someone help me to merge the information from both of the above web 
sites to be consistent with each other by telling me how exactly to 
apply the patch?

Thank you for any assistance.

The code for the patch is as follows:
### Patch the lirc-modules.tar.gz file to work with Linux 2.6.19+
### Run this before trying to build with 'module-assistant --text-mode 
--kernel-dir /usr/src/linux-source-`uname -r` build lirc'
if [ "`uname -r|cut -d- -f1|sed 's/\.//g'`" -ge "2619" ]; then
  cd /usr/src
  mkdir patch-lirc-for-2.6.20+
  cd patch-lirc-for-2.6.20+
  tar -zxf /usr/src/lirc-modules.tar.gz
  grep -r "linux/config.h" * | cut -d: -f1 | xargs sed -i 
's-linux/config.h-linux/autoconf.h-g'
  mv -i /usr/src/lirc-modules.tar.gz /usr/src/lirc-modules-unpatched.tar.gz
  tar -czf /usr/src/lirc-modules.tar.gz .
  cd /usr/src
  rm -rf patch-lirc-for-2.6.20+
fi


-- 
Dave M G
Ubuntu 6.10 Edgy Eft
Kernel 2.6.17.7
Pentium D Dual Core Processor
PHP 5, MySQL 5, Apache 2




More information about the ubuntu-users mailing list