07.02.2020

Mythtv Install Howto

56
  1. Mythtv Install How To Get

Contents.IntroductionFor most people, it will be far easier to install a pre-built package for MythTV rather than building from source. Reasons for building from source include:. There is no pre-built package for your Linux distribution.

The pre-built package for your distribution is out of date. You want to run a pre-release version of the software. Users choose to test/write patches.If you have already installed a pre-built package and you have a need to try out a source code change, it would be preferable to use your distribution's build process to build a version that is compatible with the already installed version. There are differences in the placement of files between the downloaded packages and the code you build yourself.This guide shows how to build from source code downloaded from github.Raspberry PiStarting from version 0.28 It is possible to build and run MythTV frontend on a Raspberry Pi 2 or Raspberry Pi 3. Since the Raspberry Pi has limited resources there are some steps you can take to ensure a successful build.I strongly recommend using Raspbian rather than Ubuntu for building and running MythTV. Raspbian is optimized for multimedia and provides a more stable environment and better performance for applications that use OpenMAX and OpenGL ES.Setting up a Raspberry Pi for building MythTVBefore attempting to build you should take these steps.Install the operating system on an external USB hard drive.Use a hard drive that has its own power supply.

Install

If you have an old hard drive around that you no longer use you can buy a USB enclosure for it. You need a hard drive of 50 GB or more.These steps can be done on the Raspberry Pi itself but are easier if done from an desktop computer running Linux. Install your Raspberry Pi operating system on an SD card as normal. If you are going to use the Raspberry Pi to prepare the hard drive you will need to prepare a second SD card. Make sure your SD cards boot correctly into the operating system.

Partition your hard drive. Create an ext4 partition of at least 50 GB for your operating system. I recommend using gparted. Format it as ext4 (gparted can do that for you). Copy your SD card contents to the new hard drive partition. If you are using the Raspberry Pi to do this do not copy the SD card from which you are booted.

Mythtv Install How To Get

You will need an SD card reader plugged into a USB port to read the SD card that you are copying from. Use lsblk to determine the device names.

If you are running a Graphical environment it may automatically mount the devices. Otherwise mount them in an appropriate place. On the SD card you are copying from use the second partition (e.g. /dev/sda2).sudo cp -av /source/directory/. /dest/directory/. Edit the /boot/cmdline.txt file on the SD card you are copying from.

Change the parameter root=/dev/mmcblk0p2 to root=/dev/sda1. If you are not using the first partition on the hard drive change sda1 to the correct partition. Edit the /etc/fstab file on the hard drive. Find the line for the root mount. Change the device name at the beginning of the line from /dev/mmcblk0p2 to /dev/sda1, or the correct hard drive partition.

Shut down your Raspberry Pi, insert the SD card you were copying from, and plug in the external hard drive. Make sure you do not have another drive or USB Card reader plugged in.

The Raspberry Pi will now boot with the hard drive as root partition.Swap spaceI had previously recommended creating a large swap area. However it is far better to avoid swapping altogether, by limiting the build to 3 processes. Once the system starts swapping, performance becomes ridiculously poor.Reduce GPU memoryEdit /boot/config.txt and comment out the gpu memory line when building#gpumem=256Setup ccacheAfter installing the prerequisites make sure there is enough ccache as followsccache -M 5G -F 0With all of these steps in place, the first build of MythTV will take around 2 hours on a Raspberry Pi 2.

Subsequent builds can take as little as 2 minutes. With ccache, even a full rebuild can complete in 10 minutes, because it caches the compiler results and if the source does not change it re-uses them.DependenciesOne of the most difficult parts of building the code is getting the correct dependencies installed first. The syntax for installing these will vary from one distribution to another, and package names may also vary between distributions.Installing Build Dependencies with AnsibleMythtv now has Ansible playbooks to set up build dependencies. These support many Linux variants and will easily install your build dependencies. Follow the following steps to install build dependencies. Install git using your distribution package system. Follow steps described at.

Mythtv Install Howto

For MythTV version 0.28 onwards, use the option 'For a normal development system running Qt5'. For earlier versions use 'For a normal development system running Qt4'. All of the commands listed on that page must be run as root or with sudo. Note that 0.27 can run with either QT4 or QT5, and the choice will depend on what is available with your release of Linux.Installing Build Dependencies without AnsibleIt is recommended to use Ansible, because that will be kept up to date.

utlogoboss – 2020