OpenPli Ubuntu build howto : For Openpli 4Openpli ubuntu build server setup quick howtoAs 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-3,0 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.
NOTE UBUNTU 14.04As far reported use the same procedures as with ubuntu 12.04 discribed here. Only the local apache has some differences See note by appache installation.
It is tested by me and is OK
EXTRA NOTES bitbake not avbl download here BITBAKE-LINK-AMD64
Install bitbake with command ~$ sudo dpkg -i bitbake_1.12.0-1_all.deb
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 -yIn 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 quiltFor ubuntu 14,04 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 quiltIn terminal type
~$
sudo rebootAfter 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
~$ 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.
Install and Compile : Openpli 4.0FIRST DO NEVER WORK AS ROOT USER !!
Building an image must be done as regular user.Open terminal by pressing simultaneously Ctrl + Alt + T keys
The terminal opens normally in your home directory. If not you changed some things this can be seen by the
user@computername: ~$
First we create a folder where we will clone open pli by typing
~$
mkdir openpli40 you may give the name you want but this document will asume you used openpli40.
Go to the directory openpli30 by typing
~$
cd openpli40Create sources directory
~/openpli40$
mkdir sources(If you have no GIT, install it with command : sudo apt-get install git)Clone openpli40 by typing
~/openpli40$
git clone git://git.code.sf.net/p/openpli/openpli-oe-core
(if Make is not installed, type command : sudo apt-get install make)Clone git for all boxes
~/openpli40$
cd openpli-oe-core then type
~/openpli40/openpli-oe-core$
makeOpenembedded for the OpenPLi 4 environment has been initialized
properly. Now you can start building your image, by doing either:
MACHINE=... make image
or:
cd /home/xxx/openpli40/openpli-oe-core/build
source env.source
MACHINE=... bitbake openpli-enigma2-image
or, if you want to build not just the image, but the optional packages in the feed as well:
MACHINE=... bitbake openpli-enigma2-feed
Change You sources directory location by editing the file site.conf located in
~/openpli40/openpli-oe-core directory.
DL_DIR = /home/<you're home dir>/openpli40/openpli-oe-core/sources
in to
DL_DIR = /home/<you're home dir>/openpli40/sources By doing this you will be able to erase the full openpli-oe-core to make a fresh build without loosing you're obtained sources.
If You wan't to keep your work directory's after build place an # in front off line INHERIT += "rm_work" (change line INHERIT += "rm_work" into #INHERIT += "rm_work")
If You later on you wan't to use you're own pc as update location for you're box , ad a line into site.conf DISTRO_FEED_URI = � http:://<You're pc ip >/feeds/${FEED_NAME}/${MACHINE}�
(You could have to install some more packages, sudo apt-get install gcc g++ diffstat gawk chrpath texinfo)Now just type ~/openpli40/openpli-oe-core$
MACHINE=xxxxx make image (where xxx is you're machine example dm8000 or vuduo2)
available machines are : dm8000 vuduo vuduo2 dm500hd dm800se dm7020hd et4x00 et5x00 et6x00 et9x00 vusolo vusolo2 vuultimo vuuno xp1000When You follow this You will have a complete image build. Depending on the pc it may take from 55 minutes up to 2 hours and more.
Next is the feeds build.After You're image is build , You can build the feeds. Extra program's like softcam, extra plugins and so on.
Just type
~/openpli40/openpli-oe-core$
cd buildType
~/openpli40/openpli-oe-core/build$
source env.sourceType
~/openpli40/openpli-oe-core/build$
MACHINE=xxxxxx bitbake openpli-enigma2-feed build off feeds takes about 25 minutes up to xx hours depending on pc.
That's ALLIf You wan't I hereby added a script to make life even easier.
Just make youre openpli dir into you're home directory I named it openpli40.
Download this script and extract into you're pli directory
run the script out of you're pli directory by typing
~/openpli40$ sh clonepli40.sh
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.
Go to the /var/www directory and create the needed directory�s as root. Then create the links
example based on dm8000
~# cd /var/www
/var/www# mkdir feeds ;
cd feeds ;
mkdir openpli-4 ;
cd openpli-4 ;
mkdir dm8000 ;
cd dm8000
the directory's are made and you are in the last one. We will continue with creation of links.
in /var/www/feeds/openpli-4/dm8000#
ln -s ~/openpli40/openpli-oe-core/build/tmp/deploy/ipk/all all ;
ln -s ~/openpli40/openpli-oe-core/tmp/deploy/ipk/mipsel32el mipsel32el ;
ln -s ~/openpli40/openpli-oe-core/build/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:
in /var/www/feeds/openpli-4/dm8000#
ln -s /home/christophe/openpli40/openpli-oe-core/build/tmp/deploy/ipk/dm8000 dm8000 ;
ln -s /home/christophe/openpli40/openpli-oe-core/build/tmp/deploy/ipk/all all ;
ln -s /home/christophe/openpli40/openpli-oe-core/tmp/deploy/ipk/mipsel32el mipsel32el
if You are using an external or other internal HD it will look like :
in /var/www/feeds/openpl-i4/dm8000#
ln -s /media/label/openpli40/openpli-oe-core/build/tmp/deploy/ipk/dm8000 dm8000 ;
ln -s /media/label/openpli40/openpli-oe-core/build/tmp/deploy/ipk/all all ;
ln -s /media/label/openpli40/openpli-oe-core/tmp/deploy/ipk/mipsel32el mipsel32el
close terminal
NOTE UBUNTU 14.04 !!!!The basic links to web are changed from /var/www to /var/www/html .
Bitbake not avbl in ubuntu 14,04 fetch the link here BITBAKE-LINK-AMD64
Type in terminal the following dependences same like 12,04 whitout bitbake
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 quilt
install this package with sudo dpkg -i
bitbake_1.12.0-1_all.deb
When building fails
My latest build on dm8000 did not failed. When I just added the needed sources.
Just restart the build by :
latest build on ubuntu 12.04 x86-64 full up to date no failures .
In case of failure just retry the build a second time
If building fails again You should have the failed package Try to remove this by using
~/openpli40/openpli-oe-core/build$ source env.source
~/openpli40/openpli-oe-core/build$ MACHINE=xxxxx bitbake -b
~/<path to package>/<package.bb> -f -c cleanall and rebuild
it might be ok
If it was due to a failed download, first remove package with command as described above. Try to find that package googling around. Place it into sources and create a .done file
.done file is just empty text file with compleet package source name and a .done in the name.
Try to build again. If the source is correct it should work now. Unless it was a git or svn.
-----------------------------------
For OpenPli 3 :
1. Install as Root the prerequisites (sudo or su -)
apt-get install gawk wget git-core cvs subversion diffstat unzip texinfo gcc-multilib build-essential chrpath
2. Clone OpenPLi OE
cd ~
git clone -b openpli-3 git://git.code.sf.net/p/openpli/openpli-oe-core openpli3
cd openpli3
3. First run make to download OE subprojects
cd ~/openpli3
make4. Check site.conf (eg modify sources dir)
vi site.conf5. Make image...
cd ~/openpli3
MACHINE=XXX make imagemake[1]: Leaving directory `/home/xxx/openpli3/'
Generating /home/xxx/openpli3/build-et9x00/env.source
Generating /home/xxx/openpli3/build-et9x00/conf/openpli.conf
Generating /home/xxx/openpli3/build-et9x00/conf/bblayers.conf
Generating /home/xxx/openpli3/build-et9x00/conf/local.conf
Openembedded for the OpenPLi 3.0 environment has been initialized
properly. Now you can start building your image, by doing either:
MACHINE=et9x00 make image
or:
cd /home/xxx/openpli3/build-et9x00 ; source env.source ; bitbake openpli-enigma2-image
or, if you want to build not just the image, but the optional packages in the feed as well:
cd /home/xxx/openpli3/build-et9x00 ; source env.source ; bitbake openpli-enigma2-feed