LibreELEC configure/build process

  • Hello,

    I am looking for detailed info on how the configuration/build process works with LibreELEC. Specifically, I am trying to understand how the devs have taken JeOS, and turned it into the multimedia appliance OS that we know and love today. I use multiple copies of LibreELEC throughout my house, and I love the simplicity, yet also powerful features it offers. I would like to replicate the process for a project of my own, but doesn't have KODI as the primary focus.

    Can anyone point me in the right direction?

  • Unless I'm missing something, I don't think that really helps me. That's LibreELEC's git repo, which, while still needing a compile, and probably itself is configurable depending on options in the compile process, doesn't really help me with how they configured JeOS in the first place. I'm trying to understand the mechanics within JeOS, and how the LibreELEC team was able to craft it to their usage to begin with. Is there any documentation on that?

    I'm also curious to how KODI is being loaded as a GUI. Is it running on top of any kind of desktop? It doesn't seem to me that it is. If not, can this be applied to other programs, like for example, a browser?

  • guitarist46559

    JeOS is not actually an OS, it's a paradigm. LibreELEC is a fork of OpenELEC which in turn was based on geexbox. In my head, this "crafting documentation" you look for would be the commit logs. If not that, what exactly is it you are looking for then, can you point to a similar type of documentation for a different OS? If you want to be able to modify it to run something other than Kodi, you would need to get familiar with the "source code", which really is just a bunch of scripts that sets up a cross compiling toolchain, compiles all the packages then installs them to a directory which is used to create an image.

  • LE uses fluxbox as a basic Xorg windowmanager (further in the past we used ratpoison) on x86 hardware. Other hardware currently runs on the kernel framebuffer (no Xorg) and with the next evolution of LE (and Kodi) graphics architecture everything uses DRM/KMS (GBM) and a zero-copy rendering/decoding pipeline based on the kernel V4L2 stack.

    The build-system was borrowed from geexbox but the design principles behind the OS are from Welcome to Linux From Scratch!

    It's simple to build the OS without Kodi; set mediacentre to 'none' (or something else that matches a package name) in distro options. There are people using it for weather stations on a Pi in addition to multiple other flavours of media app. You need to poke/understand how the build-system works to get anywhere with adapting it for other needs. If you succeed please keep in touch and consider submitting enhancements back to our main repo that allow easier adaption for other uses, because it's great to see our codebase forked and repurposed in this way.

  • Thanks guys, I'll have to spend some time digging through these links, but I think this is more in line of what I was looking for.

    As for my usage, I plan on using it on a Pi for several different things, including an HVAC thermostat that is heavily integrated into a home automation/security system. Still in early conceptualization at this point, but I feel like the platform that LE is based on will provide the best starting platform to move ahead with these projects.

  • GitHub - chewitt/LibreELEC.tv at leiot-8.0 has an alternative 'distribution' configuration for "LEIoT" which removes Kodi and gives you a more stripped back configuration about 80MB in size. I forget whether I completed it, so YMMV. GitHub - stefansaraev/TB: :D is derived from LE but goes ultra-minimal with an image for WeTek Play 2 that's about 50MB (including Kodi). Lots of good ideas and "prior art" to borrow.

  • Thanks chewitt! Those sound perfect! I will take a look at those also. One of the reasons I'm going this route for my project, is that I've looked around, and while I have found projects that do thermostats for the raspberry pi, all of them seem to run a full blown image of raspbian, depend on running bloated java, or both. And my philosophy is, if you have to run a full blown X11, or use a jvm just to run a thermostat, you're doing it wrong.

  • Thanks for the links guys! I have been experimenting with the default build just to get the hang of how it's done, and started exploring making adjustments to the settings to see how it's otherwise done. I have a question though, one of the things I want to do is use this on a Raspberry Pi, and install drivers for a 3.5" touch screen that attaches to the GPIO headers (a chinese knock off, but like most of them, based off of the waveshare screen, and appears to be compatible with the original waveshare drivers). I have used other distributions that already had the driver installed, and the screen works fine, but I'm not exactly sure how I would go about adding these drivers to LE. Most of the settings I've seen so far appear to be KODI specific. Where would I go to add these drivers?

  • Have a look at the directory packages/linux-firmware . Those firmware files also come as binary files only, so it is just a matter of downloading it and copying it to the desired location.