ASRock ION 330HT nettop running Sabayon Linux [Solved]

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

joost
Sagely Hen
Posts: 2747
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands
Contact:

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by joost » Thu Mar 25, 2010 18:48

Perhaps enable rc logging?

/etc/rc.conf

Code: Select all

# rc_logger launches a logging daemon to log the entire rc process to
# /var/log/rc.log
# NOTE: Linux systems require the devfs service to be started before
# logging can take place and as such cannot log the sysinit runlevel.
rc_logger="YES"

Another thingy might be to tail -f /var/log/messages

(Not knowing anything about Lirc myself, it might just give you an idea how to debug a problem)
My blog | Mastodon | Please support Sabayon: Become a Patron

sjieke
Technological Hen
Posts: 321
Joined: Thu Mar 01, 2007 10:46
Location: Maldegem, Belgium

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by sjieke » Thu Mar 25, 2010 19:48

Fitzcarraldo wrote: But I thought that the LIRC daemon could only be started if a driver module is installed? Is my understanding incorrect?
I don't have any experience with lirc, I just assumed you could start the daemon without a driver.
Testing on my system confirms it:

Code: Select all

Crashbox sjieke # /etc/init.d/lircd start
* Starting lircd...                                                                                                                                        [ ok ]
Crashbox sjieke #
No lirc related modules loaded:

Code: Select all

Crashbox sjieke # lsmod |grep lirc
Crashbox sjieke #
And my installed lirc package (I still use kernel 2.6.31)

Code: Select all

Crashbox sjieke # equo query installed lirc
>>  @@ Searching...
>>      @@ Package: app-misc/lirc-0.8.6-r2#2.6.31-sabayon branch: 5, [__client__]
>>        Installed:            version: 0.8.6-r2 ~ tag: 2.6.31-sabayon ~ revision: 1
>>        Slot:                 2.6.31-sabayon
>>        Homepage:             http://www.lirc.org/
>>        Description:          decode and send infra-red signals
>>                              of many commonly used remote controls
>>        License:              GPL-2
>>  Keyword:    lirc
>>  Found:      1 entries
Last edited by sjieke on Thu Mar 25, 2010 20:36, edited 1 time in total.

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by Fitzcarraldo » Thu Mar 25, 2010 20:06

Thanks, both of you, for your useful posts.

sjieke, checking on your PC was very useful to me, because it adds weight to my suspicion about the missing autoconf.patch in the lirc-0.8.6-r2 package (Gentoo Bugzilla Bug Report No. 301321): lirc would work with kernel 2.6.31 but not kernel 2.6.33. I'm going to patch the lirc-0.8.6-r2 tarball and rebuild with Portage as soon as possible.

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by Fitzcarraldo » Fri Mar 26, 2010 1:07

I had to apply the lirc-LP529514.patch and the autoconf.patch (see a previous post) to the lirc-0.8.6.tar.bz2 downloaded by the ebuild, because the ebuild did not fix these problems. Without these two patches LIRC cannot compile with the 2.6.33 kernel. Even with these patches applied lirc didn't compile when using Portage:

