Kernel 2.6.17 and lirc_gpio driver

No Comments

I use an old bt878-based TV capture card, whose remote control needs the lirc_gpio driver in order to work. I remember that this specific LIRC driver could not be compiled after upgrading to kernel 2.6.17. I investigated this problem a couple of days ago and it seems that the cause of this issue is the fact that the location of the bt848/bt878 related kernel headers has changed.

The needed headers, bttv.h and bttvp.h, now exist in the drivers/media/video/bt8xx/ directory. Their old location was drivers/media/video/. So, compiling lirc_gpio requires the following small patch:

--- drivers/lirc_gpio/lirc_gpio.c.original      2006-01-01 15:43:46.000000000 +0200
+++ drivers/lirc_gpio/lirc_gpio.c       2006-09-08 20:03:34.000000000 +0300
@@ -49,8 +49,8 @@
 #include "../drivers/char/bttv.h"
 #include "../drivers/char/bttvp.h"
-#include "../drivers/media/video/bttv.h"
-#include "../drivers/media/video/bttvp.h"
+#include "../drivers/media/video/bt8xx/bttv.h"
+#include "../drivers/media/video/bt8xx/bttvp.h"


While lirc_gpio should now be compiled without problems, there is one more issue, which seems to be a kernel-source bug. The bttvp.h “includes” another header (btcx-risc.h), which should exist in the same directory. But, this file actually exists in the parent directory (drivers/media/video/). So, until this kernel source issue is resolved, the only way to build lirc_gpio succesfully is to:

  1. patch LIRC sources with the above patch,
  2. copy the btcx-risc.h kernel header from location: drivers/media/video/ to location: drivers/media/video/bt8xx/ within the kernel source tree.

I have already filed a bug about this in the Fedora Bugzilla. If there is anything I have missed, drop me a line.

Further Reading

Kernel 2.6.17 and lirc_gpio driver by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2006 - Some Rights Reserved

George Notaras avatar

About George Notaras

George Notaras is the editor of the G-Loaded Journal, a technical blog about Free and Open-Source Software. George, among other things, is an enthusiast self-taught GNU/Linux system administrator. He has created this web site to share the IT knowledge and experience he has gained over the years with other people. George primarily uses CentOS and Fedora. He has also developed some open-source software projects in his spare time.