Category Archives: Software

Enigma2 package compilation

After the enigma2 compilation

Enigma 2 image compilation

we show how to create a package.

In the recipes-local folder

we create a folder for our package, for example testpackage, and a subfolder files

In the file testpackage.c, in the files folder, we insert the test code

We have to create the Readme.txt in the files folder and the LICENSE file  in the testpackage folder. The Readme.txt file contains informations about the application. For the LICENSE, without information at the moment, we have to generate the hash to insert into the bitbake file.

md5sum command creates the md5 file for the LICENSE

Now we are ready to create the bitbake testpackage_0.1.bb file in the testpackage folder; here is the content of this file

We are now ready to compile the testpackage. We use the Zgemma envinronment to compile the files, as described below

The package is available in the folder shown below

To install the package on the Zgemma H2H we have to trasfer the  testpackage_0.1-r0_mips32el.ipk file on  ZGemma H3 in the /tmp folder and execute in a shell, accessible using the telnet application, the following command

To force the installation use

The executable is available in the /usr/bin folder; the execution gives us the expected output

OpenATV Enigma2 image compilation

In this article we describe how to generate an OpenATV image, based on the Enigma 2 framework

Openatv

 Atfer the compilation envinronment installation, described in this previous article

Debian envinroment setup

we can proceed as described below.

Execute the logon into Debian envinronment with the development user (sviluppo in our example). In the home directory create the enigma2 folder

 Install the following packages

Modify the shell as bash executing

and choosing the NO option.

Create under openatv an enigma2 folder

At this step let’s create a folder sources; this folder will contain all the sources for the various set-top boxes we would like to compile

Using the git command we clone locally the oe-alliance repository

After this task enter into build-envinronment folder and execute

Now we modifiy the source dowload folder editing the site.conf file and changing the parameter as described below from

to

We are ready now to proceed to the image compilation.

From the build-envinronment to generate, for example, the image for Airdigital Zgemma H2H set-top box execute

For the Xtrend ET10000 set-top box

At the end of the process we’ll find the image ready to be uploaded on the set-top box in the deploy folder for each machine type; in the case of the Zgemma H2H the folder is

immaginezgemma

The zip file contains for the Zgemma H2H the file to be unzipped on the usb pen and uploaded on the device.

WARNING: The image installation on the device is at your own risk. We accept no responsibility if the installation leads to  malfunction or block of the device.

Remote desktop setup for Armbian on Orange PI PC

To enable the remote desktop for Armbian on Orange PI PC execute the logon to the system, for example using an ssh client

loginDelete, if installed, the packages

Install the following packages

Now we are able to login on Armbian using the remote desktop. Start the remote desktop client entering the Orange PI PC IP address

Remote Desktop ConnectionExecute the login with the user created at the first boot of Armbian, for example user1

Remote Desktop_LoginWe now have the access to the XFCE desktop remotely

Remote_Desktop

Armbian Boot on Orange PI PC

After the creation of the micro sd card with the Armbian image for Orange PI PC

Armbian image on micro sd

we can boot the Orange PI PC with the card inserted in the card slot. At the boot the first operation is the partition increase on the card, then the system requires the root password change from the default, 1234, to a new password. The next operation is the creation of a normal Debian user, for example user1; we provide the main required informations like username, password and letting the default  for the other fields. After these steps the system opens the XFCE graphical interface with the default resolution. To change the resolution execute the following command

It shows a list with all the available options; to enable a 1080p60 resolution execute

 To change the locales configuration execute the following command choosing the language to use

while to modify the keyboard layout use the following command

Openelec compilation for Orange PI PC

In this article we describe how to proceed to compile the Openelec image for the Orange PI PC card.

From the Orange PI PC forum, in the Openelec section the developers describe the steps to compile the image

Openelec Orange PI PC FAQ

In previous blogs we described how to install debian and how to modify the script.bin file to adapt the hdmi output to our television

Debian installation

Output resolution change

The compilation takes a long time; it is advisable to use multicore processors to speed up the compilation process.

Create a folder, openelec, under orangepi folder and move into it

Install the following packages

With git download the github sources in the local  OPENELEC-OPIPC folder

After the above operation access to OPENELEC-OPIPC folder

Execute the following command

The process check prerequisities and installs additional packages

Insert the root password when required; after the prerequisites installation the compilation begins.

At the end of the compilation in the target folder we find the files to install or update Openelec

  1. The file having the .img.gz extension is to upack and tranfer to a micro sd card as described in previous posts.target
  2. The file with .tar extension is to be copied in the update folder on the Openelec system; this file updates the system when rebooting the Orange PI PC cardupdate

Resolution change of the video output in Openelec on Orange PI PC (Part2)

After the installation and compilation of the sunxi tools we are able to manage the script.bin file

http://www.microdev.it/wp/en/2016/07/29/resolution-change-of-the-video-output-in-openelec-on-orange-pi-pc-part1/

Copy into scriptfile folder our script.bin file.

From th sunxi link it is possible to view the guide about the parameters of the fex file

Fex Guide

Using the tool, compiled in part1 article, let’s convert the file from binary into a text one, executing the following command

Now we can work on the script.fex file. Edit it with a text tool software, for example pluma in Debian

script.fex

In this file we have to find the parameters to modify the video output; here are the parameters to modify

In our test file we found the following settings

According to the fex guide, for the HDMI output (screen_output_type=3) and a setting of 720p60 we have to change the 10 value into 5 in the screen0_output_mode parameter

WARNING: This file contains all the main parameters for the correct operation of the card. Don’t  change anything if you are not sure  waht the change of parameters entails.

