Tag Archives: libreelec

we created the environment and compiled the Libreelec8 image for our development board. We integrate what it has been said in the previous article showing how to build the Libreelec 8 addons for our Orange PI PC board.

Now we proceed to build some addons. The packages that you can build are available in the kodi-binary-addons folder as shown below

and in the packages/addons folder

We build the pvr.iptvsimple addon running the following command from the /home/sviluppo/orangepi/libreelec/libreelec-8.0 folder

1

PROJECT=H3 ARCH=arm scripts/create_addon pvr.iptvsimple

We build the proftpd addon, among those avaliable in the packages/addons folder

It shows that the soc Amlogic natively manages the NEC protocol for remote controls and through remote.conf file we can associate the remote control code to the Linux system events. The map of the codes for the Linux system events is available in the header files of the Linux kernel

In the case of compatible remote control we should see messages as shown below

1

remote:Wrong custom code is0xae517f80

The format is as follows: 0xAABBCCCC. Following Amlogic document linked above, the remote control code for a specific key is 0xBB; while defining the remote control code we have to use 0xCCCC0001. AA corresponds to the inverselogicof the command. In the case of the above example

BB = 0x51 = 01010001 in binary. The logical inverse = 10101110 in binary, which is just 0xAE.

AA = 0xAE. Binary = 10101110

The AA code is not used for our remote control configuration.

Press all the buttons on remote control and run the dmesg -c command. In our case we have the following codes

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

[563.475708@0]remote:Wrong custom code is0xae517f80

[564.273258@0]remote:Wrong custom code is0xb24d7f80

[565.096453@0]remote:Wrong custom code is0xf6097f80

[565.805424@0]remote:Wrong custom code is0xee117f80

[566.450804@0]remote:Wrong custom code is0xab547f80

[567.118602@0]remote:Wrong custom code is0xb04f7f80

[567.963741@0]remote:Wrong custom code is0xa9567f80

[568.631341@0]remote:Wrong custom code is0x42bd7f80

[569.321289@0]remote:Wrong custom code is0x44bb7f80

[570.077504@0]remote:Wrong custom code is0xb14e7f80

[570.953170@0]remote:Wrong custom code is0xac537f80

[571.665000@0]remote:Wrong custom code is0xe41b7f80

[572.354812@0]remote:Wrong custom code is0xd9267f80

[573.163774@0]remote:Wrong custom code is0xda257f80

[573.853329@0]remote:Wrong custom code is0xf20d7f80

[574.520600@0]remote:Wrong custom code is0xd8277f80

[575.210029@0]remote:Wrong custom code is0xd7287f80

[575.988176@0]remote:Wrong custom code is0xb6497f80

[576.633419@0]remote:Wrong custom code is0xad527f80

[577.189905@0]remote:Wrong custom code is0xce317f80

[577.834915@0]remote:Wrong custom code is0xcd327f80

[578.391382@0]remote:Wrong custom code is0xcc337f80

[578.881274@0]remote:Wrong custom code is0xcb347f80

[579.482089@0]remote:Wrong custom code is0xca357f80

[580.060612@0]remote:Wrong custom code is0xc9367f80

[580.550538@0]remote:Wrong custom code is0xc8377f80

[581.195652@0]remote:Wrong custom code is0xc7387f80

[581.730036@0]remote:Wrong custom code is0xc6397f80

[582.242330@0]remote:Wrong custom code is0xa7587f80

[582.865319@0]remote:Wrong custom code is0xcf307f80

[583.554914@0]remote:Wrong custom code is0xbb447f80

The mapping of the remote control in kodi is in the /usr/share/kodi/system/keymaps/remote.xml file.

We mapped the remote control codes to the Linux input events. As an example let’s consider the Power button. The remote control code is

1

0x51

The KEY_POWER event in the input-event-codes.h file is

1

116

We created a link between the remote control code and the event in Linux in the key_begin, key_end section of the remote.conf file

1

2

3

4

key_begin

0x51116#Poweroff KEY_POWER

key_end

Between the two data

1

0x51116

insert a space, as indicated in Amlogic document linked above . The file used in this case is available at the following link

In the market there are several TV boxes equipped with Android. Among the most common there are those based on soc Amlogic. For devices with this module there is the way to run, evenin parallelwithout removing the Android image, a media center system based on Linux and Kodi, which is Libreelec.It is afork of themediacenterOpenELECsystem

The supported platforms are similar to those already available for OpenELEC, but the community is carrying out the development of other images besidesthe official ones; this is the case for the Amlogic platform.

We’ll install a Libreelec image for an Amlogic S905 box, in our case the box is Android Beelink MiniMX III. The box comes with on board an Android firmware on the internal flash. The next steps allow to keep the Android firmware of the internal flash and Libreelec on the micro sd card. These instructions can be repeated at least in part with other boxes with soc Amlogic. Refer to Libreelec forum for more insights.

The first operation is to download the image from the link given on Libreelec forum

Amlogic S905 Libreelec Images

We download the version 7.0.2.007

Libreelec S905 7.0.2.007

At the link above there also the dtb files, device tree file, file containing the specifications of the hardware system, for different boxes already tested.

We unzip the file and load it on a micro sd card in a similar way to what was done for the creationofOpenELECimage for theOrange IP PC

Again we launch Win32DiskImager and after unpacking the LibreELEC-S905.aarch64-7.0.2.007.img.gz file we proceed to the writing on the micro sd card.

At this point,we insert the micro sd card into the box that we start holding down, in the case of this model, the reset button on the bottom of the box. This is a one-time process; to subsequent reboots the system starts Libreelec, if there is the Micro SD card, or Android system, present on the internal flash, in the absence of micro sd card.

The image automatically uses the remote.conf file for the remote control from the Android image intalled in the internal flash.

The configuration steps are quite similar to what was done forOpenELEC Orange PI PC, such as to enable the ssh daemon, etc; in this case the remote control, being a box supported by the image, is already working.

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. Before performing any operation, make sure that you have the original image of the box so you can recover the Android system in case of issues.

In the next article we will seehow to configure an infrared remote control with NEC protocol on a system based onsoc Amlogic