Libreelec: Compile latest Libreelec for Orange Pi PC

Hi,

Libreelec for Allwinner CPUs is currently under development.

If you want to compile the latest version you have to compile it from source or use the precompiled images.

Ensure you have enough disk space (>= 20GB). These steps are necessary for a Orange Pi PC and you have to adopt it to your device.

root@debdev ~ # apt-get install -y build-essential \
                   git \
                   libjson-perl \
                   libxml-parser-perl \
                   xfonts-utils \
                   unzip \
                   zip \
                   gawk \
                   default-jre \
                   libncurses5-dev \
                   xsltproc \
                   lzop \
                   gperf \
                   patchutils \
                   bc \
                   libparse-yapp-perl \
                   zstd \
                   python \
                   flex

Enable git lineending conversation CrLf -> Lf

michael@debdev ~ # git config --global core.eol lf
michael@debdev ~ # git config --global core.autocrlf input

Get allwinner branch

michael@debdev ~ # git clone https://github.com/LibreELEC/LibreELEC.tv 

List of valid devices and the CPU they based on

cat ./scripts/uboot_helper

Start compiling (takes some hours)

michael@debdev ~ # cd LibreELEC.tv
michael@debdev ~ # ARCH=arm PROJECT=Allwinner DEVICE="H3" UBOOT_SYSTEM="orangepi-pc" make

Here is a list of available build commands.
To add additional Addons

List all available

michael@debdev ~ # ARCH=arm PROJECT=Allwinner DEVICE="H3" UBOOT_SYSTEM="orangepi-pc" ./scripts/create_addon all --show-only

Add add your plugins
compile the plugins

michael@debdev ~ # ARCH=arm PROJECT=Allwinner DEVICE="H3" UBOOT_SYSTEM="orangepi-pc" ./scripts/create_addon pvr.vdr.vnsi

Find the plugin

michael@debdev ~ # find /home/michael/LibreELEC.tv/ -name pvr.vdr.vnsi*.zip

copy it to the addon folder extract it and delete the zip file

michael@debdev ~ # cp ~/LibreELEC.tv/target/addons/9.1/H3/arm/pvr.vdr.vnsi/pvr.vdr.vnsi-3.6.2.2.zip ~/LibreELEC.tv/build.LibreELEC-H3.arm-9.1-devel/image/system/usr/share/kodi/addons
michael@debdev ~ # cd ~/LibreELEC.tv/build.LibreELEC-H3.arm-9.1-devel/image/system/usr/share/kodi/addons
michael@debdev ~/LibreELEC.tv/build.LibreELEC-H3.arm-9.1-devel/image/system/usr/share/kodi/addons # unzip pvr.vdr.vnsi-3.6.2.2.zip
michael@debdev ~/LibreELEC.tv/build.LibreELEC-H3.arm-9.1-devel/image/system/usr/share/kodi/addons # rm pvr.vdr.vnsi-3.6.2.2.zip

Compile a single package

michael@debdev ~ #  cd ~/LibreELEC.tv
michael@debdev ~/LibreELEC.tv # ARCH=arm PROJECT=Allwinner DEVICE="H3" UBOOT_SYSTEM="orangepi_pc" ./scripts/build u-boot:init


michael@debdev ~/LibreELEC.tv # ARCH=arm PROJECT=Allwinner DEVICE="H3" UBOOT_SYSTEM="orangepi-pc" ./scripts/build u-boot:target


Create image

michael@debdev ~/LibreELEC.tv # ARCH=arm PROJECT=Allwinner DEVICE="H3" UBOOT_SYSTEM="orangepi_pc" make image

The image can be found gzip compressed in target folder

michael@debdev ~ # ls -l target/LibreELEC*.img*

To write it to an SD Card uncompress the image

michael@debdev ~ # cd target
michael@debdev ~/target # gunzip

and write to card

root@debdev ~ # dd if=/home/michael/LibreELEC.tv/target/LibreELEC-H3.arm-9.1-devel-20190312221457-fb05d17-orangepi_pc.img of=/dev/sdc bs=4M


Have fun

Michael

Leave a Reply