OpenWrt Forum Archive

Topic: LIRC Package - help needed

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hello

I try to compile lirc for owrt with an partial success.. first the option-enabled makefile

#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 5624 2007-09-04 00:29:07Z Dottout $

include $(TOPDIR)/rules.mk
# we use the $LINUX_DIR variable, which is defined in kernel.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=lirc
PKG_VERSION:=0.8.3pre1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://lirc.sourceforge.net/software/snapshots
PKG_CAT:=bzcat

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

include $(INCLUDE_DIR)/package.mk

define  Package/lirc/Default
    SECTION:=utils
    CATEGORY:=Utilities
    URL:=http://lirc.org/
endef

define  Package/lirc
    $(call Package/lirc/Default)
    TITLE:=LIRC - Linux Infrared Remote Control
    MENU:=1
endef

define Package/lirc/description
  LIRC is a package that allows you to decode and send 
  infra-red signals of many (but not all) commonly used 
  remote controls.
  
  This package contains only lircd and lircd.conf!
endef


define  Package/lircdaemonadd
    $(call Package/lirc/Default)
    DEPENDS:=lirc
    TITLE:=Daemon Additional Files
endef

define Package/lircdaemonadd/description
  Contains those additional daemon-tools:
   -irrecord
   -lircmd
endef



define  Package/lirctools
    $(call Package/lirc/Default)
    DEPENDS:=lirc    
    TITLE:=LIRC tools
endef

define Package/lirctools/description
  This package contains those lirc-tools:
   -ircat:   prints config strings to standard output, can be used to provide remote control input to scripts
   -irexec:  execute programs according to the pressed remote control buttons
   -irpty:   pseudo tty driver. Connects to lircd via socket to receive infra-red codes and converts them to key strokes
   -irsend:  application for sending IR-codes via lirc
   -irw:     watch the codes as lircd recognize them
   -lircrcd: daemon that manages current mode for all applications
   -mode2:   shows the pulse/space length of a remote button
endef

#    --with-driver="all" \
  
CONFIGURE_ARGS += \
    --disable-nls \
    --disable-static \
    --with-kerneldir="$(LINUX_DIR)" \
    --with-driver="alsa_usb,sir" \
    --without-x \
    --with-pic \
    --with-gnu-ld \
    --enable-sandboxed \

define Package/lirc/conffiles
/etc/lircd.conf
endef


MAKE_FLAGS += \
    DESTDIR="$(PKG_INSTALL_DIR)" \
    all \

define  Package/lirc/install
    $(INSTALL_DIR) $(1)/usr/sbin/
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/lircd $(1)/usr/sbin/
    $(INSTALL_DIR) $(1)/etc
    $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/lircd.conf $(1)/etc/
endef

define  Package/lircdaemonadd/install
    $(INSTALL_DIR) $(1)/usr/sbin/
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/irrecord $(1)/usr/sbin/
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/lircmd $(1)/usr/sbin/    
endef
#     $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemons/{lircmd,irrecord} $(1)/usr/sbin/    

define  Package/lirctools/install
    $(INSTALL_DIR) $(1)/usr/sbin/
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/ircat $(1)/usr/sbin/
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irexec $(1)/usr/sbin/    
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irpty $(1)/usr/sbin/    
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irsend $(1)/usr/sbin/    
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lircrcd $(1)/usr/sbin/
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/irw $(1)/usr/sbin/    
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mode2 $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,lirc))
$(eval $(call BuildPackage,lircdaemonadd))
$(eval $(call BuildPackage,lirctools))

the problems are the drivers, when I choose only --with-driver="alsa_usb" \ it works fine, but whenever I add another driver (for example     --with-driver="alsa_usb,sir" \) the configure step fails:

checking for which drivers can be installed on this system...
checking for caraca_init in -lcaraca_client... no
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 portaudio.h usability... no
checking portaudio.h presence... no
checking for portaudio.h... 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 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
configure: error: *** it is not possible to install the specified driver
        on this system
make[2]: *** [/home/openwrt/trunk/build_dir/mipsel/lirc-0.8.3pre1/.configured] Error 1
make[2]: Leaving directory `/home/openwrt/trunk/feeds/https_svn.openwrt.org_openwrt_packages_/utils/lirc'
make[1]: *** [package/utils/lirc/compile] Error 2
make[1]: Leaving directory `/home/openwrt/trunk'
make: *** [package/utils/lirc-compile] Error 2

