mildsunrise / dm500-satip

📡 Kernel & firmware image to turn a DM500 into a SAT>IP server
37 stars 11 forks source link
dreambox firmware-image satip-server tvheadend

dm500-satip

This is an effort to build a firmware image for the Dreambox DM500 set-top-box, that effectively turns it into a fully-operational SAT>IP server, with the only job of streaming the transport stream straight from the DVB tuner.

The SAT>IP server can be accessed directly through various client apps, or can be fed as input to Tvheadend. This last option allows you to:

And many more.

Install

You can download pre-made images from the Releases page, or you can build them yourself, see BUILDING.md.

Building them yourself gives you full control over the generated image: you can add drivers for more devices, add software (such as an SSH server), change the default root password and more.

Some important things to consider:

If you aren't flashing via DreamUp, make sure you flash to partition 0 (labeled "CramFS + SquashFS" or similar).

The static version

Starting at version 2.3, a 'static' image is distributed along with the regular one.

If the regular one won't boot on your box (probably because of corrupted flash memory) try to flash the static one. It's pretty much the same, but uses a read-only FS so it'll probably work correctly.

Because of the read-only FS, all changes you make through SSH (including changing the root password, firewall, static IP, init script) will go away on the next boot. If you need those changes permanently, build your own image.

Also, a different SSH host key is generated on every boot, so you'll need to revoke the key each time SSH gets mad.

Usage

When powered, DM500 will obtain an IP by DHCP, and the SAT>IP server will start. To verify that it's working, browse to http://<ip of DM500>/, you should see a table listing one tuner.

You then use it like any other SAT>IP server. For instance, to use it with a Tvheadend server, put it on the same network and you should see the DM500 appear in the inputs tab.

Important: The SAT>IP server does not support full TS streaming (aka pids=all)! For Tvheadend users, this means you should untick the "Full Mux Rx mode supported" checkbox if it's ticked, in the SAT>IP server entry.

Important: The SAT>IP server does not support more than 29 concurrent PIDs! For Tvheadend users, this means you should set "Maximum PIDs" to 29, in the SAT>IP server entry.

Important: The SAT>IP server does not support DVB-S2 (aka HD channels)! An option has been added in TVHeadend to restrict the delivery systems for a DVB card, set it.

If you found a bug or have a suggestion for the firmware image, feel free to open an issue on this repo.

The DM500 also has an SSH server running, you can login with root and password dreambox. Thus, make sure the DM500 is behind a firewall.

Design

This image is not based on the official firmware. Instead, it's an effort to build a firmware from scratch, basing on the efforts of the (currently abandoned) stbx25xx-linux project, which ported Linux 2.6.28 to the IBM STBx25xx (the SoC in DM500).

I forked the stbx25xx-linux project and added support for the DM500 and a few of its hardware (reverse engineered some of the closed-source drivers). Currently, the following hardware from the DM500 is usable and has been tested:

Hardware that has support but has not been tested, is not enabled in config_kernel or isn't finished:

Unsupported hardware, or hardware which hasn't been investigated:

The files are put into a JFFS2 filesystem, which ends up in the partition next to the CramFS (where a SquashFS would go, in traditional firmwares).

The audio and video decoders need firmware blobs to be supplied, so make sure to enable FW_LOADER and set COPY_FIRMWARE to 1 in build-fs.sh. Support for the video output and audio output are also in the works.

Buildroot is what builds the toolchain, software, kernel, filesystem, and calls build-img.sh to produce the final firmware image.

minisatip is the SAT>IP server implementation used by this image. It's version 0.4 with the modifications at the dm500-satip-2.3 branch in my fork.