User Tools

Site Tools


rpidtv
Introduction

This is a description of how to build an RDKv4 hybrid image for the Raspberry Pi 3 Model B/B+ that includes DVBCore and the DTV related RDK modules. To use the resulting image a USB DVB tuner will be needed, along with the appropriate firmware file, as this isn't provided in the RDK repositories. The firmware for many devices can be obtained from LinuxTV.org.

Build Environment

The build environment is based on a 64-bit Ubuntu 16.04 installation and should be set up as defined for a Yocto 2.2 (Morty) release on the RDK wiki page. As a guide, a build on a PC with a 4th generation Intel Core i7 processor and 16GB RAM takes around 3 hours when building for the first time, and requires 80-100GB disk space.

Building the image

You need to be an RDK member to access the build repositories. The image to be built is on the RDK-V rdkv-2021q1 release.

All commands to be run directly are shown in italics.

  1. Create a directory for the build, into which the RDK recipes and source files will be downloaded. This will be referred to as <RDK_ROOT> from now on.
  2. cd <RDK_ROOT>
  3. Checkout the release to be built, where 'rdkv-2021q1' is the name of the branch.
    • repo init -u https://code.rdkcentral.com/r/manifests -b rdkv-2021q1
  4. repo sync --no-clone-bundle
  5. source meta-cmf-raspberrypi/setup-environment
  6. Select the “meta-cmf-raspberrypi/conf/machine/raspberrypirdkhybriddtv.conf” configuration (option 19).
  7. bitbake rdk-generic-hybrid-dtv-image
Flashing the image

When the build has completed, the following steps can be followed to install and run the image on the Pi. It's assumed this is being done from a Linux desktop, so the instructions will be different for other operating systems.

  1. The image to be flashed will be found in <RDK_ROOT>/build-raspberrypirdkhybriddtv/tmp/deploy/images/raspberrypirdkhybriddtv. The actual name of the image to be used contains the build date and time and is of the form 'rdk-generic-hybrid-dtv-image_default_<datetime>.rootfs.rpi-sdimg'.
  2. The Pi's SD card needs to be inserted into a card reader on a PC that also has access to the above sdimg file.
  3. If the SD card already contains partitions with valid filesystems then they will probably be mounted, so all partitions need to be unmounted, leaving the card still accessible at the device level.
  4. Copy the image to the SD card using the following command, ensuring the correct device name is used in place of 'sdX' for the SD card:
    • sudo dd if=rdk-generic-hybrid-dtv-image_default_<datetime>.rootfs.rpi-sdimg of=/dev/sdX conv=sync
  5. When the copy is complete, the partitions on the SD card will probably be auto mounted. At this stage the firmware for the USB tuner can be copied to the SD card, or it can be done after the Pi has booted up. The firmware file(s) need to be copied to '/lib/firmware' in the Pi's root filesystem.
  6. Select the option to eject the SD card from the Linux desktop, insert it into the Pi, connect it to a TV/monitor over HDMI, connect the USB tuner and a USB keyboard, and power on the Pi.
  7. If the USB tuner firmware wasn't installed above, then it can be done now, either by copying the firmware from a USB drive on the Pi, or by copying it across the network (assuming the Pi is connected to a wired network). Either way, you will need to find the IP address of the Pi by some means, probably from whatever is acting as a DHCP server on the network.
  8. You can login to the Pi (no password) using 'ssh' to copy the file from a USB drive:
    • ssh root@<Pi's IP ADDR>
  9. To copy the firmware file(s) over the network (no password), do:
    • scp <firmware file(s)> root@<Pi's IP ADDR>:/lib/firmware
Running the image

Occasionally the DTV application doesn't launch on start-up, but this can be resolved by logging in to the Pi using 'ssh' again and typing the following:

  • systemctl restart dtvapp
rpidtv.txt · Last modified: 2022/08/22 13:02 by steve