did anyone build lirc sucessfully?

cheers michu

ok I made some progress... its possible to to compile only ONE driver for each compile process... and not every driver works:

#ok:
#userspace,accent,act200l,act220l,adaptec,alsa_usb,animax,asusdh,atilibusb,atiusb,audio_alsa
#breakoutbox,bte,bw6130,cmdir,creative,creative_infracd,devinput,digimatrix,dsp,dvico,ea65,exaudio
#hauppauge,hauppauge_dvb,hercules_smarttv_stereo,i2cuser,igorplugusb,imon,imon_24g,imon_knob,imon_pad,imon_rsc
#irdeo,irdeo_remote,it87,knc_one,leadtek_pvr2000,livedrive_midi,livedrive_seq,logitech,macmini,mceusb,mceusb2
#mediafocusI,mouseremote,mouseremote_ps2,mp3anywhere,packard_bell,parallel,pcmak,pcmak_usb,pctv,pixelview_bt878
#provideo,realmagic,remotemaster,sasem,sb0540,serial,silitek,sir,streamzap,tekram,tekram_bt829,tira,ttusbir,tuxbox
#tvbox,udp,uirt2,uirt2_raw,usb_uirt_raw,usbx

#nok:
#serial,avermedia,avermedia_vdomate,avermedia98,bestbuy,bestbuy2,chronos,comX,cph06x,flyvideo,gvbctv5pci,irreal
#kworld,leadtek_0007,leadtek_0010,lptX,nslu2,pixelview_pak,pixelview_pro,sa1100,

#unknown: audio (no portaudio), caraca (no caraca package), iguanaIR (missing headers), irman (no libirman)

can someone of the developpers help me, I want to choose the driver in the "make menuconfig" menu and insert the selected driver into the compile string:

CONFIGURE_ARGS += \
        --disable-nls \
        --disable-static \
        --with-kerneldir="$(LINUX_DIR)" \
        --with-driver="$(SELECTED_MODULE_HERE)" \
        --without-x \
        --with-pic \
        --with-gnu-ld \
        --enable-sandboxed \

ok the serial driver is working aswell, as this is a kernel module, it depends on the selected kernel modules...

michu wrote:

ok I made some progress... its possible to to compile only ONE driver for each compile process... and not every driver works:

#ok:
#userspace,accent,act200l,act220l,adaptec,alsa_usb,animax,asusdh,atilibusb,atiusb,audio_alsa
#breakoutbox,bte,bw6130,cmdir,creative,creative_infracd,devinput,digimatrix,dsp,dvico,ea65,exaudio
#hauppauge,hauppauge_dvb,hercules_smarttv_stereo,i2cuser,igorplugusb,imon,imon_24g,imon_knob,imon_pad,imon_rsc
#irdeo,irdeo_remote,it87,knc_one,leadtek_pvr2000,livedrive_midi,livedrive_seq,logitech,macmini,mceusb,mceusb2
#mediafocusI,mouseremote,mouseremote_ps2,mp3anywhere,packard_bell,parallel,pcmak,pcmak_usb,pctv,pixelview_bt878
#provideo,realmagic,remotemaster,sasem,sb0540,serial,silitek,sir,streamzap,tekram,tekram_bt829,tira,ttusbir,tuxbox
#tvbox,udp,uirt2,uirt2_raw,usb_uirt_raw,usbx

#nok:
#serial,avermedia,avermedia_vdomate,avermedia98,bestbuy,bestbuy2,chronos,comX,cph06x,flyvideo,gvbctv5pci,irreal
#kworld,leadtek_0007,leadtek_0010,lptX,nslu2,pixelview_pak,pixelview_pro,sa1100,

#unknown: audio (no portaudio), caraca (no caraca package), iguanaIR (missing headers), irman (no libirman)

can someone of the developpers help me, I want to choose the driver in the "make menuconfig" menu and insert the selected driver into the compile string:

CONFIGURE_ARGS += \
        --disable-nls \
        --disable-static \
        --with-kerneldir="$(LINUX_DIR)" \
        --with-driver="$(SELECTED_MODULE_HERE)" \
        --without-x \
        --with-pic \
        --with-gnu-ld \
        --enable-sandboxed \

common, just a hint how to solve this.. would be great

cheers
michu

The discussion might have continued from here.