Difference between revisions of "Information for Developers"

From OpenPLi Wiki
Jump to: navigation, search
m
Line 53: Line 53:
  
 
Select the branch to build from
 
Select the branch to build from
   git checkout 7.2-release
+
   git checkout develop
  
 
Install the required submodules
 
Install the required submodules
Line 60: Line 60:
 
Build your first image
 
Build your first image
 
   MACHINE=xxXXXX make image
 
   MACHINE=xxXXXX make image
 +
 +
Note that by default, the develop branch of Enigma is used when you build an image, assuming that most "homebuild" users will want to build the latest development image.
 +
 +
If you want to build a release image, you need to specifcy the correct branch when building:
 +
  cd openpli-oe-core
 +
  git checkout 7.2-release
 +
  git submodule update --init --recursive
 +
  ENIGMA2_BRANCH=7.2-release MACHINE=xxXXXX make image
  
 
=='''Your own feed server'''==
 
=='''Your own feed server'''==

Revision as of 09:42, 14 May 2020

'I'm a developer, is there any technical info available from the PLi® team?

Welcome and tell your developer friends about us

Yes and welcome aboard! If you have specific question, you can use our PLi® Third Party Development forum to ask it. You will find we are most accommodating.

This page is about software development using OpenEmbedded-core. If you're looking for the text that used to be on the this page, it's now called developer-information-old.


Create your own build

See also this forum post on setting up a development environment: http://openpli.org/forums/topic/18806-openpli-quick-setup-ubuntudebian/

Basically, it boils down to this:

Run Linux. Most of us use the latest Ubuntu desktop release, I suggest you do the same, if you don't know what to pick.

Install prerequisite packages, as described here: http://www.openembedded.org/wiki/OEandYourDistro

For Ubuntu, that's:

 sudo apt-get install sed wget cvs subversion git-core \
  coreutils unzip texi2html texinfo docbook-utils \
  gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ \
  desktop-file-utils chrpath default-jre gettext zip libssl-dev

For CentOS, that's:

 sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
    diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \
    openssl-devel zip python3 perl-Thread-Queue

CentOS incompatibilities

Note that CentOS, even CentOS 7, comes with gcc 4, which is pretty old. It is advised to use DevToolsets to switch to 7 or 8:

 sudo yum install centos-release-scl devtoolset-7 devtoolset-8

which gives you the option to use versions 6, 7 and 8 as well. You can enable a version using "scl enable devtoolset-8".

When you want to compile OpenPLi-8+ (i.e. an image based on Yocto Zeus or higher), you need at least tar v1.28, but CentOS comes with 1.26, and bitbake refuses to run.

You can address this issue by (as root):

 cd /tmp
 wget https://rpmfind.net/linux/mageia/distrib/6/x86_64/media/core/release/tar-1.28-3.1.mga5.x86_64.rpm
 rpm2cpio tar-1.28-3.1.mga5.x86_64.rpm | cpio -idcmv
 cp /tmp/usr/bin/tar /usr/bin

Clone the openpli repository:

 git clone git@github.com:OpenPLi/openpli-oe-core.git

Setup the environment

 cd openpli-oe-core

Select the branch to build from

 git checkout develop

Install the required submodules

 git submodule update --init --recursive

Build your first image

 MACHINE=xxXXXX make image

Note that by default, the develop branch of Enigma is used when you build an image, assuming that most "homebuild" users will want to build the latest development image.

If you want to build a release image, you need to specifcy the correct branch when building:

 cd openpli-oe-core
 git checkout 7.2-release
 git submodule update --init --recursive
 ENIGMA2_BRANCH=7.2-release MACHINE=xxXXXX make image

Your own feed server

Once you've built your own image, you'd want to keep it up to date. You can just let the box update itself from your build PC using the GUI as if running a full distro. To do that, all you need to do is install a webserver on the build PC, for example Apache2.

After you've installed apache on Ubuntu, it will share /var/www/html/ with the world. Create a feed subdirectory, and then add a symlink to the "ipk" folder of your build, for example:

 sudo mkdir /var/www/html/feed
 sudo ln -s ${HOME}/work/openpli-dev/build/tmp/deploy/ipk /var/www/html/feed/openpli-dev

To tell your box about this feed location, edit your local.conf or site.conf to contain the following lines:

 FEED_NAME = "openpli-dev"
 DISTRO_HOST = "mybuildpc.local"

This will make the /etc/opkg/ files on the box point to your feed. After installing the built image on your box, you should be able to upgrade with opkg commands or the enigma2 GUI.

OpenPLi - Git commands

Here is the link to some basic git commands.