Compile your own OpenPli (using Ubuntu)

There are 16 replies in this Thread which was already clicked 10,420 times. The last Post () by el_es.

  • OpenPli Ubuntu build howto


    NEW OPENPLI 3.0 section


    Openpli ubuntu build server setup quick howto


    As getting a working setup took some trial and error, loads of googling, pli-wiki and pli-searching owh yeah and compiling a build takes some time.................................................


    Might as well use it to do some howto work to help people out.


    Please comment or feel free to commit useful stuff to the OpenPli Wiki


    This howto describes howto quickly setup a ubuntu-12.04 and howto configure it to build OpenPLi images. This in NOT a howto about virtualisation or installing ubuntu-12.04 only brief remarks will be made about this. Goal is to do this with a minimal version of ubuntu-12.04 able to build a OpenPli image, also to check all necessary ubuntu-packages. Which could be useful to help create a single *.deb like package for an even faster setup working systems in the future.


    Although it's written for Unbuntu, the same should apply for Debian distro's. Most information was found on the openpli.wiki and pli-forum This document only gathers the steps taken to successfully build an OpenPLi-2.1 image.


    This howto will not go in detail about installing Ubuntu your supposed to know how to do this. Although a short walk-true the setup process will follow. Preferred Ubuntu is installed on native hardware to speed up the build process, but it works just as well in a virtual environment if not in a hurry. Virtualbox + Extentions where installed on windows Xp or 7 x64 or 32 or writing this howto. Be sure to have sufficient disk-space, about 30 GB seems enough. If You build On other partition or external drive which is formatted with ext4 File system. If Your local drive or disk drive where You have the virtual disk is big enough and has enough free disk space, I suggest to use 80 GB. If You have the intention to build opepli images for several boxes, I advice to do this on external HD or another not used internal HD (an extra internal HD will give You better read/write performance then external especially for a big number of small files as access time is important there)

    Let's start:


    First thing needed is a download of the Ubuntu-12.04 iso image for your type of hardware or virtual environment.


    Download ubuntu-12.04-desktop Lts On the site of ubuntu they recommend the 32 bit, I since more then 7 years use 64 bit Now the 64 bit is very good I advice to take 64 bit version.


    Here a new way off installing Thank's to Persian Prince works good with ubuntu 12.04-Lts x64


    install it native or via wubi.exe inside windows (30 GB for wubi)


    buy an external HDD with at least 500 GB of storage , format it ext4 (using GParted Partition Editor)


    If You hardisk where the virtual disk containing the ubuntu is located was big enough and is formated at 80 GB You do not need an external one.


    run terminal by pressing simultaneously Ctrl + Alt + T keys


    In terminal type ~$ sudo apt-get update -y && sudo apt-get upgrade -y


    In terminal type sudo apt-get install -y autoconf automake bison bzip2 cvs diffstat flex g++ gawk gcc gettext git-core gzip help2man ncurses-bin ncurses-dev libc6-dev libtool make texinfo patch perl pkg-config subversion tar texi2html wget zlib1g-dev chrpath libxml2-utils xsltproc libglib2.0-dev python-setuptools libc6-i386 genromfs guile-1.8-libs gparted bitbake


    In terminal type ~$ sudo reboot


    After reboot which was needed due to the update done. run terminal by pressing simultaneously Ctrl + Alt + T keys


    In terminal type ~$ sudo gparted And format the external or not used internal HD ext4 Give it a label ! Then it will be easy to find the path to your external drive as this will be standard mounted on map /media/label for an external drive . An internal drive (sata) will not be mounted automatically. But if it has a label, You can easely mount it by running nautilus from terminal (not as sudo) . If the HD does have a label it will be mounted to /media/label . When You click on it. If there is no label, It will be mounted to /media/uuid . Close nautilus.


    In terminal type ~$ sudo nautilus


    right click on the external hdd and choose "Properties" then from "Permissions" tab change "Folder access" to "Create and delete files" for your user or Just create a folder on the drive called openpli . Then right click that folder and change permissions folder acces . A good idea is to change the owner from root to your user id for that folder. Close nautilus.


    If You are not using an other internal or external drive , just run nautilus and create a folder openpli in your home directory (right click).


    In terminal type ~$ ssh anoncvs@cvs.tuxbox.org


    answer yes


    In terminal type ~$ sudo dpkg-reconfigure dash


    answer no


    This concludes the basic preparation for ubuntu 12.04 , for those who are running ubuntu as primary ops system, all is same except that you do not need the virtual machine.




    Openpli 2.1 environment setup


    For the whole setup when I refer to path ~/openpli The ~ does mean Your home directory. For those who use another HD to build the image replace the ~ by the HD mount point. This should be in ubuntu /media/<label> or /media/<uuid> if You did not give a label when you formatted the other drive . As example I formatted my drive with partition label named extdisc Then the path ~/openpli will become /media/extdisc/openpli .


    First if not done yet , we go make the openpli map. Open terminal Ctrl+Alt +T keys .


    In terminal type ~$ cd ~/ then type ~$ mkdir openpli then type ~$ cd openpli (Think about the path if you use other drive)


    Get the OpenPLi 2.1 Makefile. The original makefile with next command. You still will have to edit it and enter You machine.


    ~/openpli$ wget http://openpli.svn.sourceforge…trunk/pli-oe/Makefile-2.1 -O ~/openpli/Makefile-2.1


    You can also use my modified Makefile-2.1 ~/openpli$ wget http://users.telenet.be/spstefansp/Makefile-2.1 -O ~/openpli/Makefile-2.1 or just download it trough link :


    Makefile-2.1 (Donwload)

    http://users.telenet.be/spstefansp/Makefile-2.1.tar.gz


    The modified make file also needs to be edited for machine type, eventually name of git author and email if You intend in helping developers by making some patches to the git. I modified the basic image install command from bitbake openpli-enigma2-image into bitbake -k openpli-enigma2-image the k option does let build your first image as far it is possible if there are some missing sources or so. I put an # before inherit work Then you will keep your work directory after the build is complete. Line DISTRO_FEED_URI = "http://192.168.xxx.xxx/feeds/$${FEED_NAME}/$${MACHINE} is added as well with # in front. If you wan't to upgrade your box using your own compiled updates, remove the # in front of this line and put the ip of your build pc instead of the 192.168.xxx.xxx . Later On You will find how to install apache webserver and linking it to your local ipk files.The number of threads is set to 12 and PARALLEL_MAKE = "2" is added . That's for duo core. If you have more cores change the two in the number of processor cores by Your system (or virtual system !!! ).


    To edit the Makefile-2.1 just use gedit, ~/openpli$ gedit Makefile-2.1 then set the machine you will use and change parameters to your needs and wishes.

    Setting up the enviroment.


    Type in terminal ~$ cd ~/openpli


    Type in terminal ~/openpli$ make -f Makefile-2.1


    It may take a while before the base install is done depending on your internet speed and pc. Once it finished You will find several maps into openpli folder. One of them will be called sources.


    Before we move with the next step , I suggest that You at first download all the sources and the md5 files to your map ~/openpli/sources from site Foorooshfa.com That will make your life much easier for a very first build. After whatever You do, Always keep all the sources obtained during a build. Even if you restart an image from scratch, backup your obtained sources.

    Building the actual Image


    ~/openpli$ make -f Makefile-2.1 image


    and wait a looooong time depending on your pc it may take up to +-4 hours on duo core for older pc's yes …..... With pc's having a lot of ram and processor from more then 2 cores fast drives and fast internet about 1 hours and 45 minutes. So have a nap or take a good dose off coffee or do something else.


    When the building is complete You will find in terminal a message like (as example)


    NOTE: package openpli-enigma2-image-1.0-r0: task do_build: Succeeded


    NOTE: Tasks Summary: Attempted 2909 tasks of which 0 didn't need to be rerun and 0 failed.


    ~/openpli$


    Well that's what You hope to see. But when You started Your very first build it's very unlikely to have this result on Your very first attempt. On problems , go to section When Building fails there the most common problems will be treated and mostly you will find a solution.


    Ok now you image is build ,


    When finnished without error's your image should appear in ~/openpli/build-vuduo/tmp/deploy/images/ for the vuduo


    or in ~/openpli/build-dm8000/tmp/deploy/images/ if the dm8000 target was chosen or … build-xxxxx where xxxxx is the machine you have chosen. Just install this .nfi file using the standard procedure for your box.

    Building the feeds


    We also can build the feeds. Then create apache server and link the feeds to the openpli workdirectory. If You later on will install feeds like extra applications cams e. d. It just can be done on the normal way with remote off your box. Also upgrading your box will be done from your own compiled openpli. On top of you can create own feeds and or applications and easel y install them this way to Your box.


    ~/openpli$ cd build-dm8000


    ~/openpli/build-dm8000$ source env.source


    ~/openpli/build-dm8000$ bitbake -k openpli-enigma2-feed


    After the build is complete all the extra feeds and cams will be there as ipk files.


    They are located in ~/openpli/build-dm8000/tmp/deploy/ipk/ map.


    Installing Appache http server and link to the openpli feeds.


    First we install apache2 webserver in terminal type ~$ sudo apt-get install apache2


    Now we create the needed directory's.


    Open new terminal and type ~$ sudo -i login with pasword you give up on ubuntu installation.


    Now we go to the /var/www directory and create the needed directory’s as root. Then create the links


    ~# cd /var/www


    /var/www# mkdir feeds ; cd feeds ; mkdir openpli-2.1 ; cd openpli-2.1 ; mkdir dm8000 ; cd dm8000 the directory's are made and you are in the last one. We will continue with creation of links.


    /var/www/feeds/openpli-2.1/dm8000# ln -s ~/openpli/build-dm8000/tmp/deploy/ipk/all all ; ln -s ~/openpli/build-dm8000/tmp/deploy/ipk/mipsel mipsel ; ln -s ~/openpli/build-dm8000/tmp/deploy/ipk/dm8000 dm8000


    The command above will not work correctly as you are working as root and the home directory of root is /root this mean that we for this face will need to use the full path instead off ~/ or /media/label in case You use of another HD


    as example by me it is:


    /var/www/feeds/openpli-2.1/dm8000# ln -s /home/christophe/openpli/build-dm8000/tmp/deploy/ipk/dm8000 dm8000 ; ln -s /home/christophe/openpli/build-dm8000/tmp/deploy/ipk/all all ; ln -s /home/christophe/openpli/build-dm8000/tmp/deploy/ipk/mipsel mipsel


    if You are using an external or other internal HD it will look like :


    /var/www/feeds/openpli-2.1/dm8000# ln -s /media/label/openpli/build-dm8000/tmp/deploy/ipk/dm8000 dm8000 ; ln -s /media/label/openpli/build-dm8000/tmp/deploy/ipk/all all ; ln -s /media/label/openpli/build-dm8000/tmp/deploy/ipk/mipsel mipsel


    close terminal


    When building fails


    By the first attempt on a fast pc it sometimes just failed because some packages where not build or installed while the build of another who was in progress needed that build and installed package. That's why I did changed the first command in make file from bitbake openpli-enigma2-image to bitbake -k openpli-enigma2-image. All packages possible will be build anyway.


    Just restart the build by :


    ~/openpli$ make -f Makefile-2.1 image .


    By me on my latest fast pc I always have to do it twice when I make a fresh build. On my older pc it always runs from the first time.


    If it stil does not work out there are probably a lot off missing sources.


    Why ? Wel a lot of websites just closed or some of the packages are just being replaced by newer versions.


    Sometimes you just are unlucky that a website is temporary closed due to maintenance or upgrade.


    Why do the maintainers just not adapt the openpli 2,1 or 2,0 to just use the newer packages ?


    Well actually they DO ! There are wel an amazing number of packages so its happening gradually step by step On person does not live long enough to do them all at once.


    Also the dreambox is running a pretty old linux kernel 2.6.18.xx version. Many of the new package versions are not supported by the dm kernel. And we need to keep the older versions.


    How to fetch the missing packages ?


    Google around the net and download them manually into your $/openpli/sources directory


    Always keep this directory. That will make your life much easier when you are restarting from scratch.


    I found My package Downloaded it in my $/openpli/sources directory . How to continue ? Just restart compiling.


    ~/openpli$ make -f Makefile-2.1 image


    I did all above but ended up again with same message failure due to not avbl source. What now ???? ... pffff...


    Check first if your downloaded package is ok. Remove a file into your resources directory if present named like the package and a .lock behind if its all ok retry


    ~/openpli$ make -f Makefile-2.1 image


    It still does not work ??


    Does the pack which should now be present in your sources has the 100 % same name (case sensitif !) as the one youre looking for ? A good type to check that is :


    When a .lock file with packname youre looking for appears in the sources directory check that the name from the package does exactly match that from the .lock file.


    If so , check the packname with .md5 behind. If there is no md5 you always can generate a md5sum for the package by the command


    md5sum [package].tar.gz > [package].tar.gz.md5 It still does not work ?


    Well nice to try is : first erase form ~/openpli the following directory's bitbake, build-dm8000, openembedded and cache directory.


    Restart again : that's a restart from scratch. But with your sources avbl. And the correct md5 file.


    ~/openpli$ make -f Makefile-2.1 image


    Perhaps this still does not work out : But here It would be nice if someone with more experiance tell a better solution.


    Also There are more trouble shoot tips in section Extra building fails problem and solutions at the end.


    Some Handy bitbake and git commands.


    It's important to use the bitbake and git commands in the wright directory. Also your terminal enviroment must be set to your build enviroment here dm8000.


    To make it easy for me I put al examples related to my openli directory which is ~/openpli by you replace this with your own openpli.


    ~/openpli/build-dm8000$ source env.source to set terminal enviroment


    First bitbake command just the rebuild of an certain bb file . I personally for example did a change into package test bb file test1 Now i need to rebuild the ipkg for it. How to ?


    ~/openpli/build-dm8000$ bitbake -b ../openembedded/test/test1.bb -c clean to clean the previous version


    ~/openpli/build-dm8000$ bitbake -b ../openembedded/test/tes1.bb -f -c build to rebuild the package.


    ~/openpli/build-dm8000$ bitbake -b ../openembedded/recipes/images/openpli-enigma2-image.bb -c build to reindex your ipk files and renew the nfi.


    Now you changes are avbl and you can update your dm with just using update in software management on the dreambox.


    Git commands I do not now a lot of them but one is ussefull I did a couple of changes and messed it all up how to go back to the original git ?


    ~/openpli/openembedded$ git pull --rebase origin master oepsss error you have changes need to stash or commit ....


    ~/openpli/openembedded$ git reset


    ~/openpli/openembedded$ git stash


    ~/openpli/openembedded$ git pull --rebase origin master


    There is a lot more Persons who want just pas them and i will add them to this document. Also eventually errors .


    Extra building fails problem and solutions


    One of the problems


    Building stops with NOTE: package tuxbox-common-1.0+svn218-r2: task do_fetch: Started


    cvs.tuxbox.org uses ssh. On your build machine the host key for this
    host has not been accepted, and the build hangs, as there is no way
    to ask you if you want to accept the host key offered in the building process.


    Solution:


    1. Control-C a number of times (3 usually) to stop the build.
    2. ssh anoncvs@cvs.tuxbox.org


    It will ask you to accept the host key of cvs.tuxbox.org. Put in Y(es)


    3. Restart the build ( make -f ...., or whatever)


    Since 20111029 Some changes occur which result in build failure due to ppanel.


    Just apply some git commands :


    cd ~/openpli/openembedded


    ~/openpli/openembedded$ git submodule init ; git pull ; git submodule update


    Openpli 3.0


    Its just a start To facilate I made a script to start installing openpli 3.0


    The make file is changed and workprocedure as well


    Here the script I made for ubuntu it's working well


    just create first a dir inti your home directory called openpli30 and cd to it


    expand script in that directory.


    Start script with sh clonepli30.sh


    Download script:


    LINK TO SCRIPT

  • Status so far: in progress.
    Detailed status : -
    -- this is the list of packages that Wheezy needs installed : (to be updated as dependencies arise): paste into terminal after switching to root (su -)

    Code
    ~# apt-get install -y autoconf automake bison bzip2 cvs diffstat flex g++ gawk gcc gettext git-core gzip help2man ncurses-bin ncurses-dev libc6-dev libtool make texinfo patch perl pkg-config subversion tar texi2html wget zlib1g-dev chrpath libxml2-utils xsltproc libglib2.0-dev python-setuptools python-ply python-progressbar genromfs guile-1.8-libs gparted


    -- Don't worry about bitbake.


    Doing this on Debian Wheezy, activity log so far:-
    - went to Debian because Ubuntu 12.04 shown my Centrino the PAE finger.
    - went to Wheezy because kernel 2.6 is so 3 years ago.(and Ubuntu is based on Debian-testing so to have as similar env to Ubuntu.
    - do not use 'sudo' unless you're in sudoers file, if you're too lazy to edit that, just do 'su -' and log in as root. Or just 'su', otherwise you will need to cd /home/$your_username if 'su -' used.
    - package libc6-i386 is replaced by libc6 (or just named differently in Debian vs Ubuntu) (which is installed by default) apt-get complains - remove it from list
    - package bitbake does not exist in wheezy yet, d'oh.
    - but it is downloaded and used locally by the Makefile (see below, so the following can be skipped: (don't skip installing python-ply and python-progressbar however)


    - analyzing the makefile, I see it pulls bitbake from git and installs it local to the buid environment (i.e. not system wide) d'oh well.
    - did you skip installing python-ply and python-progressbar packages ? Go back there and install them.
    - downloaded the modified makefile.
    - For Sunray SR4, do I select DM800se? I did.
    - http://foorooshfa.com/openpli-sources/ shows 'this domain may be for sale' sign.
    - Starting the make process, see you in a bit.
    - the part where they do

    Code
    dpkg-reconfigure dash

    , they DO have a point.


    - to be continued.

  • Compilation in progress, 290 / 2870...
    EDIT @17:00 : failed while trying to fetch http://rpm5.org/files/popt/popt-1.14.tar.gz. Investigating.
    EDIT2: because rpm5.org is down, that's why. Will try debian mirror (but they have 1.16 there, some bb magic ?)
    But that will be tomorrow.
    EDIT3: creating


    did the trick of pushing the image building further.

  • Another site down : http://trappist.elis.ugent.be/, file http://trappist.elis.ugent.be/…nload/cdfs-2.6.18.tar.bz2 fails to download.


    There is actually more problems than that :


    Quote

    ERROR: '/home/lukasz/src/openpli/openembedded/recipes/git/git-native_1.7.3.5.bb' failed
    ERROR: '/home/lukasz/src/openpli/openembedded/recipes/libpng/libpng_1.5.10.bb' failed
    ERROR: '/home/lukasz/src/openpli/openembedded/recipes/linux/linux-dm800se_2.6.18.bb' failed


    So all these will need fixing - for some reason cdfs package still wants to download from trappist.

  • search google for the files it cant download
    as you are building pli 2.1 grab the md5 for it aswell, if you cant find it just create 1 for it with md5sum


    if your building pli3.0 just grab the file.



    put the files into your sources folder and re-run the makefile

    Mutant HD2400, Hades, 2xdvb-s2, 2xdvb-c
    Xtrend ET8500, Hades, 1xdvb-s2, 1xdvb-c
    Vu+ SoloSE, Hades, 1xdvb-s2 (out of action atm)
    Vu+ Zero, Hades, 1xdvb-s2
    Fixed 28.2e + 1mtr Orbital, Dark Motor, Inverto LNB

  • I thought about this.
    And I'll be doing this today, unless someone comes up with a better idea :)
    (and the question, whether this is going to boot AND run on a sunray sr4, still standing.)

  • OK so this will be the list of sources I had to download manually :
    http://www.mirrorservice.org/s…m/git/git-1.7.3.5.tar.bz2 - relocated to http://old-www.mirrorservice.o…m/git/git-1.7.3.5.tar.bz2
    So I grepped for KERNELORG_MIRROR, and found it in $openpli/openembedded/conf/bitbake.conf - substituted www.mirrorservice.org for old-http://www.mirrorservice.org
    Pushing through again.


    In $openpli/openembedded/recipes/libpng, copy libpng_1.5.10.bb to libpng_1.5.12.bb
    in which put the following :


    Quote


    SRC_URI[libpng.md5sum] = "d87f9c34ccab8242c00e41925839f6c9"
    SRC_URI[libpng.sha256sum] = "e83c4897bb92a7c67e6610a56676f2fdc213fe2995e9c1fef6f0cf7d70b30976"

  • Almost there! last hurdle :
    ERROR: '/home/lukasz/src/openpli/openembedded/recipes/base-passwd/base-passwd_3.5.24.bb' failed
    ERROR: '/home/lukasz/src/openpli/openembedded/recipes/openpli/enigma2-plugin-skins-magic-hd.bb' failed


    scrolling up I see :


    Quote


    ERROR: The checksums for "/home/lukasz/src/openpli/sources/base-passwd_3.5.24.tar.gz" did not match.
    MD5: expected "8f6b9420c50e90edaff41eb2fb7e9e16", got "a9fad6b1ed80f0f27d3690a84b70fa2f"
    SHA256: expected "196083d6f675190d4e2cede0a5fa6b3c91088705c5386f76292fec8e74b6369e", got "6111ff39cb322f154c2a8229f555d25e1739edf29cedcf9fa30dec4da302c9c4"


    Should be easy to fix.


    Quote


    ERROR: Function 'Fetch failed: Unable to fetch URL git://git.assembla.com/openvix.7.git;protocol=git;branch=experimental from any source.' failed


    will need googling, tomorrow :)


    TBC.

  • It looks for pli.png,
    btw somebody from AZbox community just let go of the magic-hd skins altogether:
    SourceForge - azboxopenpli/openembedded/commitdiff
    so will I then, for now.


    EDIT:
    but put this :


    into $/recipes/openpli/enigma2-plugin-skins-pli-hd.bb instead otherwise there is no fonts and the image goes unbuildable.

  • skins went through now, but base-passwd fails:



    (this happens because I substituted recipe for 3.5.24 which was failing to unpack when dowloaded (sic) with recipe for 3.5.26. Never mind mismatch in md5/sha.)

  • In case someone wonders if this /has/ gone through : no, I had to defer this task to another time... not giving up completely, but put into (very) deep sleep.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!