[Solved] LibreElec test Build HOW TO

  • I have starting the process of making my own build of LibreElec 8 kodi 17. I am a totall noobie at this so its a work in progress, I am attempting to add support for SIL680 & Nvidia Geforce 7 series cards.
    I am only building for the new release because building for the current stable I dont have a script for. I understand the process for stable but then throwing in new drivers makes it more error prone and I already wasted a lot of time trying to build stable without success. The scripts milhouse uses seem to make things easier but of course Ive got some errors.
    See this tread for more backstory and about Milhouses scripts see: LibreELEC Testbuilds for x86_64 (Kodi 17.0) or Python not building

    Here is the updated guide on how to build LibreElec if your a total noob..

    Full build instructions for LibreElec first time build. This is mostly Milhouses readme with added instructions for first time users. Hope this helps anyone who is struggling to build there own LibreElec with custom hardware support.
    Get a github ID.. Sign up at github.com

    Install Ubuntu minimal 54mb 1604 build make sure ssh is installed along with xubuntu minimal. Installation/MinimalCD - Community Help Wiki Once installed open terminal in the gui and do the following:

    1.1 Configure git (change http://user.name/user.email as appropriate) both steps are required.

    $ sudo apt-get install git
    $ git config --global user.name "YourGithubUsername"
    $ git config --global user.email "[email protected]"
    $ git config --global push.default simple

    Setup git so you don’t hit download limit of free users.
    $ nano ~/.git.conf

    GIT_USERNAME="YourusernameHere"
    GIT_PASSWORD="YourpasswordHere"

    1.2 Ubuntu dependencies, added gedit incase you don't want to use nano you can use gedit and the default browser does not seem to work so firefox was used, these are optional:
    $ sudo apt-get install curl g++ gawk gperf xsltproc xfonts-utils default-jre libncurses5-dev texinfo ccache u-boot-tools python python3 firefox gedit

    1.3 Environment setup:

    $ cd ~
    $ mkdir projects
    $ cd projects
    $ sudo apt-get install pv pxz pigz pastebinit patchutils
    $ git clone git://http://github.com/LibreELEC/LibreELEC.tv.git
    $ wget -q oebuild.tar.gz -O - | tar xvz

    2. Configure your details in ~/projects/build.conf:
    $ mv build.conf.sample build.conf

    2.1 Edit build.conf. This is the step where you change profile. If you wish, set a default profile with the following entry (pi2 is an example):
    [ -z "${PROFILE}" ] && PROFILE=pi2
    $ nano ~/projects/build.conf
    Or $ gedit ~/projects/build.conf


    2.2 Add support for other hardware or make edits for driver support. You can also remove support to speed up build. This legacy hardware txt is below and adds support for geforce series 7 and SIL680 IDE card. This maybe a request for help on the forums. However you may also find methods online to add support for your hardware. This script is here as an example of the edits needed to add such support.
    $ echo "=master forwardPatch 00_legacy_hardware.txt" >> ./lepull.dat

    3. Start building:

    cd ~/projects
    PROFILE=multi-master ./autobuild.sh


    ECHO LEGACY HARDWARE TXT file for support of Geforce Series 7 & SIL680 RAID/IDE CARD.

    Edited once, last by madhits (August 9, 2016 at 7:19 PM).


  • try building again?

    Not sure why you're not building vanilla LibreELEC


    Irusak. I have tried about 20-30 times. This morning same result. I tried moving the problem line to the bottom of the lepull.dat file but it just errors on a different curl line item. Its weird, its something with curl because when I use wget it works. I'm not sure how to make the script use wget over curl though. I even reinstalled curl. No luck there.

    As for not going with vanilla build, I knew that would come up if you or chewitt responded. The reason for this is because I'm a noob and honestly barely understand what is going on during the build process. However I do understand scripts (IE low level coding), I used to build my own scripts back when I built windows installers so they do make sense to me and milhouse was kind enough to share his build process with me and its been digestable for someone with no exp. Before this I wasted my time trying to build a vanilla stable build and I got errors and could not understand why. I now believe it was because I was missing a lot of the tools needed to make the build work. Milhouse also wrote me a script for the hardware support I need. I seriously owe him a beer. Not to totally dog you or chwett but this process has to be made a lil easier if you want more people involved. I get the sense that you and chewett dont want any new devs. I hope my feeling is way off. Making some scripts up and posting them may help a lot of people get into this. I have always learned by looking at the answer and working backwards, maybe that is why scripting is something I get.

    Update: I dont believe it but I had the ~/.git.conf configured wrong.. OYE.. Noobie error!

    UPDATE2: Still getting input stream errors.. No solution so far. wget of these git directories works but script ignores downloaded version.

    Edited once, last by madhits (August 3, 2016 at 9:11 PM).

  • These errors are related to SSH. I am sshing into my ubuntu minimal install from a mac on my local network. So I generated a SSH key for my mac. Is that right?

    Or do I have generate one for my ubunti minimal machine and forget the mac? I am just using ssh cuz this is the machine I am planing to eventually run the custom install of LibreELEC on. This is so damn confusing. Is there such a thing as double sshing. IE I ssh into my ubuntu machine and then also ssh into github. Wow does that do my head in...


  • Not to totally dog you or chwett but this process has to be made a lil easier if you want more people involved. I get the sense that you and chewett dont want any new devs. I hope my feeling is way off. Making some scripts up and posting them may help a lot of people get into this. I have always learned by looking at the answer and working backwards, maybe that is why scripting is something I get.

    Oh, we would love more developers, but proper developers typically take a quick look at our very logical buildsystem and crack on with the thing they wanted to do. People who are not developers are the ones who struggle with the process. To be brutally honest, if people haven't got developer skills they are not the developers we want to attract.

    First thing to do is create a completely stock version of LE with no changes following the instructions in the wiki. This proves the build-system works (which it does, I build images using it every day). Once you have a working stock image, there are two one-line changes to make (kernel things) and maybe one patch to find (for 304.131 on 4.7 kernel) and the work is done. No need for scripts.


  • Not to totally dog you or chwett but this process has to be made a lil easier if you want more people involved. I get the sense that you and chewett dont want any new devs. I hope my feeling is way off. Making some scripts up and posting them may help a lot of people get into this. I have always learned by looking at the answer and working backwards, maybe that is why scripting is something I get.

    I really don't understand you here. We would love more developers, but we are not here to teach everone how to do it. We are here on our own time and barely have enough time to get things done as it is. I am grateful that we have some non developers as part of the team that take on technical support issues and community involvement.

    Saying that the build process is too complicated is a farce. It's literally three lines to get you going (if you have the proper dependencies installed).

    Code
    git clone https://github.com/LibreELEC/LibreELEC.tv.git
    cd LibreELEC.tv
    PROJECT=Generic ARCH=x86_64 make image

    It's really that easy

    if you want to build and/or clean a package individually just call the respective script

    Code
    PROJECT=Generic ARCH=x86_64 ./scripts/clean kodi
    PROJECT=Generic ARCH=x86_64 ./scripts/build kodi

    And as chewitt said, get a working build first, then make adjustments from there.

    there is some documentation here,
    Compile - LibreELEC
    and here,
    Development workflow - OpenELEC

  • What I meant by making it easier is a walkthrough explaining each step and what the prerequisits are. I had Milhouse help me and even with his scripts, readme and most of a guide as a total noob I still ran into some minor errors. Granted making those mistakes helped me learn the process, and some mistakes were bound to come up. The openelec docs despite being basic are a lil outdated and do not give the finer detail that someone thats never touched linux needs. Now luckly Ive had some knowledge from my hackintosh experence. A lot of the commands and some of this stuff is simular. That's just my 2 cents on it. I liked that Milhouse uses scripts for his work as it really allows you to work backwards like I said before. I was able to look at his scripts and patches and see more or less what they did. Editing them in the future without breaking them will be my next goal. A slow process but I'm learning along the way. My 1st custom build will be done in a few hours hopefully.


  • What I meant by making it easier is a walkthrough explaining each step and what the prerequisits are.

    This isn't detailed enough for you: Compile - LibreELEC ?


    The openelec docs despite being basic are a lil outdated and do not give the finer detail that someone thats never touched linux needs.

    So you expect the devs to give everyone basic linux training? Get a grip, use Google and you'll find enough places specialized in that.

    Edited once, last by Grimson (August 4, 2016 at 10:11 PM).

  • This isn't detailed enough for you: Compile - LibreELEC ?

    So you expect the devs to give everyone basic linux training? Get a grip, use Google and you'll find enough places specialized in that.


    I have done that, of course. Now that I think about it this kind of problem cant be completely fixed by the devs, but I think they either inspire people or drive them away. The walkthroughs and guides have to come from the community really. Different users offering up there own experences as to how they got this done. Don't you guys wonder why Linux cant overtake windows or osx on the desktop? Why avg user thinks linux is so hard? and why do we not try to break that sterotype down? It has a lot to do with community involvement, making it appear easy to build something, despite if it is really that difficult or not. Insaenlymac/tonymacx86 is busting with people offering how they got OSX bla bla on there machine. However when I look at LIbreElec or openElec I dont see the average user making there own builds unless its just for them and not sharing the exp with others. Why is that?

    Over at the insanelymac community. Average users are constantly posting how they got there install done and what lil steps they took to make it work. The task of installing OSX on a pc is complicated but it has gotten easier through new tools. My point is the guides, & the users who write them make this community more digestable to the average user. I felt like making my own build before this and I thought it was almost impossible due to the feedback I got from this forum. However I tried anyway and I used the openelec guide above and ran into countless errors and gave up. I could not understand what the errors were and spent a solid 3 weeks googling because there was no avg joe blow who had come before me trying to do this and publishing there results, mistakes and errors. Even the topic milhouse pointed me at over at kodi.tv the guy gave up and never got the build done. Why is that? I might not have all the answers but I can certainly see the problem.


  • I have done that, of course. Now that I think about it this kind of problem cant be completely fixed by the devs, but I think they either inspire people or drive them away. The walkthroughs and guides have to come from the community really. Different users offering up there own experences as to how they got this done. Don't you guys wonder why Linux cant overtake windows or osx on the desktop? Why avg user thinks linux is so hard? and why do we not try to break that sterotype down? It has a lot to do with community involvement, making it appear easy to build something, despite if it is really that difficult or not. Insaenlymac/tonymacx86 is busting with people offering how they got OSX bla bla on there machine. However when I look at LIbreElec or openElec I dont see the average user making there own builds unless its just for them and not sharing the exp with others. Why is that?

    Over at the insanelymac community. Average users are constantly posting how they got there install done and what lil steps they took to make it work. The task of installing OSX on a pc is complicated but it has gotten easier through new tools. My point is the guides, & the users who write them make this community more digestable to the average user. I felt like making my own build before this and I thought it was almost impossible due to the feedback I got from this forum. However I tried anyway and I used the openelec guide above and ran into countless errors and gave up. I could not understand what the errors were and spent a solid 3 weeks googling because there was no avg joe blow who had come before me trying to do this and publishing there results, mistakes and errors. Even the topic milhouse pointed me at over at kodi.tv the guy gave up and never got the build done. Why is that? I might not have all the answers but I can certainly see the problem.

    You're comparing apples to oranges. Installing software does not equal compilling software.

    When building LibreELEC you are compiling every piece of software used from scratch. Anything can happen, it can depend on packages you alread have installed on your host system. I personally compile LibreELEC within a minimal linux container that contains only what I need to compile it. The errors can be anything and asking a question about each one is impossible. This is where google is your friend because if a pcakge doesn't compile for some reason there is probably someone else out there that has had the same problem (probably not for LibreELEC though).

    The guides and wikis that we have were mostly written by me. I did most of the old OpenELEC wiki and some guys have ported some of it over to our wiki. It lays out everything you really need to know to get going. I'm sorry you have errors while building but we can't know everything about your system and what is installed on it that is possibly producing an error.

    I use to do the hackintosh thing also, but that is a useless endeavour as linux is much more powerful for me and runs natively on most hardware (even the macbook that I am typing this on). So I'm sure they have a bustling community as I'm sure many people would like to use OSX on other hardware but it is very different than what we provide.

    Your hardware you are using is very old, I'd be surprised if you could even use OSX on it. So why do you think we should support it? The entire point of our distrobution is to have a small embedded distro with the minimal amount of tools and packages you need to have a complete media center. We cannot support everything and I'm sure there is many individuals out there that would like to have something supported but whats the point if it's only a couple people out of a install base of what is now about 50,000 users?


  • Your hardware you are using is very old, I'd be surprised if you could even use OSX on it. So why do you think we should support it? The entire point of our distrobution is to have a small embedded distro with the minimal amount of tools and packages you need to have a complete media center. We cannot support everything and I'm sure there is many individuals out there that would like to have something supported but whats the point if it's only a couple people out of a install base of what is now about 50,000 users?

    Yeah some of my hardware is very old. I really pride myself on using old, outdated, or discarded hardware because it goes against the throw away culture we live in. People are always amazed by old 2005/2006/2007 built system that run 1080p 5.1 dolby sound. I've referenced the story of stuff before and I truely believe in that. See: Story of Stuff

    The problem is exactly what you say. Not a lot of people are willing to keep there old hardware and because not a lot of people keep it we are stuck with no support for it. Well sorta, drivers are still written by some companies but then no one uses them and thus they dont get updated. Its a cycle of out with the old in with the new. As surprising as it sounds your decision to drop Nvidia series 7 will affect Nvidia's decision to update in the future if they were that is. Nvidia is pretty awesome to keep supporting there legacy hardware and I want to of course use my old hardware but also because they made the driver and I want to say thank you. I cant convince you guys to support old hardware out of principle because 1. The user base numbers dont support it. and 2. There are distros that do that, just not jeos for old hardware. which is what I want.

    Anyway now that I have a basic understanding of the build process I hope to get a build done myself with your help. I had to start again with milhouses script running because it failed last night. Now its at 55% again and I'm hoping it completes this time. I also started my build on a minimal ubuntu ISO.. 54mb and I added only whats needed to build LibreElec besides firefox and xbuntu minimal GUI. The system or at least the hard drive I'm using will be dedicated to building LibreElec in the future and other linux tasks. I will remember to keep it clean though since that effects the build process.

    Edited once, last by madhits (August 5, 2016 at 9:07 PM).

  • Hello,
    I just started to build with legacy drivers and I just want to check if I'm doing everything properly:
    00h00m00s: Generating build archive...
    00h00m00s: Git branch is: master
    00h00m00s: Kodi branch is: master
    00h00m00s: OE_KODI_VER is: kodi
    00h00m00s: Profile : x86-nightly
    00h00m00s: Debug enabled : No
    00h00m00s: Proj/Arch/Vers: Generic/x86_64/devel-nightly
    00h00m00s: Build Log : /home/vali/libreelec-vali/log.job1
    00h00m00s: Build Path : /home/vali/libreelec-vali/http://LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.0-devel-nightly
    00h00m00s: Build code is : 160912
    00h00m00s:01h44m53s: 0.00% complete [x86-nightly: log.job1] / (binutils)

  • change PKG_VERSION in packages/x11/driver/xf86-video-nvidia-legacy/package.mk

    If the driver throws an error on compilation it's probably missing a patch to build 304.131 against a Linux 4.7 kernel. The solution is to use Google to find the patch. I normally look at the driver packages for Arch linux, as Arch runs a current kernel and will need the same patch.


  • change PKG_VERSION in packages/x11/driver/xf86-video-nvidia-legacy/package.mk

    If the driver throws an error on compilation it's probably missing a patch to build 304.131 against a Linux 4.7 kernel. The solution is to use Google to find the patch. I normally look at the driver packages for Arch linux, as Arch runs a current kernel and will need the same patch.

    i changed, but when i start compiling, somehow file is changing back to 340 :S