Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54592 - Update lirc ebuild to create and install 2.6 kernel modules
Summary: Update lirc ebuild to create and install 2.6 kernel modules
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Heinrich Wendel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-20 21:18 UTC by Andy Dalton
Modified: 2004-08-16 10:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Dalton 2004-06-20 21:18:58 UTC
The lirc patch for the 2.6.x kernel has been removed from gentoo-dev-sources as of gentoo-dev-source-2.6.7 per a comment associated with bug 54518.

I was able to build the necessary kernel modules found in lirc-0.7.0pre6.  Please create a lirc-0.7.0_pre6 and/or update the current ebuild to build and install the kernel modules for 2.6.x kernels.

Reproducible: Always
Steps to Reproduce:
# LIRC_OPTS="--with-driver=hauppauge" emerge lirc



Actual Results:  
No modules are found in /lib/modules/$(uname -r)/misc
# ls /lib/modules/$(uname -r)/misc/lirc*
ls: /lib/modules/2.6.7-gentoo/misc/lirc*: No such file or directory

Expected Results:  
'emerge lirc' should optionally install the necessary kernel modules using the
LIRC_OPTS environment variable to specify which card to build support for.

# ls /lib/modules/$(uname -r)/misc/lirc*
/lib/modules/2.6.7-gentoo/misc/lirc_dev.ko
/lib/modules/2.6.7-gentoo/misc/lirc_i2c.ko

# emerge info
Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo)
=================================================================
System uname: 2.6.7-gentoo i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -Os -fforce-addr -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-tbird -Os -fforce-addr -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa apm arts avi berkdb cdr cjk crypt cscope cups curl dga encode
esd ethereal evo f77 fbcon foomaticdb gdbm gif gpm gtk gtk2 imap imlib innodb
java jpeg kde lcms libg++ libwww mad mbox memlimit mikmod mmx motif mpeg mysql
ncurses nls oggvorbis opengl oss pam pdflib perl plotutils png python qt
quicktime readline ruby samba sasl scanner sdl slang snmp spell sse ssl svga
tcltk tcpd tetex threads truetype usb videos wmf x86 xml xml2 xmms xv zlib"
Comment 1 Rutger Hendriks 2004-07-11 00:22:06 UTC
I'd like to second this, no modules are installed, or even compiled, using ebuild to compile lirc and then manually compiling lirc_dev and lirc_i2c and copying those to /lib/modules works
Comment 2 Heinrich Wendel (RETIRED) gentoo-dev 2004-07-11 01:44:47 UTC
i'm still trying to figure out how the kernel 2.6 module build eclass works, could need some help here
Comment 3 Daniel Savard 2004-07-15 12:24:56 UTC
Since I am struggling with the same problem. I may provide you with some infos. After reading the Gentoo forum and the Lirc mailing list. It seems kernels 2.6 require a patch and the module should be build from the kernel source and not from the lirc ebuild. So, that's the reason the .ebuild is having conditional code to prevent the emerge to build the drivers. So, in practice, you shouldn't have to build the drivers from the lirc ebuild.
 
However, the latest LIRC patch available for the kernel is for kernel 2.6.3. So, there is still no patch for latest 2.6 kernels. Conclusion: It is left to the user to try to merge the 2.6.3 patch into his kernel tree.
Comment 4 Rutger Hendriks 2004-07-15 12:54:32 UTC
I'm not sure about the last comment, since things seem to work if I use the ebuild-command to unpack and compile the lirc-ebuild and then go to the /var/tmp/portage/lirc-xxxx/lirc-xxxx/work directory (or something similar, this is just what I remember) and run make in the lirc-i2c and lirc-dev subdirectories and copy the 2 modules to the /lib/modules/xxxx directory

I must admit I didn't look at the lirc mailing list, but still, it worked
Comment 5 Daniel Savard 2004-07-16 14:18:25 UTC
I may work, but it doesn't imply it is the way to do it. But, I must agree there is so many contradictory paths to make LIRC working it is almost impossible to find out what should be done and what should not be done while working with the 2.6 kernels serie.

The patch is available here: 
<a href="http://flameeyes.web.ctonet.it/index.html#lirc">http://flameeyes.web.ctonet.it/index.html#lirc</a>

And the LIRC FAQ is talking about partial support in 2.6:
<a href="http://www.lirc.org/faq.html">http://www.lirc.org/faq.html</a>

And here someone suggest to use the module compiled with the TV Card if you want to use its IR port:
<a href="http://forums.gentoo.org/viewtopic.php?t=180725">Hauppauge bt878 & LIRC & kernel 2.6 = not working!</a>
Comment 6 Mathieu Okuyama 2004-07-17 15:38:09 UTC
I successfully did the same that described in #4.

I have manually built lirc drivers from /usr/portage/distfiles/lirc-0.7.0pre6.tar.bz2 for kernel 2.6.7 after having emerge lirc.

In the configure options of lirc package, driver can be specified (--with-driver=), and it can be setup with LIRC_OPTS="--with-driver=[driver-name]" for emerge. 

According to my tests and IIRC (1-2-3 months ago?), the "--with driver=" option is needed not only for specifying driver to be built but to build lirc executables according to driver too.

I have successfully tested with a pctv and an ati wonder remote.
--with-driver=pctv --with-tty=/dev/ttyS0 (ok, here no driver are needed)
--with-driver=atiusb (lirc_dev and lirc_atiusb)

