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.
diff --git a/packages/x11/driver/xf86-video-nvidia-legacy/package.mk b/packages/x11/driver/xf86-video-nvidia-legacy/package.mk
index 3609de7..ab4fd95 100644
--- a/packages/x11/driver/xf86-video-nvidia-legacy/package.mk
+++ b/packages/x11/driver/xf86-video-nvidia-legacy/package.mk
@@ -17,7 +17,7 @@
################################################################################
PKG_NAME="xf86-video-nvidia-legacy"
-PKG_VERSION="340.96"
+PKG_VERSION="304.131"
PKG_REV="1"
PKG_ARCH="x86_64"
PKG_LICENSE="nonfree"
diff --git a/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-0001-kernel-4.6-fix.patch b/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-0001-kernel-4.6-fix.patch
index 74c668d..54ecb0d 100644
--- a/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-0001-kernel-4.6-fix.patch
+++ b/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-0001-kernel-4.6-fix.patch
@@ -1,30 +1,55 @@
---- a/kernel/os-mlock.c 2015-11-08 21:43:39.000000000 -0800
-+++ b/kernel/os-mlock.c 2016-04-18 15:09:59.940350210 -0700
-@@ -49,7 +49,7 @@
+diff -Naur a/kernel/nv-mlock.c b/kernel/nv-mlock.c
+--- a/kernel/nv-mlock.c 2015-11-09 05:44:13.000000000 +0000
++++ b/kernel/nv-mlock.c 2016-05-27 09:34:30.000000000 +0100
+@@ -49,8 +49,13 @@
}
down_read(&mm->mmap_sem);
-- ret = get_user_pages(current, mm, (unsigned long)address,
-+ ret = get_user_pages((unsigned long)address,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+ ret = get_user_pages(current, mm, (unsigned long)address,
page_count, write, force, user_pages, NULL);
++#else
++ ret = get_user_pages_remote(current, mm, (unsigned long)address,
++ page_count, write, force, user_pages, NULL);
++#endif
up_read(&mm->mmap_sem);
pinned = ret;
-@@ -62,7 +62,7 @@
+
+@@ -62,7 +67,11 @@
else if (pinned < page_count)
{
for (i = 0; i < pinned; i++)
-- page_cache_release(user_pages[i]);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+ page_cache_release(user_pages[i]);
++#else
+ put_page(user_pages[i]);
++#endif
os_free_mem(user_pages);
return RM_ERR_INVALID_ADDRESS;
}
-@@ -114,7 +114,7 @@
+@@ -80,7 +89,11 @@
+ {
+ pci_unmap_page(dev, pte_array[j],
+ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
+- page_cache_release(user_pages[j]);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
++ page_cache_release(user_pages[j]);
++#else
++ put_page(user_pages[j]);
++#endif
+ }
+ os_free_mem(user_pages);
+ return RM_ERR_OPERATING_SYSTEM;
+@@ -114,7 +127,11 @@
PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
if (write)
set_page_dirty_lock(user_pages[i]);
- page_cache_release(user_pages[i]);
-+ put_page(user_pages[i]);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
++ page_cache_release(user_pages[i]);
++#else
++ put_page(user_pages[i]);
++#endif
}
os_free_mem(user_pages);
-
diff --git a/projects/Generic/linux/linux.x86_64.conf b/projects/Generic/linux/linux.x86_64.conf
index 8a78117..61fbcf4 100644
--- a/projects/Generic/linux/linux.x86_64.conf
+++ b/projects/Generic/linux/linux.x86_64.conf
@@ -1449,7 +1449,7 @@ CONFIG_PATA_MARVELL=y
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_SCH is not set
# CONFIG_PATA_SERVERWORKS is not set
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=y
CONFIG_PATA_SIS=y
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
Display More