Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 545748 - sys-kernel/gentoo-sources media/rc/rc-main.c fails to load rc-keymaps b/c wrong #ifdef
Summary: sys-kernel/gentoo-sources media/rc/rc-main.c fails to load rc-keymaps b/c wro...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-06 16:24 UTC by Mark Dominik Bürkle
Modified: 2017-02-04 07:25 UTC (History)
0 users

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


Attachments
patch to enable loading of rc-keymap modules in a modularized kernel (drivers_media_rc_rc-main.c.diff,321 bytes, patch)
2015-04-06 16:24 UTC, Mark Dominik Bürkle
Details | Diff
better patch (same source change, renamed to original/ and modified/) (drivers_media_rc_rc-main.c.patch,335 bytes, patch)
2015-04-07 22:19 UTC, Mark Dominik Bürkle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Dominik Bürkle 2015-04-06 16:24:19 UTC
Created attachment 400704 [details, diff]
patch to enable loading of rc-keymap modules in a modularized kernel

after loading of DVB modules with IR-RC support, the code looks for a RC keytable that fits. Loading of the correct module is #ifdef-ed in the code with

#ifdef MODULE

but that is not defined because the code is not a module but a kernel code piece.

#ifdef CONFIG_MODULES

works as intended, compiling the module loading code into the kernel.
See patch appended.
Comment 1 Mark Dominik Bürkle 2015-04-06 16:25:15 UTC
video ~ # emerge --info
Portage 2.2.14 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-4.8.3, glibc-2.20-r2, 3.19.3-gentoo x86_64)
=================================================================
System uname: Linux-3.19.3-gentoo-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-2.2
KiB Mem:     1017540 total,    140888 free
KiB Swap:    4891788 total,   4891788 free
Timestamp of tree: Tue, 31 Mar 2015 06:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r1, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.11
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.6
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.20-r2
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -mno-align-stringops -O2 -falign-functions=64 -falign-loops=64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/conf.d /etc/portage /etc/rsyncd.conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/pam.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=athlon64 -mno-align-stringops -O2 -falign-functions=64 -falign-loops=64 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://lapmdb-hpl ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://vdr-vb.localnet/portage"
USE="X acl acpi alsa amd64 apache2 bash-completion berkdb bindist browserplugin bzip2 cdr cli cracklib crypt curl cxx dri dvd dvdr dvdread gdbm gnome gtk gtk2 iconv imap ipv6 libav mmap mmx mmxext modules mozilla mp3 multilib ncurses nls nptl nptl-only oggvorbis openal openmp pam pcre readline session sse sse2 ssl tcpd theora unicode xml xml2 xmlrpc xv zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en fr" LIRC_DEVICES="devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

video ~ #
Comment 2 Mark Dominik Bürkle 2015-04-06 16:32:20 UTC
parts of dmesg from a patched system, look for "Registered IR keymap xxx":

[   11.356976] tveeprom 0-0050: has no radio, has IR receiver, has no IR transmitter
[   11.356978] cx88[0]: hauppauge eeprom: model=69100
[   11.363766] ehci-pci: EHCI PCI platform driver
[   11.818337] [drm] Initialized drm 1.1.0 20060810
[   11.890109] Registered IR keymap rc-hauppauge
[   11.890275] input: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:0c.1/rc/rc0/input6
[   11.890354] rc0: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:0c.1/rc/rc0
[   11.953178] cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
...
[   12.144756] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 0
[   12.144762] IR LIRC bridge handler initialized
[   12.146586] IR XMP protocol handler initialized
[   12.182574] uhci_hcd: USB Universal Host Controller Interface driver
[   12.610219] Registered IR keymap rc-tevii-nec
[   12.610363] input: cx88 IR (TeVii S464 DVB-S/S2) as /devices/pci0000:00/0000:00:0d.2/rc/rc1/input8
[   12.610437] rc1: cx88 IR (TeVii S464 DVB-S/S2) as /devices/pci0000:00/0000:00:0d.2/rc/rc1
[   12.613312] input: MCE IR Keyboard/Mouse (cx88xx) as /devices/virtual/input/input9
[   12.614294] rc rc1: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 1
[   12.614304] cx88[1]/2: cx2388x 8802 Driver Manager


parts of dmesg from an unpatched system, look for "IR keymap xxx not found":

[   12.737005] tveeprom 0-0050: decoder processor is CX882 (idx 25)
[   12.737008] tveeprom 0-0050: has no radio, has IR receiver, has no IR transmitter
[   12.737010] cx88[0]: hauppauge eeprom: model=69100
[   12.742042] IR keymap rc-hauppauge not found
[   12.742048] Registered IR keymap rc-empty
[   12.742167] input: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:0c.2/rc/rc0/input6
[   12.742239] rc0: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:0c.2/rc/rc0
[   12.937421] IR NEC protocol handler initialized
[   12.970093] cx88[0]/2: cx2388x 8802 Driver Manager
...
[   13.420282] lirc_dev: IR Remote Control driver registered, major 249 
[   13.432163] IR Sharp protocol handler initialized
[   13.433061] input: MCE IR Keyboard/Mouse (cx88xx) as /devices/virtual/input/input7
[   13.433185] IR MCE Keyboard/mouse protocol handler initialized
[   13.442549] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 0
[   13.442556] IR LIRC bridge handler initialized
[   13.483252] IR keymap rc-tevii-nec not found
[   13.483258] Registered IR keymap rc-empty
[   13.483382] input: cx88 IR (TeVii S464 DVB-S/S2) as /devices/pci0000:00/0000:00:0d.2/rc/rc1/input8
[   13.483465] rc1: cx88 IR (TeVii S464 DVB-S/S2) as /devices/pci0000:00/0000:00:0d.2/rc/rc1
[   13.486340] input: MCE IR Keyboard/Mouse (cx88xx) as /devices/virtual/input/input9
[   13.486508] rc rc1: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 1
[   13.486512] cx88[1]/2: cx2388x 8802 Driver Manager
Comment 3 Mark Dominik Bürkle 2015-04-06 16:34:46 UTC
this is in gentoo-sources-3.19.3, but the error is in the kernel for a much longer time (as R/Cs did not work here for more than one year)...
Comment 4 Mark Dominik Bürkle 2015-04-07 22:19:34 UTC
Created attachment 400788 [details, diff]
better patch (same source change, renamed to original/ and modified/)

patch file as added to /etc/portage/patches/sys-kernel/gentoo-sources/
Comment 5 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-02-04 07:25:34 UTC
is this still a problem with a more recent kernel ? 
3.19 is not in the longterm maintanance and no more in the Gentoo repository

please open a new bug if this is still a problem