Another thing, without --with driver= option, configure will display an interface to let you choose your driver. I think drivers provided in the lirc package are ok, and in my opinion, lirc executables and lirc drivers need to come from the same package.
Comment 7 Rutger Hendriks 2004-07-31 01:36:21 UTC
I just noticed 0.7.0_pre7 is out and was feeling lucky, so I copied over the pre6 ebuild and noticed some kernel-2.6 specific stuff.
I removed it.
It installed like a charm.
Oh, it also works ;-)

Here's a diff, but this is probably not how you'd want to have it...probably best to remove the kernel-mod_is_2_6_kernel conditional, maybe...

# diff /usr/portage/app-misc/lirc/lirc-0.7.0_pre6.ebuild lirc-0.7.0_pre7.ebuild
96,98c96
<               (cd daemons; emake) || die
<               (cd tools; emake) || die
<               (cd doc; emake) || die
---
>               emake || die
122,124c120
<               (cd daemons; make DESTDIR=${D} install) || die
<               (cd tools; make DESTDIR=${D} install) || die
<               (cd doc; make DESTDIR=${D} install) || die
---
>               make DESTDIR=${D} install || die


# emerge info
Portage 2.0.50-r9 (gcc34-amd64-2004.1, gcc-3.4.1, glibc-2.3.4.20040619-r0, 2.6.7-gentoo-r11)
=================================================================
System uname: 2.6.7-gentoo-r11 x86_64 4
Gentoo Base System version 1.5.1
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /opt/gentoo-rsync /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /opt/gentoo-rsync/portage /etc/env.d"
CXXFLAGS="-O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.tiscali.nl/pub/mirror/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="S3TC X aac aalib acpi acpi4linux alsa amd64 apm arts asterisk audiofile avi berkdb cdparanoia cdr chroot crypt cups dga divx4linux dv dvd dvdr dvdread encode f77 faac faad fbcon fbdev ffmpeg fftw flac flash foomaticdb ftp gcj gd gdbm ggi gif gpm gstreamer gtk2 icq ieee1394 imagemagick imap imlib imlib2 irmc jabber java javascript joystick jp2 jpeg kde lcd lcms ldap libg++ libwww linguas_en_GB linguas_nl lirc live lzo lzw lzw-tiff mad mbox mikmod mng motif mozaccess mozcalendar mozdomi mozilla mozp3p mozsvg mozxmlterm mpeg mpeg4 mpi mplayer msn mysql mythtv nas ncurses net nls nptl oav objc offensive oggvorbis opengl opie oss pam pda pdflib perl pic plotutils png pthreads python qt quicktime readline rtc samba sasl sdl slang slp speex spell ssl svg tcltk tcpd theora tiff transcode truetype usb v4l v4l2 videos wmf xml2 xmms xosd xprint xrandr xv xvid zlib zvbi"
Comment 8 Heinrich Wendel (RETIRED) gentoo-dev 2004-08-01 15:08:24 UTC
just commited lirc-0.7.0_pre7, tested with development-sources-2.6.7 and works fine here, please test it
Comment 9 Andy Dalton 2004-08-05 17:55:47 UTC
Hum, when I emerge I get the following output:

>>> Unpacking 01-add-2.6-devfs-and-sysfs-to-lirc_dev.patch to /var/tmp/portage/lirc-0.7.0_pre7/work
unpack 01-add-2.6-devfs-and-sysfs-to-lirc_dev.patch: file format not recognized. Ignoring.
 * Applying 01-add-2.6-devfs-and-sysfs-to-lirc_dev.patch...               [ ok ]
>>> Source unpacked.


Is that "file format notrecognized.  Ignoring" message a problem?



Also, I get this message after the configure:

 * Due to the 2.6 kernel build system, external module compilation
 * with a normal setup requires write access to //usr/src/linux
 * There are several ways to fix/prevent this.
 * Users can willingly let portage make this writable by doing
 * # config-kernel --allow-writable yes
 * However, this is considered a security risk!
 *
 * The prefered method is to enable Gentoo's new 'koutput' method
 * for kernel modules. See the doc
 * http://www.gentoo.org/doc/en/2.6-koutput-user.xml
 * To enable this, you'll need to run
 * # config-kernel --output-dir /var/tmp/kernel-output
 * and then install a new kernel

However, I emerge config-kernel, ran 'config-kernel --output-dir /var/tmp/kernel-output' did an 'env-update' and 'source /etc/profile', and re-emerge gentoo-dev-sources.  I copied my existing .config to /var/tmp/kernel-output and did a 'make clean' and 'make mrproper.'  Then I did a make menuconfig and saved the .config, but it didn't save it to the specified output directory.  Can you give me a hint on how to get this working?

Thanks
Comment 10 Heinrich Wendel (RETIRED) gentoo-dev 2004-08-06 01:53:59 UTC
that's no problem, it just means that the patch has no .bz2 or .gz extension
Comment 11 Andy Dalton 2004-08-08 00:47:22 UTC
Okay, I figured out the config-kernel business and tested using lirc-0.7.0_pre7.  Seems to work like a charm.  Many thanks.
Comment 12 Mathieu Okuyama 2004-08-16 10:07:35 UTC
its working fine :)
(gentoo-dev-sources-2.6-7)