After the parameters change convert the text file into a binary format with the following command, generating a .bin file

Move this file into the micro sd card; rename the original script.bin file into script.bin.back and move the  script720p60.bin into script.bin.

In the  Fex Guide we find all the parameters settings according to the various output resolutions.

Inserting the sd card into the Orange PI PC we can test the new output resolution connecting the hdmi to our television and powering on the card.

Resolution change of the video output in Openelec on Orange PI PC (Part1)

In the Orange PI Openelec image the default video output resolution is 1080p60. If our tv works with a different resolution we’ll have no image on the television.

To overcome this problem it is possible to change the resolution and fps  for the video output.

The micro sd has two partitions. We have to work in the vfat partition

schedasd

We have to modify the script.bin file.

contenutoschedasd

In the home partition of the debian user (sviluppo in our case) create a folder orangepi; inside this folder create another folder called  sunxi. Go into sunxi folder

Follow the instructions available from linux-sunxi site in order to modify the script.bin file. As first step install the required tools

Sunxi Tools

We have to install the libusb package, as described below

Install git and pkg-config

Now using git download the tool sources

Go into sunxi.tools folder

Execute the tools compilation

We are now able to modify the Orange PI PC parameters available in the script.bin file.

Create a folder under sunxi, for example scriptfile

Add to th ePATH variable the sunxi tools folders executables

Now in next article we can modify the parameters of video output in the script.bin file

http://www.microdev.it/wp/en/2016/07/29/resolution-change-of-the-video-output-in-openelec-on-orange-pi-pc-part2/

Debian envinronment for embedded systems development

In this article we describe Debian 8.5 installation we’ll use to compile Openelec for Orange Pi PC, Enigma2 images and other operations for embedded devices.

Download  AMD64  Debian 8.5 iso

Debian X86_64

Proceed with the operating system installation on your system. It is recommended  to use a virtual machine like VirtualBox. Use at least  4 GB of ram and 50 GB of hard disk.

VirtualBox

Using VirtualBox it is possible the virtual disk creation with dynamic space allocation. After the operating system installation log on into the system with the user created during the installation; we used the “sviluppo” user id. It is possible to log on to the linux system using the graphical interface or through ssh to the IP address of the Debian system.

Add to sudo group the user created in the Debian installation; open a shell command window and execute

In our case we have the following output

sviluppo user doesn’t belong to sudo group. Execute the command

Enter the root password when required and execute

In our example

Reboot the system

At the reboot log on into Debian and proceed to add the packages repositories, if not already present.  Go to the /etc/apt folder

Backup the original file

Edit the file using for example the vi editor

It is possible to comment out the lines positioning at the beginning of the line, press i to go in editing mode and add the # character. Pressing the ESC key we go into reading mode and it is possible to move in the file using the  arrow keys. In case of errors in editing mode it is possible to avoid the last change using the key ESC+u.

Comment out the  lines

Add the following lines

To add the lines press o keys to go into writing mode with an empty new line; with copy and paste we can add all the lines or proceed manually for each of them.

To save the file and quit press ESC+:wq.

It is possible to use one of the text editors available in Desktop Envinroment on which we logged into to edit and save the file.  For example to use pluma editor open a shell command windows and execute

From pluma open the file /etc/apt/sources.list, make the changes described above and save the file.

Update the repository lists  and the packages

Install the development packages

Install an ftp server to use for files transfer

After the installation open the file  /etc/vsftpd.conf and uncomment the following parameter

Open the file with vi or pluma as superuser

With vi editor search the string with the command

Delete the # character positioning the cursor on it and pressing the x key.

Save and quit with ESC+:wq.

Restart the ftp server using the command

We have now the envinronment to compile, modify, develop  our embedded systems.

SD card setup for Orange PI PC Armbian in Linux

As already described in the previous article

Openelec SD card setup

also for the Armbian distribution we have to prepare an sd micro card.It is advisable to use a micro SD class 10 to gain better performances. As first step  we proceed to the Armbian  image download from Armbian web site

Download Armbian Orange PI PC

We choose for example the Debian Jessie Desktop Image.

We install 7zip package. In Debian we can use the following command

After the file  download  wint 7z extension in a directory, we open a shell command window in this directory and  unzip the content

We have among other files the one with .raw extension. Then we plug the micro sd card and check this device

In our case we have the following output

We check if this device is umounted

In the case we have the device in the output response, as in our case

we proceed to the unmount

WARNING: Be sure that the device is the micro sd card and not the internal disk. The next operation imply the complete rewriting of the device with the loss of all data on it.

We can now write the image into the micro sd card, using the correct device, that in our case is /dev/sdb

WARNING: This operation wipes all data on the micro sd card.

After a while we have the micro sd card ready to be used in the Orange PI PC board.

SD card setup for Orange PI PC Armbian in OSX

As already described in the previous article

Openelec SD card setup

also for the Armbian distribution we have to prepare an sd micro card. It is advisable to use a micro SD class 10 to gain better performances. As first step  we proceed to the Armbian  image download from Armbian web site

Download Armbian Orange PI PC

We choose for example the Debian Jessie Desktop Image. We expand the content using a compression software, as Keka

Keka

obtaining one file having .raw extension

armbianOSX

Then we plug the micro sd card and find this device

In our case we have the following output

We proceed to the device unmout; in our case the command is

WARNING: Be sure that the device is the micro sd card and not the internal disk. The next operation imply the complete rewriting of the device with the loss of all data on it.

We can now write the image into the micro sd card, using the correct device, that in our case is /dev/disk2

WARNING: This operation wipes all data on the micro sd card.

After a while we have the micro sd card ready to be used in the Orange PI PC board.