Summary: | Update lirc ebuild to create and install 2.6 kernel modules | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andy Dalton <andy.dalton> |
Component: | New packages | Assignee: | Heinrich Wendel (RETIRED) <lanius> |
Status: | VERIFIED TEST-REQUEST | ||
Severity: | major | CC: | loial, radek |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Andy Dalton
2004-06-20 21:18:58 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 i'm still trying to figure out how the kernel 2.6 module build eclass works, could need some help here 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. 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 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> 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. 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" just commited lirc-0.7.0_pre7, tested with development-sources-2.6.7 and works fine here, please test it 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 that's no problem, it just means that the patch has no .bz2 or .gz extension Okay, I figured out the config-kernel business and tested using lirc-0.7.0_pre7. Seems to work like a charm. Many thanks. its working fine :) (gentoo-dev-sources-2.6-7) |