Lirc-modules got broke in Linux 2.6.19/2.6.20+
Submitted by ironstorm.
on 2007-02-08 03:10.
This is a continuation of "Soundgraph iMON PAD + VFD LIRC kernel modules the Debian-way"...
...
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
mkdir -p /usr/src/lirc-0.8.1pre2/drivers/lirc_dev/.tmp_versions
rm -f /usr/src/lirc-0.8.1pre2/drivers/lirc_dev/.tmp_versions/*
make -f scripts/Makefile.build obj=/usr/src/lirc-0.8.1pre2/drivers/lirc_dev
gcc -Wp,-MD,/usr/src/lirc-0.8.1pre2/drivers/lirc_dev/.lirc_dev.o.d -nostdinc -isystem ....
/usr/src/lirc-0.8.1pre2/drivers/lirc_dev/lirc_dev.c:35:26: error: linux/config.h: No such file or directory
...
### 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
EDIT (Feb 9): there's also a patch that will likely go into Debian (upstream) which does something similar to the above code, but is version safe for older kernels... that is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400494;msg=5;filename=lirc-config.patch;att=1 [Debian Bug Link] [Ubuntu Bug Link]
Finally when I tried to build my imon module my compile dumped with some crap error relating to Windows MCE IR device modules:
...Since I don't care about MCE support at the moment, the solution for that one was to rerun dpkg-reconfigure and unselect the mceusb/mceusb2 modules and build again:
/usr/src/lirc-0.8.1/drivers/lirc_mceusb2/lirc_mceusb2.c: In function ‘request_packet_async’:
/usr/src/lirc-0.8.1/drivers/lirc_mceusb2/lirc_mceusb2.c:237: warning: passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/usr/src/lirc-0.8.1/drivers/lirc_mceusb2/lirc_mceusb2.c:245: warning: passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/usr/src/lirc-0.8.1/drivers/lirc_mceusb2/lirc_mceusb2.c:266: error: ‘SLAB_ATOMIC’ undeclared (first use in this function)
/usr/src/lirc-0.8.1/drivers/lirc_mceusb2/lirc_mceusb2.c:266: error: (Each undeclared identifier is reported only once
/usr/src/lirc-0.8.1/drivers/lirc_mceusb2/lirc_mceusb2.c:266: error: for each function it appears in.)
...
dpkg-reconfigure lirc-modules-source # ditch building mceusb2 and mceusb modules if they give trouble.
After the rest of the build and install, did a quick restart to confirmed that everything is back up and running (you can follow the older post's restart steps if you'd prefer not to reboot).
@ ironstorm
OMG you are my saviour!! I'd just put together my brand new myth box (ubuntu w./ a-whole-bunch-of-nice-though-expensive-hardware) and paid the extra 50% for the vfd in the silverstone lc20m... felt kindda stupid when it was dead all the time:P So thanx man - love it!