Jump to content


Photo

Building OpenPli using a Docker image


  • Please log in to reply
12 replies to this topic

#1 MMajoor

  • Member
  • 10 posts

+4
Neutral

Posted 26 November 2016 - 11:59

Not everyone can build OpenPli using their own host system (wrong versions, unavailability of tools).
Using a virtual machine is a 'certain' means of being able to build it.

Another, (better?), option we can use nowadays is using a Docker image.
With Docker, an image can be created that works on 'any' Linux system.
Although not tested, it might also work on Windows assuming the 'linux virtualization' method is used (in essence Docker uses a linux virtual machine on Windows).
Windows 10/Windows server 2016 also support Docker natively now, but this is not what is meant here!

 

All information about creating and using a Docker image can be found in the attachment.
The attachment consists of a Dockerfile, which is used to create an image that can be used for building. It is based on Ubuntu 14.04 and uses the information from http://users.telenet...npliubuntu.html (except that 'zip' has been added too).
An additional automated script for building OpenPli is also included.

The Docker image supports building both 'master' and 'master-next' (the environment settings in the Dockerfile are needed for 'master-next').

The attachment can also be downloaded from http://www.majority.nl.

Attached Files



Re: Building OpenPli using a Docker image #2 WanWizard

  • PLi® Core member
  • 69,134 posts

+1,764
Excellent

Posted 26 November 2016 - 13:46

Great initiative! Thanks!


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Building OpenPli using a Docker image #3 MMajoor

  • Member
  • 10 posts

+4
Neutral

Posted 17 December 2016 - 11:16

I have done a minor update for the Docker file so other openembedded distros can also be build with it (like openatv, openvix, opennfr ..).

The update concerns using the bash shell if #!/bin/sh is set in a shell script. There are some shell scripts that use bash specific commands (like 'pushd') but specify #!/bin/sh.

Included scripts have also been updated for other distros.

 

 

 

Attached Files



Re: Building OpenPli using a Docker image #4 mymon

  • Senior Member
  • 145 posts

+5
Neutral

Posted 18 December 2016 - 16:50

MMajoor do you think it would work on Mac? I don't have a decent PC around to compile the build so the docker could sort me out ;)


Vu+ Duo, Solo2, Solo4K OpenPLi
CN: DM800Se, SoloPro, Duo, Solo2Se, Solo2 Lonrisun & Sunray, Zgemma Star H.2S

Re: Building OpenPli using a Docker image #5 MMajoor

  • Member
  • 10 posts

+4
Neutral

Posted 21 December 2016 - 17:53

On -Windows- it will not work without serious tweaking (has to do with symbolic links that are tricky using the virtualization (VirtualBox) Docker uses to run on Windows).

There is Docker for the Mac so it might work, but I can not test it. You have to try it for yourself.



Re: Building OpenPli using a Docker image #6 mymon

  • Senior Member
  • 145 posts

+5
Neutral

Posted 21 December 2016 - 21:40

k.. thanks.. will give it a go tomorrow and let you know (ins case sb else has Mac instead of debian/ubuntu etc)


Edited by mymon, 21 December 2016 - 21:41.

Vu+ Duo, Solo2, Solo4K OpenPLi
CN: DM800Se, SoloPro, Duo, Solo2Se, Solo2 Lonrisun & Sunray, Zgemma Star H.2S

Re: Building OpenPli using a Docker image #7 pepinoogorino

  • Senior Member
  • 65 posts

+2
Neutral

Posted 3 January 2017 - 15:55

