Memo/XBMC/CentOS

https://dexlab.net:443/pukiwiki/index.php?Memo/XBMC/CentOS
 

CentOS


xboxのリモコンをUSBに改造

  • CentOS5.5 x86_64での認識状況
    sudo /sbin/lsusb
    
    Bus 004 Device 004: ID 045e:0284 Microsoft Corp. Xbox DVD Playback Kit
  • XBox DVD Kit IR Receiver Wiring を参考に改造
  • CentOS5.5 x86_64の場合。ATrpms に新しいパッケージがある
    yum -y --enablerepo=atrpms install lirc lirc-kmdl-2.6.18-194.32.1.el5
    
    
    認識していればOK
    sudo rmmod lirc_atiusb
    sudo rmmod lirc_dev
    sudo modprobe lirc_atiusb
    sudo modprobe lirc_dev
    
    ls -l /dev/lirc*
    lrwxrwxrwx 1 root root     5  226 04:25 /dev/lirc -> lirc0
    crw-rw---- 1 root lirc 61, 0  226 04:25 /dev/lirc0
    
    
    cat > /etc/lircd.conf << 'EOS'
    #
    # this is a space encoded remote control from Technisat
    #
    # contributed by Christoph Bartelmus (lirc@bartelmus.de)
    #
    # brand:             Technisat
    # model:             100 TS 008
    # supported devices: satellite receiver ST 3004 S
    #
    
    begin remote
    
      name   XboxDVDDongle
      bits            8
      eps            30
      aeps          100
    
      one             0     0
      zero            0     0
      gap          163993
      min_repeat      9
      toggle_bit_mask 0xC6
    
          begin codes
              SELECT                   0x0B
              RIGHT                    0xA8
              LEFT                     0xA9
              UP                       0xA6
              DOWN                     0xA7
              TITLE                    0xE5
              INFO                     0xC3
              MENU                     0xF7
              BACK                     0xD8
              STOP                     0xE0
              PAUSE                    0xE6
              SKIP+                    0xDF
              SKIP-                    0xDD
              PLAY                     0xEA
              FORWARD                  0xE3
              REVERSE                  0xE2
              DISPLAY                  0xD5
              1                        0xCE
              2                        0xCD
              3                        0xCC
              4                        0xCB
              5                        0xCA
              6                        0xC9
              7                        0xC8
              8                        0xC7
              9                        0xC6
              0                        0xCF
          end codes
    
    end remote
    EOS
    
    cat >> /etc/modprobe.d/blacklist << 'EOS'
    blacklist xpad
    EOS
    
    service lircd restart
    chkconfig lircd on
  • XBMCを起動して、特に設定せずともリモコンが動作した

