суботу, 18 жовтня 2014 р.

Медиацентр на базе Raspberry Pi


Думаю многие купили малину ради постройки медиацентра. Я в том числе.
Купив плату, нужно было докупить еще сопутствующих акксессуаров. В моем случае это были:

БП 5V 2A
HDMI v1.4 и HDMI-HDMI адаптер 90°
MicroSD 16 Gb 10 Class + адаптер
Корпус

И стал перед выбором ОС. Raspbmc или Openelec?


Raspbmc был удобен в плане установки сторонних приложений простым и понятным apt-get install. В Openelec так нельзя, что иногда вызывает ряд неудобств.

После длительного тестирования, остановился на Openelec. Быстрый, легкий и стабильный дистрибутив. Постоянно обновляется.
Актуальную версию можно скачать тут

Инсталяция на карту довольно проста, качаем архив с Openelec, переходим в каталог с архивом
  • cd ~/Downloads
Распаковываем архив: 
  • tar xvf OpenELEC-RPi.arm-4.2.1.tar
Переходим в папку OpenELEC-RPi.arm-4.2.1 
  • cd ~/Downoads/OpenELEC-RPi.arm-4.2.1.tar
Вставляем карту памяти, вводим команду dmesg | tail и видим что карта доступна по пути /dev/sdb 
Запускаем скрипт автоматической установки Openelec на вашу карту: 
  • sudo ./create_sdcard /dev/sdb

После успешной операции не забываем выполнить sync 
Все, вынимаем карту, вставляем в малину, подключаем все необходимые провода и подаем питание. Настраиваем по своему вкусу и цвету XBMC.

Чтобы добавить лицензию или разогнать процессор нужно выполнить
  • mount /flash -o remount,rw
  • nano /flash/config.txt
После всех внесенных изменений выполняем
  • sync
  • mount /flash -o remount,rw
  • reboot

*Стандартный логин и пароль для SSH: 
  • логин: root
  • пароль: openelec
 


Ниже приведен пример моего конфига:

################################################################################
#      This file is part of OpenELEC - http://www.openelec.tv
#      Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#      Inspired and partly copied from:
#  http://youresuchageek.blogspot.fr/2012/09/howto-raspberry-pi-openelec-on.html
#
#  OpenELEC is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 2 of the License, or
#  (at your option) any later version.
#
#  OpenELEC is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with OpenELEC.  If not, see <http: licenses="" www.gnu.org="">.
################################################################################
# Bootloader configuration - config.txt
################################################################################

################################################################################
# Memory (System/GPU configuration )
################################################################################

# default GPU memory split (do not change if you do not know what you are doing)
gpu_mem=256

# SDRAM size based GPU memory split, uncomment and setup to override 'gpu_mem'
# gpu_mem_256=128
gpu_mem_512=256

################################################################################
# Overclocking settings
# WARNING: Do not change/enable if you do not know what you are doing!
#          The System may become unstable or you can have data corruption or
#          you can loose your warranty if you set wrong settings
#
# please read: http://elinux.org/RPi_config.txt#Overclocking_configuration
################################################################################

# Overclock mode settings.
#
# default recommended values are: arm_freq | core_freq | sdram_freq | over_voltage
# no overclocking               :    700   |    250    |    400     |      0
# mode 'Modest'                 :    800   |    300    |    400     |      0
# mode 'Medium'                 :    900   |    333    |    450     |      2
# mode 'High'                   :    950   |    450    |    450     |      6
# mode 'Turbo'                  :   1000   |    500    |    500     |      6

# mode Turbo
arm_freq=1000
core_freq=500
sdram_freq=500
over_voltage=6

# mode Medium
#arm_freq=900
#core_freq=333
#sdram_freq=450
#over_voltage=2

# set to 'force_turbo=1' to disable dynamic overclocking (you can lose your warranty!)
force_turbo=0

# If you have any data corruption using Turbo Mode and overclocking
# try with this setting uncommented
# If this still fails, try to use Medium mode without "over_voltage=2"
# If it ultimately keeps failing, forget about this until it gets fixed
# Use a more conservative mode that will works fine in any cases:
# initial_turbo=30

################################################################################
# Overscan settings
################################################################################

# Make display smaller to stop text spilling off the screen
# see also http://www.raspberrypi.org/phpBB3/viewtopic.php?f=67&amp;t=15700
# overscan_scale=1
disable_overscan=1

# Adapt overscan values to your needs
# overscan_left=57
# overscan_right=59
# overscan_top=20
# overscan_bottom=20

################################################################################
# various settings see also: http://elinux.org/RPi_config.txt
################################################################################

# Force HDMI even if unplugged or powered off
# hdmi_force_hotplug=1

# Doesn't sent initial active source message.
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
# rebooting.
hdmi_ignore_cec_init=1

################################################################################
# License keys to enable GPU hardware decoding for various codecs
# to obtain keys visit the shop at http://www.raspberrypi.com
################################################################################
decode_MPG2=0x46e05b44
decode_WVC1=0xfa6f8d3e
# decode_DTS=0x00000000
# decode_DDP=0x00000000

################################################################################
# End of default configuration
# all values below this line were inserted from config.txt.bk (your old config)
# and can be merged with the above values
################################################################################
#start_file=start_x.elf
#fixup_file=fixup_x.dat





2 коментарі: