RaspberryPi

From LinuxMCE
Jump to: navigation, search

qMDs are still a thing of myth, although seen occasionally in the wild they are elusive and not easily tamed. ;)

Device Specification

  • The Raspberry Pi B 3 is an ARMv7 based computer the size of a credit card. 4x1.2Ghz Cores, 1GB RAM, FastEthernet, 4xUSB, 40xGPIO, Wifi, BT4.1
  • The Raspberry Pi B 2 is an ARMv7 based computer the size of a credit card. 4x900Mhz Cores, 1GB RAM, FastEthernet, 4xUSB, 40xGPIO
  • The Raspberry Pi B 1 is an ARMv6 based computer the size of a credit card. 1x700Mhz Core, 256MB or 512MB RAM, FastEthernet, 2xUSB, GPIO

The recommended device is the RPiB 3. The RPiB 2 runs at a reasonable speed and can support most functions of a LinuxMCE MediaDirector. The RPiB 3 runs about 50% faster in tests than the RPiB 2. The RPiB 3 does not require any inserted media to boot (once configured).

HDMI-CEC Control

Please see Pulse-Eight for HDMI-CEC setup information

Manual Settings

  • Overscan - currently only able to change by manually editing the config.txt file on the sdcard from a u-boot-ed moonpi or in /boot on all other booted moonpis. (See http://elinux.org/RPiconfig)
  • Overscan compensation - currently only able to change by manually editing the config.txt file on the sdcard. In /sdcard/config.txt from a u-boot-ed moonpi, or in /boot on all other booted moonpis. (See http://elinux.org/RPiconfig)
  • Orbiter will automatically regenerate following a reboot if a new display resolution is detected.
  • Audio settings are adjusted in webadmin. Go to Wizard - Devices - Media Directors, scroll to the Media Director you want to alter and select Advanced on the right side. In the Device Data section, set one of the following parameters in the Audio settings field:
S = Stereo 
H = HDMI
H3 = HDMI with passthrough capability for AC3 & DTS

What works

  • Orbiter UI1
  • Photo Screen Saver (need to disable on RPi1)
  • AppServer
  • HAL
  • Embedded phone
  • OMX_Player will play audio and video. You must have the appropriate codecs to play MPG and VC1 media. The codecs can be purchased from the Raspberry Pi foundation.
  • squeezelite can play audio
  • USB-UIRT
  • HDMI-CEC control
  • Generic Serial Devices (only on RPiB 2/3)

What does not work

  • Video Overlays

RPiB Diskless Media Director

Requirements

  • Your core must be LinuxMCE 1204 or higher.
  • The Raspberry Pi must be a Model B Version 1, 2 or 3. The Model A and the RPi Version 1 are not supported.
  • The recommended device is the RPi3. The RPiB1/2 will need an sdcard inserted to use these netboot methods. The RPi3 does not need any inserted medium to boot (once configured).
  • The Raspberry Pi must be connected to the internal side of your LinuxMCE core's network to act as a media director.
  • The Raspberry Pi must be plugged in using the HDMI connector. Set an S (for Analog Stereo) or H (for HDMI) for the Audio Settings for the MD in webadmin.
    • The Raspberry Pi will detect the boot resolution of your display and adjust itself accordingly.
    • If resolution has changed since the last boot the orbiter will be regenerated.
  • You may wish to have a usb keyboard or mouse for orbiter interaction. USB-UIRT/MCE Remote is also possible.

Setup Steps

  • On the Core:
    • Install the default netboot kernel package for a Raspberry PiB 1/2/3 MD. This image will permit you to select from multiple possible RPi Device Templates. These include: RPi MD (DT#2216).
    • edit /usr/pluto/bin/Diskless_CreateTBZ.sh and enable "raspbian_armhf" as the *only* TARGET_TYPE, be sure to comment (use a #) any other TARGET_TYPE lines so that only this one is enabled.
    • run /usr/pluto/bin/Diskless_CreateTBZ.sh to create a raspbian tarball file on your core.
  • On the RPiB client:
    • Enable the usb-boot OTP programmable bit (this blows an e-fuse than cannot be undone) which allows the firmware to attempt usb or network booting from then on.
      • Download this pre-configured image for LinuxMCE: LinuxMCE RPi netboot setup image
      • Un-zip the image and install the resulting image onto an SD card, using dd on linux or win32diskimager on windows
      • Ensure the RPi is connected to the internal lan of your core and boot the RPi.
      • Boot the RPi and it will program the OTP bit for USB and Network booting
      • The rpi will clean the sdcard and automatically reboot to begin the network boot and discovery process.
      • If you are booting an RPiB3 you can remove the sdcard used to set the OTP bit and boot without any attached media.
    • On first boot you may be prompted on existing orbiters to choose a device type MD/qMD/SqueezeOnly, do so. (qMD is not working yet)
    • The device will automatically be created, you will need to reload your router.
    • AVWizard will not appear.
    • You should see the setup wizard and be asked to configure your new MD.
    • The new RPi moonpi should continue installing and eventually present you with a UI1 OnScreen Orbiter.

Please report bugs with *very* specific (package date/svn, etc) information in a ticket.

RPiB Disked Media Director

Requirements

  • Your core must be LinuxMCE 1204 or higher.
  • The following Raspbian based SD cards are bootable on anything that is a Raspberry Pi Model B or higher. RPiB 1 performance is very, very, very slow.
  • This is now an experimental method for attempting to implement wifi MDs on RPi3.

Setup Steps

  • Download the rpi uSD card image (raspbian jessie (recommended) (Updated: 2016-04-29)
  • untar the compressed file (e.g. tar -xvJf lmce-disked-md-rpi2-jessie.tar.xz)
  • Install the resulting image onto an SD card, using dd on linux ( e.g. sudo dd bs=4M if=2015-12-23-raspbian-jessie.img of=/dev/sdb [make sure device name is correct!]) or win32diskimager on windows
  • Ensure the RPi is connected to the internal lan of your core and boot the RPi. Wifi is not currently supported on the RPiB 3.
  • You may be prompted on existing orbiters to choose a device type MD/qMD/SqueezeOnly, do so. (qMD is not working yet)
  • The device will automatically be created, you will need to reload your router.
  • The MD will resize the filesystem to fit the SDCard and then reboot.
  • AVWizard will not appear.
  • You should see the setup wizard and be asked to configure your new MD.
  • The new RPi moonpi should continue installing and eventually present you with a UI1 OnScreen Orbiter.
  • Please report any bugs with *very* specific (package date/svn, etc) information in a ticket.

If you have any issues you can ssh to the rpi with: ssh moonXX -c aes128-ctr (replace the XX with the device number. you currently have to specify the cipher https://git.linuxmce.org/linuxmce/linuxmce/issues/2451 )

RPi1 (u-boot)

NOTE: Due to kernel updates the RPi1 is no longer supported as a u-boot based LinuxMCE Diskless style device.  If you wish to continue working on RPi1 support please contact us.

The Raspberry Pi v1 B/B+ will not be supported for much longer, but can be used as a minimal diskless Media Director within LinuxMCE. The following instructions will show how to create a diskless MD. Newer Raspberry Pis are not compatible with this method of PXE booting.

When using the sdcard below the RPi will be overclocked using the standard Raspberry Pi foundation overclock settings. These are throttled automatically as thermally required. You are free to overclock the device further by editing the config.txt file on the sdcard.

Requirements

  • Your core must be LinuxMCE 1204 or higher.
  • The Raspberry Pi must be a 512MB Model B (or B+). The Model A and the 256MB Model B do not have enough RAM to boot into Orbiter.
  • The Raspberry Pi must be plugged into the internal side of your LinuxMCE core's network to act as a media director.
  • The Raspberry Pi must be plugged in using the HDMI connector and using HDMI sound. Set an S (for Stereo) or H (for HDMI) for the Audio Settings for the MD in webadmin.
    • The Raspberry Pi will detect the boot resolution of your television and adjust itself accordingly.
    • If resolution has changed since the last boot the orbiter will be regenerated.
  • You may wish to have a usb keyboard or mouse for orbiter interaction. USB-UIRT/MCE Remote is also possible. but must be installed using the webadmin (device detection is working but the device is not added currently).

Setup Steps

  • On the Core:
    • Install the default PXE kernel package (lmce1) for a Raspberry Pi MD. This image will create an RPi MD (DT#2216) only.
    • -- To be able to choose betwen an RPi MD and an RPi qMD (as well as other possible rpi Device Templates) at MD creation use this (lmce2) as the default image instead. This image will allow you to choose from multiple RPi based image including RPi MD (DT#2216), RPi qMD (DT#2281) and others.
    • edit /usr/pluto/bin/Diskless_CreateTBZ.sh and enable "raspbian_armhf" as the only TARGET_TYPE, be sure to comment (use a #) any other TARGET_TYPE lines so that only this one is enabled.
    • run /usr/pluto/bin/Diskless_CreateTBZ.sh to create a raspbian tarball, and sdcard.zip file on your core.
  • Get the LinuxMCE Raspberry Pi MD SD card contents.
    • Download the zip
      • Format the SD card for VFAT using the SD card formatter for Mac or Windows https://www.sdcard.org/downloads/formatter_4, or using mkfs.vfat on linux.
      • Copy the entire contents of the sdcard zip to the newly formatted SD card, all files should be in the root directory of the card with no sub-directories.
  • Insert the SD card into the Raspberry Pi.
  • Power up the Raspberry Pi.
  • On first boot the u-boot bootloader will start, it will try to grab various different pxe files until it finally finds the default PXE kernel and initrd.
  • The kernel will boot, there is a 10 second delay when activating the ethernet drivers to allow for the hardware to respond properly, this delay only occurs during the default kernel/initrd boot.
  • Raspberry Pi will display "Announced ourselves to the router".
    • If you have the lmce1 default image installed (see above,) the core will run Diskless_Setup to prepare an RPi MD.
    • If you have the lmce2 default image installed (see above,) you will be prompted on existing orbiters to select the type of RPi device you would like installed. Once you have made your selection the core will run Diskless_Setup to prepare the device.
  • The Raspberry Pi will reboot automatically once Diskless_Setup completes properly.
  • You should go to an existing orbiter and 'Reload the Router' after this point. You will be prompted to do so eventually on the moonPi, if you have not already done so.
  • On the second boot (called the 'FIRSTRUN') the bootloader on the sdcard will be updated to the version on the diskless image.
  • The Raspberry Pi will reboot again.
  • On the third boot LinuxMCE will slowly come to life. Please be patient, this can take up to 45 minutes. You will be presented with the Setup Wizard after ConfirmDependencies has finished installing all ancillary packages.

RPi2 Core

This section is meant for informational purposes only and is not intended to suggest that the RaspberryPi2 would make a good core. There is NO support for this.

  • Download an Ubuntu Trusty Tahr 14.04 image for the RPi2 from http://www.finnie.org/software/raspberrypi/2015-04-06-ubuntu-trusty.zip.
  • Unzip it and write it to an sdcard.
  • Boot and resize the filesystem to fill the sdcard:
    • There are no Raspbian-specific utilities included, specifically no automatic root resizer. However, it's not hard to do manually. Once booted:
$ sudo fdisk /dev/mmcblk0
    • Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the system, then:
$ sudo resize2fs /dev/mmcblk0p2
  • Add the following linuxmce repo's to your /etc/apt/sources.list:
deb http://deb.linuxmce.org/ubuntu/ trusty main
deb http://deb.linuxmce.org/ trusty main
  • Run:
apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --allow-unauthenticated lmce-core
  • reboot
  • Feel free to play. This is not, and will never be, supported.