XBMCのインストール

  • 起動まではできたが安定動作せず。すぐSegmentation faultでxbmc落ちる。Ubuntuの方が良さそうだ。
    Core was generated by `/usr/local/lib/xbmc/xbmc.bin'.
    Program terminated with signal 11, Segmentation fault.
    #0  0x0000003ea4679a30 in strlen () from /lib64/libc.so.6
    ----
    Core was generated by `/usr/local/lib/xbmc/xbmc.bin'.
    Program terminated with signal 11, Segmentation fault.
    #0  0x0000003d12c2855f in open_file () from /usr/lib64/libSDL_mixer-1.2.so.0
  • CentOS 5.5 x86_64
  • startxfce4でhostnameが見つからないと言ってくるので、hostnameの値をhostsに追加
    hostname
    mediacenter
    
    vi /etc/hosts
    ----
    127.0.0.1               localhost.localdomain localhost mediacenter
    ----
  • X Window Systemを使えるようにしておく。ここでは軽量のXFCEを使う
    yum groupinstall "XFCE"
  • フォントが小さすぎて見えない対策。ログアウトして以下を設定
    echo 'Xft.dpi: 96' >> ~/.config/xfce4/Xft.xrdb
  • AMD 760G 対応にするためにドライバーインストール
    ハードウェアの確認
    lspci | grep -i vga
    01:05.0 VGA compatible controller: ATI Technologies Inc 760G [Radeon 3000]
    
    wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-1-x86.x86_64.run
    bash ati-driver-installer-11-1-x86.x86_64.run
    sudo aticonfig --initial -f
    
    vi /etc/X11/xorg.conf
    ----
    Section "Device"
            Option "SWCursor" "true"
    ----
    reboot
    
    startxfce4
    
    ターミナルを開く
    
    OpenGLが使えるかテスト
    fglrxinfo
    ----
    display: :0.0  screen: 0
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: ATI Radeon 3000 Graphics
    OpenGL version string: 3.3.10428 Compatibility Profile Context
    ----
    glxgears
    fgl_glxgears
  • ドライバアンインストールする場合
    /usr/share/ati/fglrx-uninstall.sh
  • bootstrapで lib/cpluff/configure.ac がgettext-0.16-1以上を必要としているので更新
    cd /usr/src/redhat
    wget ftp://ftp.icm.edu.pl/vol/rzm1/linux-fedora-secondary/development/source/SRPMS/gettext-0.17-4.fc9.src.rpm
    rpm -ivh gettext-0.17-4.fc9.src.rpm
    yum -y --enablerepo=rpmforge install java java-devel gcc-java
    rpmbuild -ba SPECS/gettext.spec
    rpm -Uvh RPMS/x86_64/gettext-*
  • 以下のエラーは、autoconf, m4の更新が必要
    ./bootstrap
    autoreconf: Entering directory `.'
    autoreconf: configure.in: not using Gettext
    autoreconf: running: aclocal --force 
    autoreconf: configure.in: tracing
    autoreconf: running: libtoolize --copy --force
    Putting files in AC_CONFIG_AUX_DIR, `build-aux'.
    autoreconf: running: /usr/bin/autoconf --force
    configure.in:47: error: possibly undefined macro: AC_MSG_ERROR
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    configure.in:55: error: possibly undefined macro: AC_SUBST
    configure.in:554: error: possibly undefined macro: PKG_CHECK_MODULES
    configure.in:571: error: possibly undefined macro: AC_DEFINE
    configure.in:600: error: possibly undefined macro: AS_CASE
    configure.in:1107: error: possibly undefined macro: AC_TYPE_INT8_T
    configure.in:1108: error: possibly undefined macro: AC_TYPE_INT16_T
    configure.in:1109: error: possibly undefined macro: AC_TYPE_INT32_T
    configure.in:1110: error: possibly undefined macro: AC_TYPE_INT64_T
    configure.in:1116: error: possibly undefined macro: AC_TYPE_SSIZE_T
    configure.in:1120: error: possibly undefined macro: AC_TYPE_UINT8_T
    configure.in:1121: error: possibly undefined macro: AC_TYPE_UINT16_T
    configure.in:1122: error: possibly undefined macro: AC_TYPE_UINT32_T
    configure.in:1123: error: possibly undefined macro: AC_TYPE_UINT64_T
    autoreconf: /usr/bin/autoconf failed with exit status: 1
    
    wget -O m4-1.4.13-4.x86_64.rpm "ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/h/project/hp/hphp/CentOS%205%2064bit/RPM/m4-1.4.13-4.x86_64.rpm"
    wget -O autoconf-2.63-3.noarch.rpm "ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/h/project/hp/hphp/CentOS%205%2064bit/RPM/autoconf-2.63-3.noarch.rpm"
    rpm -Uvh m4-1.4.13-4.x86_64.rpm
    rpm -Uvh autoconf-2.63-3.noarch.rpm
    
    rpm -e gettext.i386 gettext-devel.i386
    rpm -e gettext.x86_64 gettext-devel.x86_64
    wget http://ftp.redhat.com/pub/redhat/rhel/beta/6/x86_64/os/Packages/gettext-0.17-16.el6.x86_64.rpm
    wget http://ftp.redhat.com/pub/redhat/rhel/beta/6/x86_64/os/Packages/gettext-devel-0.17-16.el6.x86_64.rpm
    wget http://ftp.redhat.com/pub/redhat/rhel/beta/6/x86_64/os/Packages/gettext-libs-0.17-16.el6.x86_64.rpm
    
    wget -O automake-1.11.1-1.el6.noarch.rpm "http://ftp.redhat.com/pub/redhat/rhel/beta/6/i386/os/Packages/automake-1.11.1-1.el6.noarch.rpm"
    yum -y --enablerepo=epel install kobo-rpmlib
    rpm -Uvh automake-1.11.1-1.el6.noarch.rpm
  • XBMCのインストール
    cd /usr/local/src/
    
    yum -y --enablerepo=rpmforge install git
    git clone git://github.com/xbmc/xbmc.git
    
    rpm -Uvh http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
    
    yum -y --enablerepo=rpmforge,epel install SDL*.x86_64 glew glew-devel libmad-devel tre tre-devel libogg libogg-devel libvorbis libvorbis-devel boost \
    boost-devel bzip2-devel bzip2-libs fribidi* lzo lzo-devel mysql-libs mysql-devel jasper jasper-devel faac faac-devel \
    enca enca-devel hal hal-devel hal-libs cmake gperf nasm libXmu-devel fontconfig-devel freetype-devel libXinerama-devel \
    pcre-devel gcc-c++ sqlite-devel curl-devel mysql-devel libcdio-devel libmms-devel faad2-devel flac-devel libsmbclient-devel \
    libXtst-devel libsamplerate-devel libtiff-devel pulseaudio-libs-devel avahi-devel wavpack-devel libmpeg2-devel libtool \
    libmicrohttpd-devel libmodplug-devel redhat-lsb expat-devel gettext-devel yasm libass-devel libdca-devel
    
    yum -y --enablerepo=rpmforge install \
     cmake autoconf automake unzip zip libtool libjpeg-devel libsamplerate-devel libogg-devel libvorbis-devel \
     libpng-devel libcdio-devel jasper-devel ffmpeg-libpostproc libass-devel python-devel gawk gperf nasm \
     libmms-devel libsmbclient-devel libmodplug-devel curl libmpcdec-devel libXt-devel libXtst-devel libXmu-devel \
     libXinerama-devel libXrandr-devel boost-devel mesa-libGLU-devel glew-devel fontconfig-devel fribidi-devel \
     sqlite-devel lzo-devel enca-devel curl-devel dbus-devel hal-devel pulseaudio-libs-devel avahi-devel \
     mencoder libmpeg2-devel flac-devel wavpack-devel cwiid-devel zlib-devel faad2-devel openssl-devel \
     redhat-lsb mesa-libGL-devel pulseaudio-libs-zeroconf ffmpeg-devel mpeg2dec-devel flex bison e2fsprogs-devel \
     libdvdread xorg-x11-proto-devel
    
    yum -y --skip-broken --enablerepo=atrpms install \
     libvdpau libvdpau-devel libcrystalhd libcrystalhd-devel
    
    wget -O m4-1.4.13-4.x86_64.rpm "ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/h/project/hp/hphp/CentOS%205%2064bit/RPM/m4-1.4.13-4.x86_64.rpm"
    wget -O autoconf-2.63-3.noarch.rpm "ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/h/project/hp/hphp/CentOS%205%2064bit/RPM/autoconf-2.63-3.noarch.rpm"
    rpm -Uvh m4-1.4.13-4.x86_64.rpm
    rpm -Uvh autoconf-2.63-3.noarch.rpm
    yum -y --enablerepo=rpmforge install libssh libssh-devel
    
    wget -O pcre-8.02-1.jason.1.x86_64.rpm "http://www.jasonlitka.com/media/EL5/x86_64/pcre-8.02-1.jason.1.x86_64.rpm"
    wget -O pcre-devel-8.02-1.jason.1.x86_64.rpm "http://www.jasonlitka.com/media/EL5/x86_64/pcre-devel-8.02-1.jason.1.x86_64.rpm"
    rpm -e pcre.i386 pcre-devel.i386
    rpm -Uvh pcre-*
    yum --enablerepo=rpmforge,epel install SDL*.x86_64
    
    wget http://www.libsdl.org/release/SDL-1.2.14-1.src.rpm
    rpm -ivh --nomd5 SDL-1.2.14-1.src.rpm
    rpmbuild -ba SPECS/SDL.spec 
    rpm -Uvh RPMS/x86_64/SDL-devel-1.2.14-1.x86_64.rpm RPMS/x86_64/SDL-1.2.14-1.x86_64.rpm
    
    rpm -e flac flac-devel
    wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/flac-1.2.1-1_14.el5.x86_64.rpm
    wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/flac-devel-1.2.1-1_14.el5.x86_64.rpm
    wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/libFLAC++6-1.2.1-1_14.el5.x86_64.rpm
    wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/libFLAC8-1.2.1-1_14.el5.x86_64.rpm
    rpm -Uvh libFLAC*
    rpm -Uvh flac-*
    
    wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/sqlite-3.6.20-1.el5.x86_64.rpm
    wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/sqlite-devel-3.6.20-1.el5.x86_64.rpm
    rpm -Uvh sqlite-*
    
    cd /usr/src/redhat/
    
    wget http://rpm.sh-linux.org/rpm-fc9/target-SRPMS/xorg-x11-proto-devel-7.3-12.1.fc9.src.rpm
    rpm -ivh xorg-x11-proto-devel-7.3-12.1.fc9.src.rpm
    rpmbuild -ba SPECS/xorg-x11-proto-devel.spec
    rpm -Uvh RPMS/noarch/xorg-x11-proto-devel-7.3-12.1.noarch.rpm
    
    wget http://rpm.sh-linux.org/rpm-fc9/target-SRPMS/libXrandr-1.2.2-3.fc9.src.rpm
    rpm -ivh libXrandr-1.2.2-3.fc9.src.rpm
    rpmbuild -ba SPECS/libXrandr.spec
    rpm -Uvh RPMS/x86_64/libXrandr-*
    
    wget http://packages.sw.be/ccache/ccache-2.4-1.2.el5.rf.x86_64.rpm
    rpm -ivh ccache-2.4-1.2.el5.rf.x86_64.rpm 
    
    sudo ln -s /usr/lib64/mysql/libmysqlclient.so.15 /usr/lib64/libmysqlclient.so
    cd xbmc/
    
    ./bootstrap
    touch .dummy.in
    
    # ATI系ビデオカードなのでvdpauは無効にしないと、コンパイルエラー
    ./configure  --disable-vdpau --enable-external-libraries
    
    ------------------------
      XBMC Configuration:
    ------------------------
      Debugging:    Yes
      Profiling:    No
      Optimization: Yes
      Crosscomp.:   No
      target ARCH:  no
      target CPU:   no
      OpenGL:       Yes
      VDPAU:        No
      VAAPI:        No
      CrystalHD:    Yes
      VDADecoder:   No
      OpenMax:      No
      Joystick:     Yes
      XRandR:       Yes
      GOOM:         No
      Bluray:       No
      MID Support:  No
      ccache:       Yes
      PulseAudio:   Yes
      HAL Support:  Yes
      DVDCSS:       Yes
      Avahi:        Yes
      Non-free:     Yes
      ASAP Codec:   No
      Webserver:    Yes
      libRTMP support:      No
      Optical drive:        Yes
      External FFmpeg:      Yes
      External Python:      Yes
      prefix:       /usr/local
    ------------------------
    make
    make install
    
    日本語フォントをコピー
    cp /usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf /usr/local/share/xbmc/media/Fonts/arial.ttf
  • アンインストールする場合
    make uninstall
  • XBMC起動確認
    useradd xbmcuser
    passwd xbmcuser
    
    #####################################################################
    ### XFCE: create /etc/sysconfig/desktop (needed for installation) ###
    #####################################################################
    
    cat > /etc/sysconfig/desktop <<EOF
    PREFERRED=/usr/bin/startxfce4
    EOF
    
    ################################################################
    ### HERE IS WHERE WE SET UP THE AUTO-LOGIN FOR THE XBMC USER ###
    ################################################################
    
    cat >> /etc/gdm/custom.conf <<EOF
    [daemon]
    TimedLoginEnable=true
    TimedLogin=xbmcuser
    TimedLoginDelay=2
    EOF
    
    ログアウトしてxbmcuserでログイン。su - xbmcuserではダメ
    startxfce4
    
    xbmcの起動
    xbmc
  • xfce上でマウスが効かなくなった時:Ctrl+ESCでメニューが出る
  • 終了ボタンを押しても終了しない場合
    pa aux | grep xbmc.bin
    kill -9 pid

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2018-09-15 (土) 07:31:38 (94d)