Code: Select all

 [32;01m*[0m CPV:  app-misc/lirc-0.8.6-r2
 [32;01m*[0m REPO: gentoo
 [32;01m*[0m USE:  X elibc_glibc kernel_linux lirc_devices_all userland_GNU x86
 [33;01m*[0m QA Notice: USE Flag 'lirc_devices_mceusb2' not in IUSE for app-misc/lirc-0.8.6-r2
 [33;01m*[0m If your LIRC device requires modules, you'll need MODULE_UNLOAD
 [33;01m*[0m support in your kernel.
 [32;01m*[0m Determining the location of the kernel source code
 [32;01m*[0m Found kernel source directory:
 [32;01m*[0m     /usr/src/linux
 [32;01m*[0m Found kernel object directory:
 [32;01m*[0m     /lib/modules/2.6.33-sabayon/build
 [32;01m*[0m Found sources for kernel version:
 [32;01m*[0m     2.6.33-sabayon
 [32;01m*[0m Compiling support for a lot of devices
 [32;01m*[0m 
 [32;01m*[0m lirc-configure-opts:  --with-driver=all
 [32;01m*[0m Setting default lirc-device to /dev/lirc0
>>> Unpacking source...
>>> Unpacking lirc-0.8.6.tar.bz2 to /var/tmp/portage/app-misc/lirc-0.8.6-r2/work
 [32;01m*[0m Applying lirc-0.8.4-portaudio_check.patch ...
[A[174C  [34;01m[ [32;01mok[34;01m ][0m
 [33;01m*[0m Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+
 [32;01m*[0m Running eautoreconf in '/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6' ...
 [32;01m*[0m Running aclocal ...
[A[174C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Running libtoolize --copy --force --install --automake ...
[A[174C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Running aclocal ...
[A[174C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Running autoconf ...
[A[174C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Running autoheader ...
[A[174C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Running automake --add-missing --copy ...
[A[174C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Running elibtoolize in: lirc-0.8.6
 [32;01m*[0m   Applying portage-2.2.patch ...
 [32;01m*[0m   Applying sed-1.5.6.patch ...
 [32;01m*[0m   Applying as-needed-2.2.6.patch ...
>>> Source unpacked in /var/tmp/portage/app-misc/lirc-0.8.6-r2/work
>>> Compiling source in /var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6 ...
ln: creating symbolic link `Module.symvers': File exists
 [32;01m*[0m Preparing lirc module
 * econf: updating lirc-0.8.6/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating lirc-0.8.6/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib --localstatedir=/var --with-syslog=LOG_DAEMON --enable-sandboxed --with-kerneldir=/usr/src/linux --with-moduledir=/lib/modules/2.6.33-sabayon/misc --disable-debug --with-x --with-driver=all
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-pc-linux-gnu-gcc accepts -g... yes
checking for i686-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i686-pc-linux-gnu-gcc... gcc3
checking whether i686-pc-linux-gnu-gcc and cc understand -c and -o together... yes
checking whether make sets $(MAKE)... (cached) yes
checking for mknod... /bin/mknod
checking for mkfifo... /usr/bin/mkfifo
checking for depmod... /sbin/depmod
checking for libusb-config... /usr/bin/libusb-config
checking whether ln -s works... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by i686-pc-linux-gnu-gcc... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r
checking for i686-pc-linux-gnu-objdump... i686-pc-linux-gnu-objdump
checking how to recognize dependent libraries... pass_all
checking for i686-pc-linux-gnu-ar... i686-pc-linux-gnu-ar
checking for i686-pc-linux-gnu-strip... i686-pc-linux-gnu-strip
checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib
checking command to parse /usr/bin/nm -B output from i686-pc-linux-gnu-gcc object... ok
checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if i686-pc-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for i686-pc-linux-gnu-gcc option to produce PIC... -fPIC -DPIC
checking if i686-pc-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes
checking if i686-pc-linux-gnu-gcc static flag -static works... yes
checking if i686-pc-linux-gnu-gcc supports -c -o file.o... yes
checking if i686-pc-linux-gnu-gcc supports -c -o file.o... (cached) yes
checking whether the i686-pc-linux-gnu-gcc linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.6/site-packages
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for gethostname... yes
checking for gettimeofday... yes
checking for mkfifo... yes
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strerror... yes
checking for strtoul... yes
checking for snprintf... yes
checking for strsep... yes
checking for vsyslog... yes
checking for forkpty... no
checking for forkpty in -lutil... yes
checking vga.h usability... no
checking vga.h presence... no
checking for vga.h... no
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for getopt_long... yes
checking for mktemp... yes
checking for Linux kernel sources... /usr/src/linux/
checking for which drivers can be installed on this system... 
checking for caraca_init in -lcaraca_client... no
checking ftdi.h usability... yes
checking ftdi.h presence... yes
checking for ftdi.h... yes
checking iguanaIR.h usability... no
checking iguanaIR.h presence... no
checking for iguanaIR.h... no
checking for ir_strerror in -lirman... no
checking for ir_strerror in -lirman_sw... no
checking alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes
checking for snd_pcm_open in -lasound... yes
checking for ALSA SB RC hwdep support... yes
checking scsi/sg.h usability... yes
checking scsi/sg.h presence... yes
checking for scsi/sg.h... yes
checking linux/input.h usability... yes
checking linux/input.h presence... yes
checking for linux/input.h... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking for linux/hiddev.h... yes
checking for HIDDEV_FLAG_UREF support... yes
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking linux/i2c-dev.h usability... yes
checking linux/i2c-dev.h presence... yes
checking for linux/i2c-dev.h... yes
checking for daemon... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating drivers/Makefile
config.status: creating drivers/lirc_atiusb/Makefile
config.status: creating drivers/lirc_bt829/Makefile
config.status: creating drivers/lirc_ene0100/Makefile
config.status: creating drivers/lirc_dev/Makefile
config.status: creating drivers/lirc_gpio/Makefile
config.status: creating drivers/lirc_i2c/Makefile
config.status: creating drivers/lirc_igorplugusb/Makefile
config.status: creating drivers/lirc_ttusbir/Makefile
config.status: creating drivers/lirc_imon/Makefile
config.status: creating drivers/lirc_it87/Makefile
config.status: creating drivers/lirc_ite8709/Makefile
config.status: creating drivers/lirc_mceusb/Makefile
config.status: creating drivers/lirc_parallel/Makefile
config.status: creating drivers/lirc_sasem/Makefile
config.status: creating drivers/lirc_serial/Makefile
config.status: creating drivers/lirc_sir/Makefile
config.status: creating drivers/lirc_streamzap/Makefile
config.status: creating drivers/lirc_wpc8769l/Makefile
config.status: creating daemons/Makefile
config.status: creating tools/Makefile
config.status: creating doc/Makefile
config.status: creating doc/man/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

All kernel modules will be built.

Now enter 'make' and 'make install' to compile and install the package.

make -j2 -s -j1 HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= all 
Making all in drivers
Making all in lirc_dev
cp: cannot stat `./../lirc_dev/Module*.symvers': No such file or directory
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:35:28: error: linux/autoconf.h: No such file or directory
In file included from /var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:72:
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h: In function ‘lirc_buffer_init’:
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h:88: warning: passing argument 1 of ‘kfifo_alloc’ makes pointer from integer without a cast
include/linux/kfifo.h:109: note: expected ‘struct kfifo *’ but argument is of type ‘unsigned int’
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h:88: warning: passing argument 3 of ‘kfifo_alloc’ makes integer from pointer without a cast
include/linux/kfifo.h:109: note: expected ‘gfp_t’ but argument is of type ‘struct spinlock_t *’
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h:88: warning: assignment makes pointer from integer without a cast
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h: In function ‘lirc_buffer_read’:
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h:185: error: implicit declaration of function ‘kfifo_get’
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h: In function ‘lirc_buffer_write’:
/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.h:206: error: implicit declaration of function ‘kfifo_put’
make[5]: *** [/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev/lirc_dev.o] Error 1
make[4]: *** [_module_/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6/drivers/lirc_dev] Error 2
make[3]: *** [lirc_dev.o] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
 [31;01m*[0m ERROR: app-misc/lirc-0.8.6-r2 failed:
 [31;01m*[0m   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=   all
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m     ebuild.sh, line   48:  Called src_compile
 [31;01m*[0m   environment, line 4614:  Called linux-mod_src_compile
 [31;01m*[0m   environment, line 3607:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" 						CROSS_COMPILE=${CHOST}- 						LDFLAGS=\"$(get_abi_LDFLAGS)\" 						${BUILD_FIXES} 						${BUILD_PARAMS} 						${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of 'emerge --info =app-misc/lirc-0.8.6-r2',
 [31;01m*[0m the complete build log and the output of 'emerge -pqv =app-misc/lirc-0.8.6-r2'.
 [31;01m*[0m The complete build log is located at '/var/lib/entropy/logs/app-misc:lirc-0.8.6-r2:20100325-180227.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/app-misc/lirc-0.8.6-r2/temp/environment'.
 [31;01m*[0m S: '/var/tmp/portage/app-misc/lirc-0.8.6-r2/work/lirc-0.8.6'
I think the reason it will not compile is because of the following bug in Portage: Gentoo Bugzilla Bug Report No. 310193 - app-misc/lirc-0.8.6-r2 does not respect LDFLAGS. Yes, yet another bug in LIRC (or Portage's build mechanism for it).


After seeing sjieke's output, I reverted to the 2.6.31-sabayon kernel to see if the daemon would load:

Code: Select all

# uname -r
2.6.31-sabayon
# /etc/init.d/lircd start
* Caching service dependencies...                                                                                                                                               [ ok ]
* Starting lircd...                                                                                                                                                             [ !! ]
* ERROR: lircd failed to start
The same problem as under the 2.6.33 kernel. Darn it.


I notice that the slot for lirc-0.8.6-r2 is "2.6.31-sabayon" in sjieke's case, but in my case (irrespective of whether I install lirc-0.8.6-r2 via Entropy under the 2.6.31-sabayon kernel or the 2.6.33-sabayon kernel) is "0" as shown below:

Code: Select all

# equo query installed lirc
>>  @@ Searching...
>>      @@ Package: app-misc/lirc-0.8.6-r2 branch: 5, [__system__] 
>>        Installed:            version: 0.8.6-r2 ~ tag: NoTag ~ revision: 0
>>        Slot:                 0
>>        Homepage:             http://www.lirc.org/ 
>>        Description:          decode and send infra-red signals 
>>                              of many commonly used remote controls 
>>        License:              GPL-2
>>  Keyword:    lirc
>>  Found:      1 entries
Does this matter?


Below is the console output when I install lirc-0.8.6-r2 using Entropy. Notice that the package appears to have been built for the Entropy repository with LIRC_DEVICES="" (i.e. no devices/drivers included).

Code: Select all

# equo install lirc
>>  @@ Calculating dependencies ...
>>  @@ Packages needing to be installed/updated/downgraded: 1
>>  @@ Packages needing to be removed: 0
>>  @@ Download size: 0b
>>  @@ Freed disk space: 0.0b
>>  @@ You need at least: 504.3kB of free space
>>  :: (1/1) >>> app-misc/lirc-0.8.6-r2
>>    ## Package checksum matches: app-misc:lirc-0.8.6-r2~0.tbz2
>>  ++ (1/1) >>> app-misc/lirc-0.8.6-r2
>>    ## Unpacking package: app-misc:lirc-0.8.6-r2~0.tbz2
>>    ## SPM: pre-install phase
 * CPV:  app-misc/lirc-0.8.6-r2
 * REPO: 
 * USE:  X elibc_glibc kernel_linux userland_GNU x86
 * QA Notice: USE Flag 'lirc_devices_mceusb2' not in IUSE for app-misc/lirc-0.8.6-r2
 * If your LIRC device requires modules, you'll need MODULE_UNLOAD
 * support in your kernel.
 * 
 * Compiling only the lirc-applications, but no drivers.
 * Enable drivers with LIRC_DEVICES if you need them.
 * 
 * lirc-configure-opts: --with-driver=none
 * Setting default lirc-device to /dev/lirc0
>>    ## SPM: post-remove phase
>>    ## Installing package: app-misc/lirc-0.8.6-r2
>>    ## [decode and send infra-red signals of many commonly used remote controls]
>>    ## Updating database: app-misc/lirc-0.8.6-r2
>>    ## Cleaning previously installed information...
>>    ## SPM: post-install phase
 * Moved /etc/lircd.conf to /etc/lirc/lircd.conf
 * 
 * The lirc_gpio driver will not work with Kernels 2.6.22+
 * You need to switch over to /dev/input/event? if you need gpio
 * This device can than then be used via lirc's dev/input driver.
 * 
 * The new default location for lircd.conf is inside of
 * /etc/lirc/ directory
>>> Regenerating /etc/ld.so.cache...
>>    ## Cleaning: app-misc/lirc-0.8.6-r2
>>  @@ Installation complete.
>>  @@ Configuration files scan complete.
# 
So, actually, even if an Entropy user is able to run the daemon, (s)he would presumably not be able to use a remote because no drivers/modules were compiled. An Entropy user would presumably have to edit /etc/make.conf to add his/her device to the LIRC_DEVICES="" entry in make.conf, and then rebuild lirc-0.8.6-r2 using Portage. That would then build the required module/driver.


Notice also that the LIRC developers have changed the locations of the various configuration files for the daemon from the previous version of LIRC. The following is a quote from the LIRC Web site (http://www.lirc.org/html/install.html#updating085):
Updating from lirc-0.8.5

The lircd socket was moved from /dev/lircd to /var/run/lirc/lircd to conform to the Filesystem Hierarchy Standard. The default pid file location was moved from /var/run/lircd.pid to /var/run/lirc/lircd.pid.

The default location of lircd, lircmd and lircrcd config files was moved to /etc/lirc/lircd.conf, /etc/lirc/lircmd.conf and /etc/lirc/lircrc. If the config files are not found in that location, they are still searched at the old location in /etc/.
Confusing, or what?! :roll:

Anyway, none of the above explains why I cannot run the daemon. :x

You need to be a rocket scientist to understand and use LIRC. Furthermore LIRC, and/or the Gentoo ebuild for it, seem to have more bugs than an Indiana Jones movie.

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by Fitzcarraldo » Fri Mar 26, 2010 4:23

Another question:

Below is an excerpt from the Ubuntu Makefile for the module lirc_wb677.ko:

Code: Select all

obj-m += lirc_wb677.o

lirc_wb677-objs := lirc_wb677_main.o lirc_wb677_mouse_kbd.o
This is because the driver developer has split the source code into two separate files (lirc_wb677_main.c and lirc_wb677_mouse_kbd.c) for a single module.

In contrast, the module lirc_wpc8769l.ko only has one C source code file:

Code: Select all

# ls drivers/lirc_wpc8769l/
lirc_wpc8769l.c  lirc_wpc8769l.h  Makefile.am
and the GNU automake Makefile.am for the module lirc_wpc8769l.ko looks like this:

Code: Select all

## $Id: Makefile.am,v 1.1 2009/01/03 17:30:35 lirc Exp $

## Process this file with automake to produce Makefile.in

## this is so that Automake includes the C compiling definitions, and
## includes the source files in the distribution.
EXTRA_PROGRAMS = automake_dummy
automake_dummy_SOURCES = lirc_wpc8769l.c lirc_wpc8769l.h

## there is no *just* object file support in automake.  This is close enough
module_DATA = lirc_wpc8769l.o

include ../Makefile.common
The module lirc_wb677.ko has several C source code files:

Code: Select all

# ls drivers/lirc_wb677/
lirc_wb677_main.c      lirc_wb677_mouse_kbd.c   lirc_wb677_common_extern.h    lirc_wb677_mouse_kbd.h lirc_wb677.h             wb83677hg_ir.h
so what should the GNU automake Makefile.am for the module lirc_wb677.ko look like?

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by Fitzcarraldo » Fri Mar 26, 2010 18:31

Apart from the questions in my previous two posts -- which are still valid -- I had a look on my laptop that only has Portage installed (2.6.32 kernel and lirc-0.8.6-r2). Lo and behold, the lircd daemon runs:

Code: Select all

$ su
Password:             
# /etc/init.d/lircd start
* Starting lircd...                                                                                                                                                                                            [ ok ]
# ls -la /var/run/lirc
total 12                              
drwxr-xr-x  2 root root 4096 2010-03-26 15:08 .
drwxr-xr-x 30 root root 4096 2010-03-26 15:07 ..
srw-rw-rw-  1 root root    0 2010-03-26 15:08 lircd
-rw-r--r--  1 root root    5 2010-03-26 15:08 lircd.pid
# eix -I lirc                          
[I] app-misc/lirc                                      
     Available versions:  0.8.3_pre1 0.8.3-r2 0.8.4 (~)0.8.4a 0.8.5 (~)0.8.6-r1 (~)0.8.6-r2 {X debug doc hardware-carrier kernel_linux lirc_devices_accent lirc_devices_act200l lirc_devices_act220l lirc_devices_adaptec lirc_devices_all lirc_devices_alsa_usb lirc_devices_animax lirc_devices_asusdh lirc_devices_atilibusb lirc_devices_atiusb lirc_devices_audio lirc_devices_audio_alsa lirc_devices_avermedia lirc_devices_avermedia98 lirc_devices_avermedia_vdomate lirc_devices_awlibusb lirc_devices_bestbuy lirc_devices_bestbuy2 lirc_devices_breakoutbox lirc_devices_bte lirc_devices_bw6130 lirc_devices_caraca lirc_devices_chronos lirc_devices_cmdir lirc_devices_commandir lirc_devices_cph06x lirc_devices_creative lirc_devices_creative_infracd lirc_devices_devinput lirc_devices_digimatrix lirc_devices_dsp lirc_devices_dvico lirc_devices_ea65 lirc_devices_ene0100 lirc_devices_exaudio lirc_devices_flyvideo lirc_devices_ftdi lirc_devices_gvbctv5pci lirc_devices_hauppauge lirc_devices_hauppauge_dvb lirc_devices_hercules_smarttv_stereo lirc_devices_i2cuser lirc_devices_igorplugusb lirc_devices_iguanaIR lirc_devices_imon lirc_devices_imon_24g lirc_devices_imon_knob lirc_devices_imon_lcd lirc_devices_imon_pad lirc_devices_imon_pad2keys lirc_devices_imon_rsc lirc_devices_inputlirc lirc_devices_irdeo lirc_devices_irdeo_remote lirc_devices_irlink lirc_devices_irman lirc_devices_irreal lirc_devices_it87 lirc_devices_ite8709 lirc_devices_knc_one lirc_devices_kworld lirc_devices_leadtek_0007 lirc_devices_leadtek_0010 lirc_devices_leadtek_pvr2000 lirc_devices_livedrive_midi lirc_devices_livedrive_seq lirc_devices_logitech lirc_devices_macmini lirc_devices_mceusb lirc_devices_mceusb2 lirc_devices_mediafocusI lirc_devices_mouseremote lirc_devices_mouseremote_ps2 lirc_devices_mp3anywhere lirc_devices_mplay lirc_devices_nslu2 lirc_devices_packard_bell lirc_devices_parallel lirc_devices_pcmak lirc_devices_pcmak_usb lirc_devices_pctv lirc_devices_pixelview_bt878 lirc_devices_pixelview_pak lirc_devices_pixelview_pro lirc_devices_provideo lirc_devices_realmagic lirc_devices_remote_wonder_plus lirc_devices_remotemaster lirc_devices_sa1100 lirc_devices_samsung lirc_devices_sasem lirc_devices_sb0540 lirc_devices_serial lirc_devices_serial_igor_cesko lirc_devices_silitek lirc_devices_sir lirc_devices_slinke lirc_devices_streamzap lirc_devices_tekram lirc_devices_tekram_bt829 lirc_devices_tira lirc_devices_ttusbir lirc_devices_tuxbox lirc_devices_tvbox lirc_devices_udp lirc_devices_uirt2 lirc_devices_uirt2_raw lirc_devices_usb_uirt_raw lirc_devices_usbirboy lirc_devices_usbx lirc_devices_userspace lirc_devices_wpc8769l lirc_devices_xboxusb transmitter}
     Installed versions:  0.8.6-r2(01:06:19 24/03/10)(X kernel_linux lirc_devices_audio lirc_devices_audio_alsa lirc_devices_serial -debug -doc -hardware-carrier -lirc_devices_accent -lirc_devices_act200l -lirc_devices_act220l -lirc_devices_adaptec -lirc_devices_all -lirc_devices_alsa_usb -lirc_devices_animax -lirc_devices_asusdh -lirc_devices_atilibusb -lirc_devices_atiusb -lirc_devices_avermedia -lirc_devices_avermedia98 -lirc_devices_avermedia_vdomate -lirc_devices_awlibusb -lirc_devices_bestbuy -lirc_devices_bestbuy2 -lirc_devices_breakoutbox -lirc_devices_bte -lirc_devices_bw6130 -lirc_devices_caraca -lirc_devices_chronos -lirc_devices_commandir -lirc_devices_cph06x -lirc_devices_creative -lirc_devices_creative_infracd -lirc_devices_devinput -lirc_devices_digimatrix -lirc_devices_dsp -lirc_devices_dvico -lirc_devices_ea65 -lirc_devices_ene0100 -lirc_devices_exaudio -lirc_devices_flyvideo -lirc_devices_ftdi -lirc_devices_gvbctv5pci -lirc_devices_hauppauge -lirc_devices_hauppauge_dvb -lirc_devices_hercules_smarttv_stereo -lirc_devices_i2cuser -lirc_devices_igorplugusb -lirc_devices_iguanaIR -lirc_devices_imon -lirc_devices_imon_24g -lirc_devices_imon_knob -lirc_devices_imon_lcd -lirc_devices_imon_pad -lirc_devices_imon_rsc -lirc_devices_inputlirc -lirc_devices_irdeo -lirc_devices_irdeo_remote -lirc_devices_irlink -lirc_devices_irman -lirc_devices_irreal -lirc_devices_it87 -lirc_devices_ite8709 -lirc_devices_knc_one -lirc_devices_kworld -lirc_devices_leadtek_0007 -lirc_devices_leadtek_0010 -lirc_devices_leadtek_pvr2000 -lirc_devices_livedrive_midi -lirc_devices_livedrive_seq -lirc_devices_logitech -lirc_devices_macmini -lirc_devices_mceusb -lirc_devices_mediafocusI -lirc_devices_mouseremote -lirc_devices_mouseremote_ps2 -lirc_devices_mp3anywhere -lirc_devices_mplay -lirc_devices_nslu2 -lirc_devices_packard_bell -lirc_devices_parallel -lirc_devices_pcmak -lirc_devices_pcmak_usb -lirc_devices_pctv -lirc_devices_pixelview_bt878 -lirc_devices_pixelview_pak -lirc_devices_pixelview_pro -lirc_devices_provideo -lirc_devices_realmagic -lirc_devices_remote_wonder_plus -lirc_devices_remotemaster -lirc_devices_sa1100 -lirc_devices_samsung -lirc_devices_sasem -lirc_devices_sb0540 -lirc_devices_serial_igor_cesko -lirc_devices_silitek -lirc_devices_sir -lirc_devices_slinke -lirc_devices_streamzap -lirc_devices_tekram -lirc_devices_tekram_bt829 -lirc_devices_tira -lirc_devices_ttusbir -lirc_devices_tuxbox -lirc_devices_tvbox -lirc_devices_udp -lirc_devices_uirt2 -lirc_devices_uirt2_raw -lirc_devices_usb_uirt_raw -lirc_devices_usbirboy -lirc_devices_usbx -lirc_devices_userspace -lirc_devices_wpc8769l -lirc_devices_xboxusb -transmitter)
     Homepage:            http://www.lirc.org/
     Description:         decode and send infra-red signals of many commonly used remote controls

# uname -r
2.6.32-sabayon
#
I also booted up the SL KDE 5.1-r1 LiveDVD (2.6.31 kernel and lirc-0.8.6-r2) on the nettop. Lo and behold, the lircd daemon runs on that too:

Code: Select all

[email protected] ~ $ su
Password:                 
# ls -la /var/run/lirc
total 0
drwxr-xr-x  2 root root  60 2010-03-26 15:06 .
drwxr-xr-x 29 root root 920 2010-03-26 15:09 ..
sabayon sabayonuser # /etc/init.d/lircd start
* Starting lircd...                                                       [ ok ]
# uname -r
2.6.31-sabayon
#
I have a feeling that when I tried the 2.6.31 kernel on the nettop (see a couple of posts back), I must have still had the version of LIRC installed that I built for the 2.6.33 kernel. Either that or my building of LIRC for the 2.6.33 kernel left files behind that were not changed by re-installing lirc-0.8.6-r2 from Entropy or Portage.

Anyway, the bottom line is that lirc-0.8.6-r2, whether installed via Portage or installed via Entropy, does not work with the 2.6.33 kernel. This is because the current lirc-0.8.6-r2 ebuild is defective, as pointed out in previous posts. Note that this problem is over and above the other problem with the Entropy build of lirc-0.8.6-r2 that I pointed out in a previous post, i.e. the package in the Entropy repository was built without all the drivers being specified in /etc/make.conf.

Thus anyone trying to use LIRC 0.8.6-r2 with the fully upgraded SL with the 2.6.33-sabayon kernel will fail, Furthermore, any Entropy user trying to use LIRC 0.8.6-r2, whatever the kernel version, will fail.

I have a feeling that, if I were to:

a) re-install the SL 5.1-r1 LiveDVD to the nettop's HDD again but not perform the 'equo update && equo upgrade' (i.e. stay with the 2.6.31 kernel);
b) put the LIRC 0.8.6 source in /usr/src/lirc-0.8.6/ as I did previously;
c) put the lirc_wb677-1.0.4 source in /usr/src/lirc_wb677-1.0.4/ as I did previously;
d) 'make' and 'make install' the lirc_wb677.ko as I did previously;
e) configure LIRC based on the LIRC configuration files supplied with the Ubuntu driver (and, as I did previously, put them in the directories expected by Gentoo/SL, which are different to Ubuntu);
f) use 'modprobe --force' to load the lirc_wb677 driver module;

then I would be able to run the LIRC daemon and get the IR receiver working.

If I get the time I'll try this, but at the moment I'm fed up with LIRC (and buggy Portage/ebuilds).


By the way, I'm still interested if anyone out there is an Automake expert and can answer my question in an earlier post about the Makefile.am for lirc_wb677.ko with the split source code files. Google only gives me an answer for a normal Makefile (which I know anyway from the Ubuntu Makefile for lirc_wb677.ko), which does not work for Automake.

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by Fitzcarraldo » Sun Mar 28, 2010 7:29

I had another look at the error messages from my attempt to use Portage to build LIRC 0.8.6 with patched source code to work with the 2.6.33 kernel (see my first post of March 26), and noticed that kfifo is mentioned. Now, the purpose of the patch lirc-LP529514.patch that I mentioned in an earlier post is specifically to fix a problem with kfifo introduced by the 2.6.33 kernel. So I began to wonder whether I had patched correctly the lirc-0.8.6 source code. So I had another go today:

1. I did a 'make uninstall' and a 'make clean' in /usr/src/lirc-0.8.6/ and in /usr/src/lirc_wb677/ directories, and then deleted the /usr/src/lirc-0.8.6/ directory.

2. I applied the lirc-LP529514.patch and the autoconf.patch to the LIRC 0.8.6 source code, and copied the resulting source code to a newly-created /usr/src/lirc-0.8.6/ directory.

3. I don't know if it is necessary, but I followed a note from 2005 in the Gentoo Wiki article on LIRC, and did the following:

Code: Select all

#  cp /usr/src/lirc-0.8.6/contrib/lirc.rules /etc/udev/rules.d
# cat /etc/udev/rules.d/lirc.rules 
KERNEL=="lirc[0-9]*",   NAME="lirc/%n"
#
4. I created a tarball lirc-0.8.6.tar.bz2 of the patched LIRC 0.8.6 source code, and copied it to the /usr/portage/distfiles/ directory.

5. I edited /etc/make.conf and changed LIRC_DEVICES="all" to LIRC_DEVICES="wpc8769l" because of Gentoo Bugzilla Bug Report No. 296739 (yet another LIRC bug report!), as the error message mentioned in that bug report was displayed when I used LIRC_DEVICES="all" in a previous build attempt, even though I was not using the gentoo-sources-2.6.32 mentioned in the bug report. (I just chose the device wpc8769l as a 'dummy', since my IR receiver does not use that chip.)

6. cd /usr/portage/app-misc/lirc/

7. ebuild --force lirc-0.8.6-r2.ebuild manifest

8. emerge -1v lirc

9. I checked that the wpc8769l module I had built LIRC with was correctly listed in the dependency file for modules:

Code: Select all

# cat /lib/modules/2.6.33-sabayon/modules.dep | grep lirc
misc/lirc_dev.ko:
misc/lirc_wpc8769l.ko: misc/lirc_dev.ko
10. I copied the LIRC configuration files /usr/share/lirc/remotes/lirc_wb677/lircd.conf.wb677 and usr/share/lirc_lirc_wb677/lircrc_nuvoton from the Ubuntu lirc_wb677-1.0.4 tarball to /etc/lirc/lircd.conf and /etc/lirc/lircrc respectively. I don't have the file /etc/lirc/lircmd.conf though, which perhaps I may need to create for mouse emulation.

11. I built the module for my IR receiver:

a) I first edited the Makefile /usr/src/lirc_wb677-1.0.4/Makefile that I extracted from the Ubuntu tarball so that it looks like this:

Code: Select all

#!/bin/bash

	LIRC_DIR := /usr/src/lirc-0.8.6

	obj-m += lirc_wb677.o

	lirc_wb677-objs := lirc_wb677_main.o lirc_wb677_mouse_kbd.o

	KSRC ?= /lib/modules/$(shell uname -r)/build

	PWD := $(shell pwd)
modules:
	echo KERNELDIR=$(KSRC)
	$(MAKE) -C $(KSRC) -I $(LIRC_DIR) M=$(PWD) modules


install:
# Following line edited but then commented out because it stops script if lircd not already running:
#	/etc/init.d/lircd stop
	rmmod lirc_wb677 || echo "lirc_wb677.ko is not executing"
	file="lirc_wb677.ko"; \
	dir="/lib/modules/$(shell uname -r)/misc"; \
	if test -d "$$dir"; then echo ""; else mkdir -p $$dir; fi; \
	cp -vf *.ko $$dir
	depmod -a
# Following line edited but then commented out because /usr/share/lirc/lirc.hwdb does not exist on my PC:
#	patch -p0 /usr/share/lirc/lirc.hwdb < /usr/src/lirc_wb677-1.0.4/lirc_nct667x-lirc0.8.6.patch
	@echo ""
	@echo "Hint: You can configure lirc."
	@echo "      And start lirc by executing \"/etc/init.d/lircd start\""

uninstall:
# Following line edited but then commented out because it stops script if lircd not already running:
#	/etc/init.d/lircd stop
	( rmmod lirc_wb677 ) || echo "lirc_wb677.ko is not executing"
	dir="/lib/modules/$(shell uname -r)/misc"; \
	if test -d "$$dir"; then rm -R $$dir; fi;
	depmod -a
# Following line edited but then commented out because /usr/share/lirc/lirc.hwdb does not exist on my PC:
#	patch -R -p0 /usr/share/lirc/lirc.hwdb < /usr/src/lirc_wb677-1.0.4/lirc_nct667x-lirc0.8.6.patch

clean:
	rm -rf *.o *.ko *.mod.c Module.symvers .tmp_versions .*.cmd
b) Then I compiled and installed the module file:

Code: Select all

# cd /usr/src/lirc_wb677-1.0.4/
# make
echo KERNELDIR=/lib/modules/2.6.33-sabayon/build
KERNELDIR=/lib/modules/2.6.33-sabayon/build
make -C /lib/modules/2.6.33-sabayon/build -I /usr/src/lirc-0.8.6 M=/usr/src/lirc_wb677-1.0.4 modules
make[1]: Entering directory `/usr/src/linux-2.6.33-sabayon'
  CC [M]  /usr/src/lirc_wb677-1.0.4/lirc_wb677_main.o
In file included from /usr/src/linux-2.6.33-sabayon/arch/x86/include/asm/uaccess.h:571,
                 from include/linux/poll.h:13,
                 from /usr/src/lirc_wb677-1.0.4/lirc_wb677.h:25,
                 from /usr/src/lirc_wb677-1.0.4/lirc_wb677_main.c:2:
In function ‘copy_from_user’,
    inlined from ‘lirc_write’ at /usr/src/lirc_wb677-1.0.4/lirc_wb677_main.c:674:
/usr/src/linux-2.6.33-sabayon/arch/x86/include/asm/uaccess_32.h:212: warning: call to ‘copy_from_user_overflow’ declared with attribute warning: copy_from_user() buffer size is not provably correct
  CC [M]  /usr/src/lirc_wb677-1.0.4/lirc_wb677_mouse_kbd.o
  LD [M]  /usr/src/lirc_wb677-1.0.4/lirc_wb677.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "lirc_register_driver" [/usr/src/lirc_wb677-1.0.4/lirc_wb677.ko] undefined!
WARNING: "lirc_unregister_driver" [/usr/src/lirc_wb677-1.0.4/lirc_wb677.ko] undefined!
  CC      /usr/src/lirc_wb677-1.0.4/lirc_wb677.mod.o
  LD [M]  /usr/src/lirc_wb677-1.0.4/lirc_wb677.ko
make[1]: Leaving directory `/usr/src/linux-2.6.33-sabayon'
# make install
rmmod lirc_wb677 || echo "lirc_wb677.ko is not executing"
ERROR: Module lirc_wb677 does not exist in /proc/modules
lirc_wb677.ko is not executing
file="lirc_wb677.ko"; \
        dir="/lib/modules/2.6.33-sabayon/misc"; \
        if test -d "$dir"; then echo ""; else mkdir -p $dir; fi; \
        cp -vf *.ko $dir

`lirc_wb677.ko' -> `/lib/modules/2.6.33-sabayon/misc/lirc_wb677.ko'
depmod -a

Hint: You can configure lirc.
      And start lirc by executing "/etc/init.d/lircd start"
12. I inserted the module by force when it would not insert normally:

Code: Select all

# modprobe lirc_wb677
FATAL: Error inserting lirc_wb677 (/lib/modules/2.6.33-sabayon/misc/lirc_wb677.ko): Unknown symbol in module, or unknown parameter (see dmesg)
# modprobe -f lirc_wb677
# lsmod | grep lirc
lirc_wb677             22499  0 
lirc_dev                6837  1 lirc_wb677
#
13. I tried to run the LIRC daemon:

Code: Select all

# /etc/init.d/lircd start
* Caching service dependencies...                                                                                                                                               [ ok ]
* Starting lircd...                                                                                                                                                             [ ok ]
# rc-status update
* runlevel `update' does not exist
# rc-status | grep lircd
 lircd                                                             [  started  ]
Eureka, it runs! :cheers:

14. I checked the contents of the /var/run/lirc/ and /dev/ directories:

Code: Select all

# ls -la /var/run/lirc/*
srw-rw-rw- 1 root root 0 Mar 28 05:45 /var/run/lirc/lircd
-rw-r--r-- 1 root root 6 Mar 28 05:45 /var/run/lirc/lircd.pid
prw-r--r-- 1 root root 0 Mar 28 03:14 /var/run/lirc/lircm
# ls -la /dev/lirc*
lrwxrwxrwx 1 root root 19 Mar 28 05:45 /dev/lircd -> /var/run/lirc/lircd

/dev/lirc:
total 0
drwxr-xr-x  2 root root    60 Mar 28 05:45 .
drwxr-xr-x 21 root root 14680 Mar 28 05:45 ..
crw-rw----  1 root root 61, 0 Mar 28 05:45 0
# 
At long last the socket file and PID file are there as they should be.

15. I issued the following command and pressed some keys on the Remote Controller:

Code: Select all

# cat /dev/lirc/0
and a string of characters (garbage) appeared in the Konsole whenever I pressed a key. Finally the IR receiver is doing something, and with the 2.6.33 kernel too. :cheers:

I think I now need to work out the correct key mapping to go in /etc/lirc/lircmd.conf and the XBMC keymap file, and perhaps I will be able to get the remote controller to actually control XBMC. My only worry is why I had to force the module lirc_wb677 to load, but hopefully that is only because of missing kernel version information in the module (remembering the two messages for lirc_wb677 in dmesg: "no symbol version for lirc_unregister_driver" and "Unknown symbol lirc_unregister_driver").

Anyway, after burning the candle at both ends for several days, I feel rather pleased to have got some sort of a result. Mind you, the IR receiver works out of the box with Windows 7! Linux, eh?!

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: ASRock ION 330HT nettop running Sabayon Linux

Post by Fitzcarraldo » Sun Mar 28, 2010 10:31

OK, found the final piece in the jigsaw puzzle. I added the line LIRCD_OPTS="-d /dev/lirc/0" to /etc/conf.d/lircd and restarted the daemon, and now there is no more garbage on screen when I press a key on the remote controller:

Code: Select all

# irw
000000037ff07bfe 00 One mceusb
000000037ff07bfe 01 One mceusb
000000037ff07bfe 02 One mceusb
000000037ff07bfb 00 Four mceusb
000000037ff07bfb 01 Four mceusb
000000037ff07bfb 02 Four mceusb
000000037ff07bfe 00 One mceusb
000000037ff07bfe 01 One mceusb
000000037ff07bfb 00 Four mceusb
000000037ff07bfb 01 Four mceusb
000000037ff07bfc 00 Three mceusb
000000037ff07bfc 01 Three mceusb
000000037ff07bfc 00 Three mceusb
000000037ff07bfc 01 Three mceusb
000000037ff07bf9 00 Six mceusb
000000037ff07bf9 01 Six mceusb
000000037ff07bf9 02 Six mceusb
000000037ff07bfa 00 Five mceusb
000000037ff07bfa 01 Five mceusb
000000037ff07bfa 02 Five mceusb
000000037ff07bfa 00 Five mceusb
000000037ff07bfa 01 Five mceusb
^C
# 
:cheers:

And when I launch XBMC the remote controller works.

I also took the opportunity to add the following two lines to /etc/conf.d/lircd to enable the nettop to listen to the IR receiver while suspended and to be able to resume when the remote controller is used again:

Code: Select all

echo CIR > /proc/acpi/wakeup    # Enable wake-up on IR receiver
echo USB0 > /proc/acpi/wakeup   # Enable wake-up on USB0 port (keyboard)
So my /etc/conf.d/lircd now looks like this:

Code: Select all

# Options to pass to the lircd process

# for devices with lirc-kernel-module
#LIRCD_OPTS="-d /dev/lirc0"
#LIRCD_OPTS="-d /dev/lirc"
LIRCD_OPTS="-d /dev/lirc/0"


# for devices using the input-layer
#LIRCD_OPTS="-H devinput -d /dev/input/by-path/pci-0000:00:0a.0--event-ir"
# This should work, Bug #235107
#LIRCD_OPTS="-H devinput name=*DVB*"


echo CIR > /proc/acpi/wakeup    # Enable wake-up on IR receiver
echo USB0 > /proc/acpi/wakeup   # Enable wake-up on USB0 port (keyboard)
Also, as I have to force the lirc_wb677 module to load, I cannot just add it to /etc/conf.d/modules like I would for other modules that I want to be loaded automatically at boot. Instead I have added a line in /etc/init.d/lircd to load the module:

Code: Select all

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/lircd-0.8.6,v 1.1 2009/10/04 18:48:29 fauli Exp $

# Load the driver module for the ASRock ION 330HT IR receiver here because it has to be forced to load:
modprobe -f lirc_wb677

PIDFILE=/var/run/lirc/${SVCNAME}.pid
LIRCD_SYMLINKFILE=/dev/lircd
LIRCD_SOCKET=/var/run/lirc/lircd

depend() {
        provide lirc
}

start() {
        local retval
        ebegin "Starting lircd"
        rm -f ${LIRCD_SOCKET} && ln -s ${LIRCD_SOCKET} ${LIRCD_SYMLINKFILE}
        if [ $? -ne 0 ]; then
                eend $? "Unable to create symbolic link ${LIRCD_SYMLINKFILE}"
                return 1
        fi

        start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd -- \
                -P "${PIDFILE}" ${LIRCD_OPTS}
        retval=$?

        if [ ${retval} -ne 0 ]; then
                rm -f ${LIRCD_SOCKET}
        fi

        eend ${retval}
}

stop() {
        ebegin "Stopping lircd"
        rm -f ${LIRCD_SYMLINKFILE}
        start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd
        eend $?
}
And I added the LIRC daemon to the default runlevel so it runs automatically at startup:

Code: Select all

# rc-update add lircd default
Furthermore, I copied the file usr/share/lirc_wb677/lircrc_nuvoton from the Ubuntu tarball to /home/fitzcarraldo/.lircrc

I also created the file /home/fitzcarraldo/.xbmc/userdata/keymaps/330ht.xml containing the following:

Code: Select all

<keymap>
  <FullscreenVideo>
    <remote>
      <info>CodecInfo</info>
      <select>OSD</select>
      <display>ShowSubtitles</display>          
    </remote>
    <universalremote>          
      <obc148>AspectRatio</obc148>
    </universalremote>
  </FullscreenVideo>
</keymap>
which I found in the XBMC forums here.

Note that the automatic LIRC resume script sleep.d/99lirc-resume.sh documented in the XBMC Wiki article Automatic lirc resume script and in the XBMC forums thread ASRock ION 330HT (2nd gen) - built-in IR, which lirc driver? is not needed with Version 1.0.4 of the ASRock lirc_wb677 driver.


The remote controller's keys work very well with XBMC, and now SL and XBMC on the ASRock ION 330HT nettop can truly be considered a full media centre. :D

Having trawled the Web extensively with Google over the last week, I think this is, to date, the first working implementation of the lirc_wb677 driver in a Linux distribution other than Ubuntu 9.10 (2.6.31 kernel), and I think the first working implementation with the 2.6.33 kernel.

sjieke
Technological Hen
Posts: 321
Joined: Thu Mar 01, 2007 10:46
Location: Maldegem, Belgium

Re: ASRock ION 330HT nettop running Sabayon Linux [Solved]

Post by sjieke » Sun Mar 28, 2010 13:19

Congratulations :alien:
You truly know how to persist 8)

This thread contains a lot of useful information on lirc. Maybe it would be interesting to collect them somewhere on the wiki, because it would be a waste if all this info got lost in the archive after time...

iElectric
Baby Hen
Posts: 1
Joined: Mon Aug 23, 2010 13:56

Re: ASRock ION 330HT nettop running Sabayon Linux [Solved]

Post by iElectric » Mon Aug 23, 2010 14:24

Thanks! Your guide is the only one, but very well written. I have created gentoo ebuild with all the steps, you can read guide how to setup xbmc and gentoo on ion 330 at my blog:

http://www.fubar.si/2010/8/23/gentoo-io ... rfect-htpc

Sharing is caring:)

Post Reply