How to compile own LibreELEC image?

  • Unti now, my selfhosting experience did not need any compiling, but for my current goal I need a custom Libreelec image, because I wish to use systemd-journald-remote and play around wit virt-mgr and spice. (running on a Proxmox) What is needed for compiling my own Libreelec and have it up to date along the usual Libreelec publish?

  • I have a related question:

    I'm building LE 12.2 with a modified Kodi on a new PC.

    Using the PROJECT=Generic ARCH=x86_64 tools/download-tool option

    I'm getting errors for 3 files the download-tool option cannot download (sites are down). Example:

    --2025-12-29 17:08:44-- http://git.savannah.gnu.org/cgit/grub.git/…rub-2.12.tar.gz
    Resolving git.savannah.gnu.org (git.savannah.gnu.org)... 209.51.188.168, 2001:470:142::168
    Connecting to git.savannah.gnu.org (git.savannah.gnu.org)|209.51.188.168|:80... failed: Connection timed out.
    Connecting to git.savannah.gnu.org (git.savannah.gnu.org)|2001:470:142::168|:80... failed: Network is unreachable.
    --2025-12-29 17:09:16-- http://sources.libreelec.tv/mirror/grub/grub-2.12.tar.gz
    Resolving sources.libreelec.tv (sources.libreelec.tv)... 65.109.172.87
    Connecting to sources.libreelec.tv (sources.libreelec.tv)|65.109.172.87|:80... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2025-12-29 17:09:16 ERROR 404: Not Found.

    This repeats trying until it eventually gives up and moves to next download


    I can find that file (grub-2.12.tar.gz) and others needed on the web. I thought if I copied them to my local LE build 'sources' folder the build would work, but the build process actually ignores the existing file and attempts to d/l anyway. I noticed a 'Zone.Identifier' file and created one but still the build process wants to download.


    Question:

    How can I just copy those missing files and stop the build process from attempting a d/l?

    (I guess I can wait a few days for the servers to go back on line...)

    THX

    Garry

  • I thought if I copied them to my local LE build 'sources' folder the build would work, but the build process actually ignores the existing file and attempts to d/l anyway

    You can fake/do that *if* you add the .url and .sha256 files alongside the source file. If you only add the source file, the buildsystem sees it as an incomplete package and reattempts download.

  • For me, it's a bit complicate to understand: https://wiki.libreelec.tv/development/build-docker

    Could it be that there are some steps missing?

    If I open https://github.com/LibreELEC/Libr…er/tools/docker

    As far I understand, the first step you have to do, if you try to build libreelec with docker is to run
    docker build --pull -t libreelec tools/docker/questing. But there are no definition of the git address.


    Then, I assumed that may the stepps are not in the right order and further below the basics are needed first. But there I'm also not sure because I assume that this basics should be needed inside a docker container and not on the system where docker run.


    I'm a bit confused.

  • I'm a bit confused.

    Most people get confused with Docker and containers so don't sweat it :)

    Containers virtualise an app within a supporting environment. In our case the app binary is 'make' although this is not that clear unless you understand how our buildsystem works.

    The docker steps are correct. The info that's probably missing is an instruction to git clone the LE sources first.

    Then you need to 'docker build' the container by 'pulling' from a docker source. This is a local Dockerfile and not a URL or a pre-built container from the online docker 'hub' repo. From a cloned LibreELEC.tv source folder the source files are in tools/docker/

    Then you need to 'docker run' the container, with the run command providing instructions to the docker runtime on directories to map, and buildsystem variables (PROJECT=X, DEVICE=Y, ARCH=Z, etc.) that are passed to 'make' to define what image to create.

    It might be easier to run an Ubuntu server LTS release VM under proxmox and SSH into that environment to install dependencies, clone sources, and build using the CLI commands that you can see in the normal build instructions. The main reason we support Docker building is for our own CI use-cases building nightlies etc. .. not because it's a better/easier option.

  • OK, thanks. I assum I got it so far.

    # DockerHost

    after that I end in the docker system

    # DockerContainer

    Code
    sudo apt update
    sudo apt upgrade
    sudo apt install bc curl g++ gcc git gperf make openjdk-11-jre-headless rsync unzip xfonts-utils xsltproc xz-utils zip
    
    cd ~;git clone https://github.com/LibreELEC/LibreELEC.tv.git;cd LibreELEC.tv
    currentVersion=$(git tag | sort -V | tail -n 1)
    git checkout ${currentVersion}
    PROJECT=Generic ARCH=x86_64 tools/download-tool

    Was every thing correct understood?

    cause, I got errors (like homerJau?):


    What would be the next step If my goal is to add this to my libreelec ?:

    Code
    systemd-journal-remote; qemu-guest-agent; rocm-qemu-support; qemu-system-modules-spice
  • edid-decode is added at our mirror.

    For kmscube - the hash has changed at the source.
    - I have created the PR to fix this.

    - in the mean time please run.

    CHANGE_HASH=yes scripts/get kmscube