Memo/XBMC/CentOS

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

CentOS


xboxのリモコンをUSBに改造

  • CentOS5.5 x86_64での認識状況
    1. sudo /sbin/lsusb
    2.  
    3. Bus 004 Device 004: ID 045e:0284 Microsoft Corp. Xbox DVD Playback Kit
  • XBox DVD Kit IR Receiver Wiring を参考に改造
  • CentOS5.5 x86_64の場合。ATrpms に新しいパッケージがある
    1. yum -y --enablerepo=atrpms install lirc lirc-kmdl-2.6.18-194.32.1.el5
    2.  
    3.  
    4. 認識していればOK
    5. sudo rmmod lirc_atiusb
    6. sudo rmmod lirc_dev
    7. sudo modprobe lirc_atiusb
    8. sudo modprobe lirc_dev
    9.  
    10. ls -l /dev/lirc*
    11. lrwxrwxrwx 1 root root     5  226 04:25 /dev/lirc -> lirc0
    12. crw-rw---- 1 root lirc 61, 0  226 04:25 /dev/lirc0
    13.  
    14.  
    15. cat > /etc/lircd.conf << 'EOS'
    16. #
    17. # this is a space encoded remote control from Technisat
    18. #
    19. # contributed by Christoph Bartelmus (lirc@bartelmus.de)
    20. #
    21. # brand:             Technisat
    22. # model:             100 TS 008
    23. # supported devices: satellite receiver ST 3004 S
    24. #
    25.  
    26. begin remote
    27.  
    28.   name   XboxDVDDongle
    29.   bits            8
    30.   eps            30
    31.   aeps          100
    32.  
    33.   one             0     0
    34.   zero            0     0
    35.   gap          163993
    36.   min_repeat      9
    37.   toggle_bit_mask 0xC6
    38.  
    39.       begin codes
    40.           SELECT                   0x0B
    41.           RIGHT                    0xA8
    42.           LEFT                     0xA9
    43.           UP                       0xA6
    44.           DOWN                     0xA7
    45.           TITLE                    0xE5
    46.           INFO                     0xC3
    47.           MENU                     0xF7
    48.           BACK                     0xD8
    49.           STOP                     0xE0
    50.           PAUSE                    0xE6
    51.           SKIP+                    0xDF
    52.           SKIP-                    0xDD
    53.           PLAY                     0xEA
    54.           FORWARD                  0xE3
    55.           REVERSE                  0xE2
    56.           DISPLAY                  0xD5
    57.           1                        0xCE
    58.           2                        0xCD
    59.           3                        0xCC
    60.           4                        0xCB
    61.           5                        0xCA
    62.           6                        0xC9
    63.           7                        0xC8
    64.           8                        0xC7
    65.           9                        0xC6
    66.           0                        0xCF
    67.       end codes
    68.  
    69. end remote
    70. EOS
    71.  
    72. cat >> /etc/modprobe.d/blacklist << 'EOS'
    73. blacklist xpad
    74. EOS
    75.  
    76. service lircd restart
    77. chkconfig lircd on
  • XBMCを起動して、特に設定せずともリモコンが動作した

XBMCのインストール

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

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2011-02-28 (月) 10:27:16 (2732d)