@MMajoor
Big Thx! I compiled without any problems master-next image for Solo4K :)
Could you write, how to compile (with of course openpli.sh script) additional plugins, for example service-app?
I add service app receipes (like https://forums.openp...nd-exteplayer3/), but I have no idea how to add a settings MACHINE=vusolo4k bitbake enigma2-plugin-extensions-serviceapp

I try to modify MACHINE variable in script or add extra params in line with "MACHINE=${MACHINE} DISTRO=${DISTRO} make image" but it was not a good idea :/
 


Edited by pepinoogorino, 3 January 2017 - 15:59.


Re: Building OpenPli using a Docker image #8 MMajoor

  • Member
  • 10 posts

+4
Neutral

Posted 4 January 2017 - 18:58

@pepinoogorino

 

 


Could you write, how to compile ...

 

That wat is run inside a container is -exactly- the same as you would do on a 'normal' system, so all the information about compiling specific recipes applies to a container as well.

I never did some individual compilation of recipes and such, so I can't help you with the correct parameters and calls for that (other than what the makefile help suggests).

 

I suggest you start the container in terminal mode and 'play' around with it.

By 'play' I mean just entering the commands you normally enter to do a checkout and/or compilation.

 

For example, start the container in terminal mode:

> sudo docker run --rm --user openembedded -v $(pwd):/opt/openembedded -t -i --workdir /opt/openembedded openembedded/ubuntu:14.04

# mkdir mycheckout

# cd mycheckout

# git clone https://github.com/o...openpli-oe-core builddirectory

# cd builddirectory

# make

# MACHINE=vusolo4k bitbake enigma2-plugin-extensions-serviceapp

 

 

Once you succeed in getting the all the commands and parameters correcly you can put the commands you entered directly in a script (just to automate things). Or make multiple simple scripts rather than one large script that should 'do it all'.

 

Scripts I can think of:

1. do a checkout of the repositiory

2. do an update

3. do a compilation

 

1. checkout.sh:

#!/bin/bash
mkdir mycheckout
cd mycheckout
git clone https://github.com/openpli/openpli-oe-core builddirectory

2. update.sh:

#!/bin/bash
cd mycheckout
cd builddirectory
make update

3. compile.sh:

#!/bin/bash
cd mycheckout
cd builddirectory
MACHINE=vusolo4k bitbake enigma2-plugin-extensions-serviceapp

And then use them like so:

> sudo docker run --rm --user openembedded -v $(pwd):/opt/openembedded --workdir /opt/openembedded openembedded/ubuntu:14.04 checkout.sh

> sudo docker run --rm --user openembedded -v $(pwd):/opt/openembedded --workdir /opt/openembedded openembedded/ubuntu:14.04 update.sh

> sudo docker run --rm --user openembedded -v $(pwd):/opt/openembedded --workdir /opt/openembedded openembedded/ubuntu:14.04 compile.sh



Re: Building OpenPli using a Docker image #9 pepinoogorino

  • Senior Member
  • 65 posts

+2
Neutral

Posted 4 January 2017 - 21:49

Hmm...

bash: bitbake: command not found

but... I found it manualy on /openpli-oe-core/bitbake/bin/bitbake
and file build/env.source with:

export BB_ENV_EXTRAWHITE="MACHINE"
export MACHINE
export PATH=/opt/openembedded/openpli_vusolo4k_master-next_20170103/openpli-oe-core/openembedded-core/scripts:/opt/openembedded/openpli_vusolo4k_master-next_20170103/openpli-oe-core/bitbake/bin:${PATH}

but execute

source env.source

in build directory can't fix it - bitbake still not found :(


 



Re: Building OpenPli using a Docker image #10 pepinoogorino

  • Senior Member
  • 65 posts

+2
Neutral

Posted 4 January 2017 - 22:00

Sorry! Too much time had passed to edit my previous post :/
 

bash: bitbake: command not found

but... I found it manualy on /openpli-oe-core/bitbake/bin/bitbake
and file build/env.source with:

export BB_ENV_EXTRAWHITE="MACHINE"
export MACHINE
export PATH=/opt/openembedded/openpli_vusolo4k_master-next_20170103/openpli-oe-core/openembedded-core/scripts:/opt/openembedded/openpli_vusolo4k_master-next_20170103/openpli-oe-core/bitbake/bin:${PATH}

Let's check PATH variable:

openembedded@cf149c9031c1:/opt/openembedded/dockeropenpli2/openpli_vusolo4k_master-next_20170103/openpli-oe-core/build$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Execute source env.source and check PATH again:

openembedded@cf149c9031c1:/opt/openembedded/dockeropenpli2/openpli_vusolo4k_master-next_20170103/openpli-oe-core/build$ source env.source
openembedded@cf149c9031c1:/opt/openembedded/dockeropenpli2/openpli_vusolo4k_master-next_20170103/openpli-oe-core/build$ echo $PATH
/opt/openembedded/openpli_vusolo4k_master-next_20170103/openpli-oe-core/openembedded-core/scripts:/opt/openembedded/openpli_vusolo4k_master-next_20170103/openpli-oe-core/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

But bitbake still not found :(

 


Edited by pepinoogorino, 4 January 2017 - 22:02.


Re: Building OpenPli using a Docker image #11 MMajoor

  • Member
  • 10 posts

+4
Neutral

Posted 5 January 2017 - 18:45

No problem here finding bitbake when sourcing env.source

sudo docker run --rm --user openembedded -v $(pwd):/opt/openembedded -t -i --workdir /opt/openembedded openembedded/ubuntu:14.04
openembedded@d5a75ed186d1:/opt/openembedded$ cd openpli_hd2400_master_20161230/
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230$ cd build/
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230/build$ cd build/
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230/build/build$ source env.source
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230/build/build$ echo $PATH
/opt/openembedded/openpli_hd2400_master_20161230/build/openembedded-core/scripts:/opt/openembedded/openpli_hd2400_master_20161230/build/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230/build/build$ bitbake
Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230/build/build$ cd ..
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230/build$ ls
bitbake               CC-BY-NC-ND-4.0  meta-dream     meta-gi     meta-miraclebox    meta-spycat  meta-xp       meta-xtrend        recreate_feed
branding.conf.sample  LICENSE          meta-edision   meta-hd     meta-openembedded  meta-vuplus  meta-xpeedc   meta-zgemma        scripts
build                 Makefile         meta-formuler  meta-local  meta-openpli       meta-wetek   meta-xsarius  openembedded-core  site.conf
openembedded@d5a75ed186d1:/opt/openembedded/openpli_hd2400_master_20161230/build$ bitbake
The BBPATH variable is not set and bitbake did not find a conf/bblayers.conf file in the expected location.
Maybe you accidentally invoked bitbake from the wrong directory?
DEBUG: Removed the following variables from the environment: LANG, LESSCLOSE, LANGUAGE, SHLVL, OLDPWD, HOSTNAME, LESSOPEN, LC_ALL, LS_COLORS, _


Re: Building OpenPli using a Docker image #12 areq

  • New Member
  • 4 posts

0
Neutral

Posted 29 October 2023 - 09:59

is there exist Docker file to build latest Openpli 9.0 for  VU+ Uno 4k se ? 



Re: Building OpenPli using a Docker image #13 areq

  • New Member
  • 4 posts

0
Neutral

Posted 1 November 2023 - 23:36

there is my Dockefile

git clone https://github.com/areqq/OpenPliBuilder



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users