3 Andreas Oberritter <obi@opendreambox.org>
10 1.2 Supported products
12 1.4 Obtaining the source code
14 1.6 Directory structure
15 1.6.1 openembedded-core and meta-openembedded
16 1.6.2 meta-opendreambox
21 4 Major changes since previous public releases
22 4.1 Changes since release 1.6
23 4.2 Changes since release 2.0
24 4.3 Changes since release 2.2
26 6 Building OpenDreambox
28 6.2 Configuration variables
29 6.2.1 BB_NUMBER_THREADS
32 6.3 Adding custom layers
33 6.4 Adding custom options
34 6.4.1 DISTRO_FEED_PREFIX
37 6.5 Setting up a build directory
38 6.6 Building a firmware image
39 6.7 Building a package
41 7.1 Cross-compilation of external software
43 7.3 Package architecture
44 8 Bug reports and patches
48 This document briefly describes the OpenDreambox distribution, an embedded
49 Linux distribution for Set-Top-Boxes manufactured by Dream Property GmbH.
51 OpenDreambox is based on the OpenEmbedded build framework, which uses BitBake
52 to transform build instructions into distributable firmare images and software
55 The current version, OpenDreambox 2.5, is based on the Yocto Project, release
56 2.1 ”Krogoth”, an umbrella project for OpenEmbedded and related tools.
60 Developers familiar with previous versions of OpenDreambox or OpenEmbedded in
63 1.2 Supported products
65 The current version includes support for the following products:
67 +-----------------------------------------------------------------------------+
68 | -------------------------- | ------------------------------------------ |
69 |Product name |Environment variable |
70 | -------------------------- | ------------------------------------------ |
71 |DM900 ultraHD |MACHINE=dm900 |
72 |DM525 COMBO |MACHINE=dm520 |
73 |DM525 S2 CI slot |MACHINE=dm520 |
74 |DM525 C/T2 CI slot |MACHINE=dm520 |
75 |DM520 S2 |MACHINE=dm520 |
76 |DM520 C/T2 |MACHINE=dm520 |
77 |DM7080 HD |MACHINE=dm7080 |
78 |DM820 HD |MACHINE=dm820 |
79 | -------------------------- | ------------------------------------------ |
80 +-----------------------------------------------------------------------------+
84 Copyright (c) 2016 Dream Property GmbH, Germany
87 Permission is hereby granted, free of charge, to any person obtaining a copy
88 of this software and associated documentation files (the "Software"), to deal
89 in the Software without restriction, including without limitation the rights
90 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
91 copies of the Software, and to permit persons to whom the Software is
92 furnished to do so, subject to the following conditions:
94 The above copyright notice and this permission notice shall be included in
95 all copies or substantial portions of the Software.
97 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
99 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
100 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
101 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
102 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
106 1.4 Obtaining the source code
108 OpenDreambox uses the Git version control system. To obtain the source code, it
109 is required to install Git. See http://git-_scm.com/.
111 To initially download the source into the current directory, issue the
114 git clone -b krogoth git://git.opendreambox.org/git/opendreambox.git
116 The Git repository can be viewed online at:
118 http://git.opendreambox.org/?p=opendreambox.git
124 make -C opendreambox image
126 If this command fails, prerequisites may be missing. See section 3.
128 1.6 Directory structure
130 OpenDreambox consists of a set of layers containing build instructions. This
131 meta data is used by BitBake to download and compile source code and to
132 assemble installable software packages and firmware images.
134 Currently, these layers are used:
137 * meta-openembedded/meta-filesystems
138 * meta-openembedded/meta-multimedia
139 * meta-openembedded/meta-networking
140 * meta-openembedded/meta-oe
141 * meta-openembedded/meta-python
142 * meta-openembedded/meta-ruby
143 * meta-openembedded/meta-webserver
145 * openembedded-core/meta
147 If a recipe for the same package exists in multiple layers, then the higher
148 priority layer takes precedence over the lower priority layer.
150 For example, if libmad_0.15.1b.bb existed in both meta-openembedded and
151 openembedded-core, the recipe in meta-openembedded would be used, because
152 openembedded-core has lower priority. Priority values are determined by the
153 variable BBFILE_PRIORITY in conf/layer.conf of each layer.
155 NOTE: This would still be true even if the version of libmad in
156 openembeded-core was higher than the version in meta-openembedded, unless
157 PREFERRED_VERSION_libmad was set to the version in openembedded-core. There is
158 currently no way to prefer a version of a lower priority layer, if the same
159 version is present in a higher priority layer.
161 1.6.1 openembedded-core and meta-openembedded
163 These directories contain copies of Git repositories from git.openembedded.org,
164 including the OpenEmbedded-Core layer and the (Meta-)OpenEmbedded layers. They
165 get created automatically when building the distribution for the first time.
167 Throughout this document, the combination of these directories will be referred
170 The latest changes to these Git repositories can be seen at:
172 http://git.openembedded.org/openembedded-_core-_contrib/log/?h=obi/krogoth
174 http://git.openembedded.org/meta-_openembedded-_contrib/log/?h=obi/krogoth
176 1.6.2 meta-opendreambox
178 This directory contains:
179 * Recipes for packages written specifically for the OpenDreambox distribution
180 * Modifications to recipes from OpenEmbedded
181 * Recipes for software versions older than those available from OpenEmbedded
182 * Recipes for software versions newer than those available from OpenEmbedded
186 The directory meta-dreambox contains Board Support Packages (BSP) for the
187 supported Dreambox models. This includes:
189 * Machine specific overrides
196 * The Yocto Project Reference Manual:
197 https://www.yoctoproject.org/docs/2.1/ref-_manual/ref-_manual.html
201 3.1 Required software
203 The OpenEmbedded project provides a general list of prerequisites for many
204 Linux distributions and also for some other operating systems.
205 * http://www.openembedded.org/wiki/Getting\_started#Required\_software
207 It is highly recommended to use Linux to build OpenDreambox. In theory, any
208 recent distribution will do, but not many distributions have been verified to
209 build OpenDreambox without errors. Tested distributions include:
210 * Debian 8.6 ”Jessie” [amd64]
211 * Ubuntu 16.04.1 LTS ”Xenial Xerus” [amd64]
213 4 Major changes since previous public releases
215 4.1 Changes since release 1.6
217 * Recipes were split across multiple layers and categorized.
218 * env.source has been replaced by two files, bitbake.env and
219 cross-compile.env. The former sets a minimal environment that is needed to
220 execute bitbake. The latter creates machine-specific command aliases, in
221 order to compile external software.
222 * All machines share a common tmp directory.
223 * ${MACHINE}/build directories were renamed to build/${MACHINE}.
224 * Kernel packages were renamed from linux-${MACHINE} to linux-dreambox.
225 * Support for machines based on ATI Xilleon or IBM STB was dropped.
227 4.2 Changes since release 2.0
229 * Added support for DM520, DM525, DM820 and DM7080.
230 * If a recipe changes, the corresponding packages will be rebuilt
231 automatically, in contrast to required manual PR bumps in the past.
232 * Each machine uses its own tmp directory again, like before 2.0. However,
233 there is a shared sstate-cache, which allows to share already compiled data
234 between compatible machines. This impacts performance and size of the build
235 system, but improves reliability and consistency across builds.
236 * Support for machines without FPU and kernel versions below 3.x was dropped
238 * Layers under meta-bsp were combined into meta-dreambox.
239 * Default package format switched from ipk (opkg) to deb (dpkg + apt).
240 * dreambox-image was renamed to include the package format
241 (dreambox-image-deb).
243 4.3 Changes since release 2.2
245 * Added support for DM900.
246 * Machines with low memory were dropped (DM500HD, DM800SE).
247 * Switched from Qt4 to Qt5.
251 * Unsupported machines present in meta-dreambox (DM500HDv2, DM800SEv2,
252 DM7020HD, DM7020HDv2, DM8000) are known not to work unless booted with a
253 kernel of release 1.6, which however shows incompatibilities with systemd.
254 Additionally, there appear to be problems rendering the user interface.
256 6 Building OpenDreambox
258 In the top level directory, there is a Makefile, which is used to set up build
259 directories and to fetch or update all used repositories. The Makefile can be
260 influenced by environment variables, either by specifing them on the
261 command-line or by storing them in a file called conf/make.conf. It is not
262 recommended to edit the Makefile directly in order to avoid conflicts with
265 When the Makefile is run for the first time, the following steps will be
267 * Creation of configuration files
269 * conf/opendreambox.conf
270 * build/${MACHINE}/conf/bblayers.conf
271 * build/${MACHINE}/conf/local.conf
272 * Update or checkout of Git repositories
279 Run make help to get a list of targets of the top level Makefile, together with
282 6.2 Configuration variables
284 6.2.1 BB_NUMBER_THREADS
286 Controls how many BitBake tasks may run at a time. Defaults to the number of
287 cores available on the build system.
291 Controls the target machine to build packages for. See section 1.2 for a list
292 of supported products.
296 Controls how many processes per recipe make may use. Defaults to the number of
297 cores available on the build system.
299 6.3 Adding custom layers
301 It is possible to add custom layers to the build system. This can be done
302 globally and per machine. To add a layer globally, edit conf/bblayers-ext.conf.
303 To add a machine-specific layer, edit conf/bblayers-${MACHINE}-ext.conf.
304 Assuming that an additional layer is available at ${HOME}/custom-layer, the
305 entry to add to the file will look like this:
307 BBLAYERS =+ "${HOME}/custom-layer"
309 6.4 Adding custom options
311 It is possible to tweak a lot more options than those used by the Makefile by
312 editing conf/local-ext.conf or conf/local-${MACHINE}-ext.conf.
314 For example, if the firmware shall use the package feed built on the develoment
315 machine, which happens to be 192.168.1.1 and has a webserver configured to
316 point to tmp/deploy/ipk, a line like the following may be added:
318 DISTRO_FEED_URI = "http://192.168.1.1/${DISTRO}/${DISTRO_VERSION}"
320 In general, any variable in OpenEmbedded that uses weak assignment (?=) may be
321 overridden from these files.
323 The following sections list some commonly used options.
325 6.4.1 DISTRO_FEED_PREFIX
327 DISTRO_FEED_PREFIX specifies the name of the package update feed. This name may
328 be chosen arbitarily.
330 Default: DISTRO_FEED_PREFIX = "remote"
332 6.4.2 DISTRO_FEED_URI
334 DISTRO_FEED_URI specifies the URI of the package update feed.
336 Default: DISTRO_FEED_URI = "http://my-distribution.example/remote-feed/"
340 INHERIT specifies bbclasses to include from a configuration file. Usually, this
341 variable gets appended to by using the += operator.
343 The OpenDreambox distribution automatically appends "buildhistory
344 recipe_sanity" to INHERIT.
346 Default: INHERIT = ""
350 Always build the latest versions of OpenDreambox-related projects from Git:
352 INHERIT += "opendreambox-autorev"
354 6.5 Setting up a build directory
356 To set up a build directory for e.g. DM 7080 run make MACHINE=dm7080. If
357 MACHINE=dm7080 has been set in conf/make.conf (default: dm900), you can simply
358 run make with no arguments instead. This will create and initialize the
359 directory build/dm7080.
361 6.6 Building a firmware image
363 To build a firmware image for e.g. DM 7080 run make MACHINE=dm7080 image. If
364 MACHINE=dm7080 has been set in conf/make.conf (default: dm900), you can simply
365 run make image instead.
367 6.7 Building a package
369 To build a single package, BitBake has to be used directly. First, the
370 environment has to be set up, in order to make BitBake available to the shell.
371 This can be done with the following command:
375 BitBake must be run from the machine’s build directory. For DM 7080 run:
379 In order to build enigma2, run:
385 7.1 Cross-compilation of external software
387 OpenDreambox provides a script called cross-compile.env. Once run, the script
388 will create the following commands (shell aliases), aiming to ease
389 cross-compilation of external source trees:
390 * oe_autoreconf - Calls OE’s version of autoreconf. Useful for projects based
392 * oe_runconf - Calls ./configure with parameters suitable for OE. Useful for
393 projects based on GNU autotools.
394 * oe_runmake - Calls make with parameters suitable for OE. Useful for
395 projects based on GNU autotools or GNU make.
396 * oe_env - Useful to execute arbitrary commands in the OE environment (e.g.
398 * oe_setenv - Exports the OE environment to the currently running shell
401 The script needs to know the target machine, which can be one of the supported
402 products (see 1.2). Because the script adds aliases to your currently running
403 shell session, it has to be invoked using source or . (the dot operator), e.g.:
405 source cross-compile.env dm7080
407 The script may be called from any location, but must reside inside the
408 OpenDreambox Git tree. You may want to create a symlink to cross-compile.env
409 somewhere in your PATH.
413 Run scripts/do_stylize.sh on new recipes to ensure proper coding style.
415 7.3 Package architecture
417 Set PACKAGE_ARCH = "${MACHINE_ARCH}" if either condition is met:
418 * The recipe uses COMBINED_FEATURES, MACHINE_FEATURES or DREAMBOX_FEATURES.
419 * The recipe uses COMPATIBLE_MACHINE.
420 * The recipe is part of meta-dreambox.
422 8 Bug reports and patches
424 Please send bug reports to bugs@opendreambox.org and patches to
425 patches@opendreambox.org.
427 A comfortable way to create patches is to use git format-patch, after all
428 changes have been committed to your local copy of the repository.