Results 1 to 2 of 2

Thread: Dreambox Development & Programming

  1. #1

    korn's Avatar
    Join Date
    Dec 2010
    Location
    SatDreamGr
    Posts
    51,788
    Rep Power
    2484984

    Dreambox Development & Programming

    Dreambox Development & Programming






    Dreambox Development & Programming

    Enigma 2 development toolchain
    Introduction

    As of now, this is only a very brief “hands-on” tutorial to get you started with Enigma 2 hacking.
    Table of contents

    * 1. The generic FAQ
    o 1.1 What is Enigma 2?
    o 1.2 Aren’t there similar DVR applications for Linux already? Why the need for yet another such project?
    o 1.3 What happened to Enigma 1?
    o 1.4 Can I replace the Enigma 2 software with something else?
    o 1.5 Where does Enigma 2 live on my Dreambox?
    o 1.6 What does a typical Enigma 2 flash image contain?
    o 1.7 How do I go about customizing my setup and the contents of the flash images?
    * 2. The developer-oriented FAQ
    o 2.1 What is Enigma 2 made of?
    o 2.2 If I want to hack, compile and test out custom versions of Enigma 2, or create complete custom NFI images to my liking, what are my options?
    + 2.2.1 Writing a plugin for Enigma 2
    + 2.2.2 In-place hacking of the Python components of Enigma 2
    + 2.2.3 Modifying and recompiling the C++ binary part of Enigma 2
    + 2.2.4 Creating new, customized NFI images that contain a complete, ready-to-flash Linux system with Enigma 2 and other software
    o 2.3 Where do I get the Enigma 2 source code?
    o 2.4 Isn’t all this cross-compile stuff a bit complicated?
    * 3. Installing the OpenEmbedded toolchain and building the binaries
    * 4. Exploring the build environment
    o 4.1 Some interesting directories
    * 5. More information

    1. The FAQ
    1.1 What is Enigma 2?

    When you switch on your DM 7025 and start watching or recording tv shows, Enigma 2 is the application that you see on the tv screen. Enigma 2 receives and processes the button push events from the remote, draws the menus and the windows on the screen, changes the channels and, overall, handles all the interaction with the user. For a remote-contoller wielding couch potato, Enigma 2 is what the DM 7025 is.

    But Enigma 2 is not all there is to a DM 7025. There is also the underlying Linux system: with a kernel, drivers, command-line tools, server applications (such as Samba), scripts, shared libraries, a package management system, etc. Together, all these various bits and pieces form the base upon which Enigma 2 is running. Of course, most of these other components are running in the background, deep in the bowels of the device – invisibly, as far as the end user is concerned – but without them the Enigma 2 software wouldn’t work.

    In other words, Enigma 2 is a Linux application. It cannot exist alone; it is not a stand-alone “firmware” that would directly access the set-top box hardware at the register level and run independent of any external OS. The firmware images you can download from Dream Multimedia are actually full-fledged mini Linux distributions, with the Enigma 2 application running on the top.

    1.2 Aren’t there similar DVR applications for Linux already? Why the need for yet another such project?

    Yes, there are other Linux software packages that provide TV viewing and digital video recorder (DVR) functionality – much in the same way as Enigma 2 does. Popular examples of these include VDR and MythTV. Enigma 2 is similar to these projects in many ways, but differs in that it was written for set-top box style hardware from the get-go.

    The target platform for Enigma 2 is an embedded environment: something that typically has much less raw processor power and memory than a generic Linux PC. VDR and MythTV, on the other hand, are more geared towards the so-called “home theater PCs”, or HTPCs. These systems can often be quite powerful or even fully on-par with modern desktop PCs, in terms of processor power and available memory.

    1.3 What happened to Enigma 1?

    Enigma 2 is a rewrite of Enigma 1 (or mere “Enigma”), which is another, older set-top box-oriented DVB viewer and DVR application. Without delving too much into historical details, it suffices to say that Dream Multimedia still ships many of the other Dreambox models with Enigma 1, and develops and maintains this “old” branch of Enigma, too. The DM 7025, however, was shipped with the all-new Enigma 2, and the upcoming DM 8000 is expected to be shipped with Enigma 2 as well.

    The most striking difference between the two Enigmas is that Enigma 1 is a C++ application through-and-through whereas Enigma 2 only has a relatively compact C++ core for the lower level stuff and handles much of its internal logic in Python. For instance, in Enigma 2, the user interface logic and menu structures are all handled by Python modules and they could be completely rewritten by merely altering the Python code. In Enigma 1, similar changes would require altering the C++ code and recompiling the binary. In addition to that, Enigma 2 also includes a new plugin interface that allows writing plugins as Python modules. The old Enigma 1 only allowed binary plugins.

    I do not know the original reasoning behind developing a new, rewritten version of Enigma, but apparently the old C++ codebase of Enigma 1 was somewhat messy and hard to maintain, and it does not handle multiple tuners and DVB multiplexes too gracefully. These points alone could explain the need for something new.

    The Python-orientedness of Enigma 2 makes rapid development and changes in the user interface logic easier, and it should also make plugin development much more accessible to the end-users.

    Thanks to mfaraj57


  2. #2

    korn's Avatar
    Join Date
    Dec 2010
    Location
    SatDreamGr
    Posts
    51,788
    Rep Power
    2484984

    Απ: Dreambox Development & Programming

    Συνέχεια....



    1.4 Can I replace the Enigma 2 software with something else?

    Most certainly! Many individuals and groups have released customized, “unofficial” versions of Enigma 2 for the DM 7025. These are typically offered for download on various Dreambox-related forums and file archives. You may have encountered names such as Gemini 2, OoZooN, Boxman, etc. when searching the web for Dreambox-related information.

    To be honest, these are often little more than just a repackaged version of Enigma 2: compiled from the latest CVS source code and distributed together with some preinstalled plugins, new skins, modified boot-up screen graphics, and possibly a bit different set of preinstalled Linux command line tools and services. There may be some nice extra touches, such as being able to download a large number of all kinds of plugins straight off the Internet, from some unofficial file server, using only your remote and tv set, and they may even have some superficial little changes in the way how the user interface works, but it’s still basically the same old Enigma 2 underneath, so the user experience is pretty much the same where it counts – just with more bells and whistles.

    In addition to these kind of tune-up style customizations, there are also more serious attempts at creating something that completely replaces Enigma 2. One of the most prominent examples would probably be Neutrino. And nothing – in theory, at least – would prevent you from porting over the common Linux DVR applications, such as VDR or MythTV, if you feel you would rather use them and their codebase. Or you might even abandon the idea of watching tv completely and run something totally different on the same hardware, such as a version of MAME, or a web browser, or a VNC client, or whatever.

    If the documentation for the hardware was openly available (i.e., if you had a documented register-level access to all the features of the Xilleon 220 chip), it would even be possible to write your own drivers, and run something that is not Linux-based at all, but this does not currently seem like an option.

    Then again, despite all these alternative paths you could explore, Enigma 2 seems to work pretty nicely (for the purpose it was built!) as it is – as a DVB set-top box user interface, and a flexible, multi-tuner DVR. As far as watching tv shows and recording them goes, there is no pressing need to abandon Enigma 2 and move on to something else. On the contrary, it would be nice if people would develop more for the basic Enigma 2 (patch the bugs, create new functionality and new plugins, make them accepted in the upstream, etc.), and if they would also release their doings more often with the source code and proper documentation.

    1.5 Where does Enigma 2 live on my Dreambox?

    The DM 7025 contains 32 MB of internal flash memory. In the standard factory setup, all supplied software is stored in there, and the device boots from the flash. New firmware/software releases for the DM 7025 are typically distributed as NFI images (“NAND Flash Image”), which are flashed directly in this space. This is for ease of use – the user can simply flash a premade image into the device and gets a working set-top box: a complete Linux system that boots straight into Enigma 2.

    The internal flash is not the only option for booting, though. The DM 7025 can boot over the network, or from a CompactFlash card, or from the HDD. Even multi-boot configurations are possible. This might come handy, for instance, if you want to test out several alternative software versions for a longer period of time, or keep an image that is under development separate from the image you use for your day-to-day tv viewing. However, booting from the 32 MB internal flash is the default if you use the standard Enigma 2 images supplied by Dream Multimedia.

    1.6 What does a typical Enigma 2 flash image contain?

    What goes in a typical Dreambox flash image? When using Enigma 2, the NFI images contain, at minimum, a small Linux distribution and the Enigma 2 application itself, of course – the binaries, the Python modules, the data files such as skins and configuration files, etc. Enigma 2 is typically configured to autostart on boot.

    In standard Dream Multimedia images, Enigma 2 is launched from /etc/inittab. The standard Dream Multimedia Enigma 2 images also come with a Samba server, an SSH server, a telnet server, an FTP server, a text editor (joe), etc. – and a BusyBox shell environment, to name but a few features. You can log into your DM 7025 and use scp for transferring files, for example. It is also possible to mount NFS and Windows (SMB/CIFS) network shares – i.e., the kernel comes with the necessary modules to support that.

    1.7 How do I go about customizing my setup and the contents of the flash images?

    The flash filesystem is writable, at least in the standard Dream Multimedia images. This means that the end user can, after the initial flashing, install more software in the flash, such as Enigma 2 plugins or individual Linux software packages, simply by copying files over. It is also possible to tweak the low-level configuration files – even in-place, using the supplied text editor. Of course, if a new flash image is written in the memory over the previous one it will erase all these modifications.

    Thanks to mfaraj57

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Development build update stuck in boot
    By mackis in forum SatDreamGr Images Chat
    Replies: 1
    Last Post: 31-01-18, 08:07
  2. Prismcube Ruby Development version change log
    By ilias in forum PrismCube
    Replies: 1
    Last Post: 27-02-14, 19:13
  3. Dreambox 800HD με sim2.01 kai Dreambox 8000HD
    By kossof in forum Μικρές αγγελίες
    Replies: 3
    Last Post: 27-08-13, 00:06
  4. End of Pcd Enigma2 Image Development
    By korn in forum ..Περί Dreambox Enigma2
    Replies: 0
    Last Post: 21-08-11, 21:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •