gkreidl
Posts: 6355
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 5:13 am

greenbag wrote:Well, after setting the cpu to 900mhz, the config took about an hour, but the build itself only took 30 minutes with -j4. The config uses all 4 cores even though you don't specify it in the config line. So.. 90 minutes is a lot better. :P

I'm wondering if my cable might have something to do with it as well.. I picked up a right-angled cable for the Passport, so I could fit my entire project in a gutted atx power supply box. The regular cables' ends made the thing slightly too long to fit in my box.

Code: Select all

http://www.miniinthebox.com/right-angled-90-degree-usb-3-0-a-male-to-micro-b-male-90-degree-cable-for-galaxy-note3-n9000-n900-s5-i9600-black_p1124550.html

I did find a fix for the black screen on exit though... kinda. Once you exit Kodi using the exit option, you hit the black screen. The desktop's actually still running, as I could see it flicker if I hit [Ctrl]+[Alt]+[F8]. After some testing, I found that ~[F8] followed by ~[F7] will bring the desktop back. With whatever files you had open, still open.. so you know it's not just a new desktop session. [Ctrl]+[Alt]+[F7] didn't work on it's own.

How the heck do you write that into kodi.desktop? :P
This the start script I used for my builds:
viewtopic.php?f=28&t=139758&p=927086
You can also put that into the desktop file.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Rascas
Posts: 704
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 5:56 am

greenbag wrote:ccache was installed when setting up for Kodi 15.
For example, for me, if I clear ccache or compile a new version of Kodi, in a Ubuntu VM with 4 cores set, it takes about 2:30 hours, this including ./configure, ffmpeg, kodi itself, and everything else.
Then, if compile again the same version, only changing some code, it takes less than one hour.

Of course that if you increse the clock speed, or use more threads, the build is faster.

For me building something on the RPi 2, using 4 threads (make -j4) the build fails almost everytime, hence I generally use -j3. I think it is because of the RAM / Swap, but never took the time to find why, I just build in VM which is faster.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 8:15 am

gkreidl wrote:
greenbag wrote:Well, after setting the cpu to 900mhz, the config took about an hour, but the build itself only took 30 minutes with -j4. The config uses all 4 cores even though you don't specify it in the config line. So.. 90 minutes is a lot better. :P

I'm wondering if my cable might have something to do with it as well.. I picked up a right-angled cable for the Passport, so I could fit my entire project in a gutted atx power supply box. The regular cables' ends made the thing slightly too long to fit in my box.

Code: Select all

http://www.miniinthebox.com/right-angled-90-degree-usb-3-0-a-male-to-micro-b-male-90-degree-cable-for-galaxy-note3-n9000-n900-s5-i9600-black_p1124550.html

I did find a fix for the black screen on exit though... kinda. Once you exit Kodi using the exit option, you hit the black screen. The desktop's actually still running, as I could see it flicker if I hit [Ctrl]+[Alt]+[F8]. After some testing, I found that ~[F8] followed by ~[F7] will bring the desktop back. With whatever files you had open, still open.. so you know it's not just a new desktop session. [Ctrl]+[Alt]+[F7] didn't work on it's own.

How the heck do you write that into kodi.desktop? :P
This the start script I used for my builds:
viewtopic.php?f=28&t=139758&p=927086
You can also put that into the desktop file.

Thank you sir! I came across a kill-kodi script, but it never worked. I shall give it a shot.

btw.. I just did another compile, this time with the Passport connected directly to the Pi.

./bootstrap: 11:55pm
./config: 12:10am 620mb system ram, 4.1mb swap.
make -j4: 12:15am 723mb system ram, 425mb swap.
Kodi built successfully: 1:02am.

That's after I set my gpu_mem=256. So I guess i found the culprit... the usb hub. :P

Code: Select all

https://www.adafruit.com/products/961
I'm surprised I didn't get the coloured box indicating low power, it's still using the same 5v 2.1a supply the Pi's powered with. I did disconnect the wifi dongle though, still connected through the ethernet cable from grabbing system updates and all the compiler stuffs. I did notice the desktop booted quicker. :P

Thank you for proving me wrong... lol. Seriously.. I never knew my system was so out of whack. :D

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 8:28 am

Rascas wrote:
greenbag wrote:ccache was installed when setting up for Kodi 15.
For example, for me, if I clear ccache or compile a new version of Kodi, in a Ubuntu VM with 4 cores set, it takes about 2:30 hours, this including ./configure, ffmpeg, kodi itself, and everything else.
Then, if compile again the same version, only changing some code, it takes less than one hour.

Of course that if you increse the clock speed, or use more threads, the build is faster.

For me building something on the RPi 2, using 4 threads (make -j4) the build fails almost everytime, hence I generally use -j3. I think it is because of the RAM / Swap, but never took the time to find why, I just build in VM which is faster.

With ccache, you just need it installed, or do I need to physically use a command? I just saw it was needed for the Kodi15.txt list.. that's the only reason it's even installed. :P When you say only changing some code, are you running make clean first, or leaving everything else as is... like an OpenELEC build, where it scans the list saying "nothing to do" until it hits something new.. thus doing something new, then carrying on until it either finds another something new.. or finishes the build? If I try that with my setup, it gets all confused.. saying things aren't installed and such. blah. :P

My latest build, just took 67 minutes.. that's with "git clean -xfd && git reset --hard" sent before doing anything. Difference was, I connected the hard drive directly to the usb port of the Pi, rather than through the usb hub. I shouldn't say "directly".. I made a backplate for my box, then modified a dual port panel mount usb unit to mount to my backplate. That cable's "maybe" 10". When I box everything up, I'll see about connecting this cable directly to the Pi. The right-angled cable limits the direction it can sit in the box though.. unless I can mount the hard drive upside down? The ssd maybe, but not sure about the spinning disks in the Passport.

Rascas
Posts: 704
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 8:57 am

greenbag wrote: With ccache, you just need it installed, or do I need to physically use a command? I just saw it was needed for the Kodi15.txt list.. that's the only reason it's even installed. :P When you say only changing some code, are you running make clean first, or leaving everything else as is... like an OpenELEC build, where it scans the list saying "nothing to do" until it hits something new.. thus doing something new, then carrying on until it either finds another something new.. or finishes the build? If I try that with my setup, it gets all confused.. saying things aren't installed and such. blah. :P

My latest build, just took 67 minutes.. that's with "git clean -xfd && git reset --hard" sent before doing anything. Difference was, I connected the hard drive directly to the usb port of the Pi, rather than through the usb hub. I shouldn't say "directly".. I made a backplate for my box, then modified a dual port panel mount usb unit to mount to my backplate. That cable's "maybe" 10". When I box everything up, I'll see about connecting this cable directly to the Pi. The right-angled cable limits the direction it can sit in the box though.. unless I can mount the hard drive upside down? The ssd maybe, but not sure about the spinning disks in the Passport.
You just need it installed and pass the option to use it, which seems that you did if you are following the instructions you posted.
What I was trying to say is that, since you got a very big diference in compile times, I think it is mainly because of ccache. Ccache speeds a lot compile times, because it basically saves most of the compiled code, and if you are compiling the same code again, since it is cached, it doesnt need to be compiled again.
If you i have the upper right square, it clearly indicates you have power issues, it might throttle the SoC speed but I doubt that not using the hub and conecting the disk directly, gives you more disk speed.

I dont compile Kodi exactly the same way that you do, I use debian scripts to create debian packages. For this to work for me, in every new major versions of Kodi, I have to make patches to the source code and changes to the debian scripts to make the compile sucessfully. This is mainly because of changes in the upstream source code, or the need of new library/dependecies. Than, I just issue one command that does everything for me, including the debian packages.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 9:42 am

Rascas wrote:
greenbag wrote: With ccache, you just need it installed, or do I need to physically use a command? I just saw it was needed for the Kodi15.txt list.. that's the only reason it's even installed. :P When you say only changing some code, are you running make clean first, or leaving everything else as is... like an OpenELEC build, where it scans the list saying "nothing to do" until it hits something new.. thus doing something new, then carrying on until it either finds another something new.. or finishes the build? If I try that with my setup, it gets all confused.. saying things aren't installed and such. blah. :P

My latest build, just took 67 minutes.. that's with "git clean -xfd && git reset --hard" sent before doing anything. Difference was, I connected the hard drive directly to the usb port of the Pi, rather than through the usb hub. I shouldn't say "directly".. I made a backplate for my box, then modified a dual port panel mount usb unit to mount to my backplate. That cable's "maybe" 10". When I box everything up, I'll see about connecting this cable directly to the Pi. The right-angled cable limits the direction it can sit in the box though.. unless I can mount the hard drive upside down? The ssd maybe, but not sure about the spinning disks in the Passport.
You just need it installed and pass the option to use it, which seems that you did if you are following the instructions you posted.
What I was trying to say is that, since you got a very big diference in compile times, I think it is mainly because of ccache. Ccache speeds a lot compile times, because it basically saves most of the compiled code, and if you are compiling the same code again, since it is cached, it doesnt need to be compiled again.
If you i have the upper right square, it clearly indicates you have power issues, it might throttle the SoC speed but I doubt that not using the hub and conecting the disk directly, gives you more disk speed.

I dont compile Kodi exactly the same way that you do, I use debian scripts to create debian packages. For this to work for me, in every new major versions of Kodi, I have to make patches to the source code and changes to the debian scripts to make the compile sucessfully. This is mainly because of changes in the upstream source code, or the need of new library/dependecies. Than, I just issue one command that does everything for me, including the debian packages.

The major difference in time, from the first build to the second build, was my system defaulted to 600mhz until I manually set it in my /boot/config.txt. That dropped close to an hour. The second drop in time, was connecting the drive directly to the usb port of the Pi, rather than through a powered usb hub.. as everyone had suggested in everything I've read up until now. That dropped another 30 minutes. So... 67 minute build, from a either a fresh download or a complete git reset.. that wipes out ccache to begin with... is pretty damn good I'd say. Ccache has nothing to do with it if I delete the build folder and download everything fresh. And looking at that Kodi15.txt page, --enable-ccache never gets called. It's in the bottom alternative "old configure flags" section.

Code: Select all

### old configure, compiler flags for pi 2, taken from https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/kodi-rbp/PKGBUILD
##CFLAGS="-Ofast -fexcess-precision=fast -mfloat-abi=hard -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" CXXFLAGS="-Ofast -fexcess-precision=fast -mfloat-abi=hard -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" LDFLAGS="-L/opt/vc/lib" ./configure --disable-gl --enable-gles --with-platform=raspberry-pi --disable-x11 --disable-vaapi --disable-vdpau --disable-avahi --enable-libcec --disable-pulse --disable-projectm --disable-optical-drive --disable-dvdcss --disable-vtbdecoder --enable-alsa --enable-player=omxplayer --enable-ccache

The configure I used didn't have it.

Code: Select all

cd xbmc

./bootstrap

CFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4" CXXFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4" LDFLAGS="-L/opt/vc/lib" FFMPEG_OPTS="--cpu=cortex-a7" ./configure --disable-gl --enable-gles --with-platform=raspberry-pi --disable-x11 --disable-vaapi --disable-vdpau --disable-avahi --enable-libcec --disable-pulse --disable-projectm --disable-optical-drive --disable-dvdcss --disable-vtbdecoder --enable-alsa --enable-player=omxplayer

make -j4

sudo make install

That's it... nothing more.
If you i have the upper right square, it clearly indicates you have power issues, it might throttle the SoC speed but I doubt that not using the hub and conecting the disk directly, gives you more disk speed.
I guess you misunderstood my comment. I'm not getting the rainbow boxed power indicator.. I said i thought I would from plugging the external drive to the usb port directly. Everything I'd read, said even with max_usb_power=1, a 2.1a supply wouldn't be good enough for the pi.. and the drive. So I was surprised it worked.. that's all.
I dont compile Kodi exactly the same way that you do, I use debian scripts to create debian packages. For this to work for me, in every new major versions of Kodi, I have to make patches to the source code and changes to the debian scripts to make the compile sucessfully. This is mainly because of changes in the upstream source code, or the need of new library/dependecies. Than, I just issue one command that does everything for me, including the debian packages.
I just compile the way the instructions in the package tell me to.. or I find a guide. I've used checkinstall in the past to make packages, but when I tried with this.. it tells me it can't find some tar ball or something, then goes through a list of countries.. then continues in a loop. Until I physically close the terminal. blah. :P



edit: I actually add a few more things to the config though... enabling a few more codecs in ffmpeg. That's the reason I started compiling Kodi to begin with. That.. and i wanted to add perl, for zap2xml.. for tvheadend and my hauppauge 950Q atsc usb tv tuner. I haven't done that yet.. I'm guessing the best way would just have it run with Ubuntu when it boots up, making the *xml file ready for Kodi before it even opens up. :)

Rascas
Posts: 704
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 10:29 am

Of course if you had a misconfigured system, running at 600 MHz, when it is suppossed to run at 900 Mhz, of course you will get much better performance, its a 50% increase ;)
greenbag wrote:from a either a fresh download or a complete git reset.. that wipes out ccache to begin with... is pretty damn good I'd say. Ccache has nothing to do with it if I delete the build folder and download everything fresh
That is wrong. Ccache stays at ~/.ccache, it doesn't get wiped by doing that. I suggest you read this:
https://wiki.archlinux.org/index.php/ccache
I dont know if you have it enabled or not, but I suspect that you have it, you can confirm it in the build logs. If not, I recommend that you enable, it is recommend if you frequently build software.
Edit: ccache is automatically enabled if you have it installed, when compiling Kodi.

I don't use checkinstall. You can take a look at my Kodi packages (and others) though, they dont work on Ubuntu because of different libraries/dependencies, only on Raspbian.
http://pipplware.pplware.pt/pipplware/dists/

gkreidl
Posts: 6355
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Building Kodi on Pi 2

Fri Mar 25, 2016 11:33 am

checkinstall does work. I've created my kodi packages with it. Just ignore the error messages.
There's one drawback, though: you create an all-in-one package that contains both kodi and kodi.bin. It doesn't conform to repositories. But it does work.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Sat Mar 26, 2016 2:08 am

Rascas wrote:Of course if you had a misconfigured system, running at 600 MHz, when it is suppossed to run at 900 Mhz, of course you will get much better performance, its a 50% increase ;)
greenbag wrote:from a either a fresh download or a complete git reset.. that wipes out ccache to begin with... is pretty damn good I'd say. Ccache has nothing to do with it if I delete the build folder and download everything fresh
That is wrong. Ccache stays at ~/.ccache, it doesn't get wiped by doing that. I suggest you read this:
https://wiki.archlinux.org/index.php/ccache
I dont know if you have it enabled or not, but I suspect that you have it, you can confirm it in the build logs. If not, I recommend that you enable, it is recommend if you frequently build software.
Edit: ccache is automatically enabled if you have it installed, when compiling Kodi.

I don't use checkinstall. You can take a look at my Kodi packages (and others) though, they dont work on Ubuntu because of different libraries/dependencies, only on Raspbian.
http://pipplware.pplware.pt/pipplware/dists/

600mhz to 900mhz is only 30%. It was a bonehead mistake.. I already admitted that. I'd been up all hours trying to find a distro I could get Kodi 16 to compile on, and when I came across Ubuntu Mate, I decided to see if I could get even the dependencies installed before actually setting up the system. Ubuntu 14.04 had issues with some of the needed libraries... they were already installed in libraspberrypi-bin, libraspberrypi-bin-nonfree, or libraspberrypi-dev. They aren't actually needed.. they were suggested in the Ubuntu guide. Thinking back, I probably could have gotten by without those installed.

Fair enough on ccache... but I never actually enabled it, so it never got used in the first place. ;)
Last edited by greenbag on Sat Mar 26, 2016 2:26 am, edited 2 times in total.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Sat Mar 26, 2016 2:09 am

gkreidl wrote:checkinstall does work. I've created my kodi packages with it. Just ignore the error messages.
There's one drawback, though: you create an all-in-one package that contains both kodi and kodi.bin. It doesn't conform to repositories. But it does work.
I can't ignore the errors... it gets stuck in a loop trying to find country data.. it will literally go for an hour if I let it. Checkinstallrc already has TRANSLATE=0, so that's not it. :(

edit: here's the log:

Code: Select all

-----------------------
Kodi built successfully
-----------------------
ubuntu@mate:~/xbmc$ sudo checkinstall

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist. 
Should I create a default set of package docs?  [y]: n

Please write a description for the package.
End your description with an empty line or EOF.
>> Kodi 16 Ubuntu Mate
>> 

*****************************************
**** Debian package creation selected ***
*****************************************

*** Warning: The package version "16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992
16.0.992" is not a
*** Warning: debian policy compliant one. Please specify an alternate one
1.001

This package will be built according to these values: 

0 -  Maintainer: [ root@mate ]
1 -  Summary: [ Kodi 16 Ubuntu Mate ]
2 -  Name:    [ xbmc ]
3 -  Version: [ 1.001 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ armhf ]
8 -  Source location: [ xbmc ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ xbmc ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue: 

Installing with make install...

========================= Installation results ===========================
Copying kodi binary to /usr/local/lib/kodi/
You can run kodi with the command 'kodi'
Copying support and legal files...                                             
Done!
Copying system files to /usr/local/share/kodi
Copying bindings to /usr/local/include/kodi                                    

======================== Installation successful ==========================

Copying files to the temporary directory...tar: (Simple): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Traditional): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Australia): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Zealand): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (US): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Canada): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Brazil): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Argentina): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Mexico): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (India): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Simple): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Traditional): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Australia): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Zealand): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (US): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Canada): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Brazil): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Argentina): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Mexico): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (India): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Simple): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Traditional): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Zealand): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (US): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Canada): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Devanagiri): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Brazil): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Argentina): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (Mexico): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: (India): Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

I think my system's missing something.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Sat Mar 26, 2016 2:36 am

gkreidl wrote:This the start script I used for my builds:
viewtopic.php?f=28&t=139758&p=927086
You can also put that into the desktop file.
Holy Crap!! It Works!!! :D

Thank you sir!

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Fri Apr 01, 2016 6:51 am

ok... upon further testing...

Seems --enable-ccache is automatic unless specified --disable-ccache, so it seems it was being used without me passing it to the compiler. I eat my words. :P But does it still work if you completely delete the source, then start fresh with another? Wouldn't that get things confused between different releases of kodi.. just because it's still using the ~/xbmc directory.. even though it's a different version?

Other observations... I needed to build tvheadend pvr-hts, as there's no repo for it when you build your own Kodi. blah. Easy enough, but the instructions weren't as straight forward as you'd expect.

Code: Select all

git clone https://github.com/kodi-pvr/pvr.hts.git

cmake -DADDONS_TO_BUILD=pvr.hts -DADDON_SEC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/project/cmake/addons

make
Fair enough... but it gives an error saying it can't find the source in xbmc/project. blah. So...

Code: Select all

cd xbmc/project

git clone https://github.com/kodi-pvr/pvr.hts.git

cmake -DADDONS_TO_BUILD=pvr.hts -DADDON_SEC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/project/cmake/addons

make
That fixed that. :)

But then installing libbluray wasn't so easy. My Ubuntu desktop built it in using libbluray1 and libbluray-dev, but compiling on Raspbian Jessie said it couldn't find them.. even though the exact same libbluray1 and libbluray-dev were installed in Raspbian. Didn't matter if I used Jarvis or the the standard xbmc git. So.. back to Ubuntu Mate. But Mate could only compile tvheadend using the latest xbmc git.. it would fail using Jarvis. Libbluray installed and built in Mate just like Ubuntu desktop though. :)

I was playing around with Raspbian for a bit... it's definitely faster, but when you lose the trashcan by deleting what's inside of it... that's just too buggy for me. Reminded me of Knoppix 3.9. I tried Ubuntu 14.04 again.. this time without the raspberrypi-bin extras, but it was still missing a library... -lgpg-error error. So far, Ubuntu Mate has been the easiest to work with. Not as fast as Raspbian, but it works. :) And my remote works out of the box.. for the most part.. a few buttons need to be remapped. I couldn't get it going in Raspbian.

Rascas
Posts: 704
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Building Kodi on Pi 2

Fri Apr 01, 2016 4:06 pm

I am not an expert in ccache. But I do know that even if you delete the source, the cached files are still stored, in my case in an Ubuntu VM in ~/.ccache. By default the cache goes till 1GB of data, but you can change that. If you compile something that you already compiled, it copies the stored compiled code. Even between different versions of one software, if the source code of one file is the same, the cache is used. I am not sure if the source code folder is changed, if this still applies, I think so.

Now, the build system of the PVRs addons are a bit tricky. For what I remember, you need some dependencies already installed, like libkodiplatform-dev. You also need the Kodi headers, which needs to match the API of the addon, for example, if you are compilling the latest version of tvheadend, which the master branch is now for Kripton, you need Kodi 17 Kripton installed and also the headers, I dont know if the way you install Kodi, the headers are included, you have to check that. In the debian folder of pvrs addons on github, you have the needed dependecies for debian based systems. In the Kodi forum you have also the instructions on how to build the PVRs explained.

The libbluray, I dont remember.

I never tried Kodi on Ubuntu Mate, altough I already tried Ubuntu Mate, which I also find it slower than Raspbian, but I never had a problem with remotes on Raspbian. Like you said, you may need to map the keys depending on the remote but I think that is normal.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Fri Apr 01, 2016 4:40 pm

Rascas wrote:I am not an expert in ccache. But I do know that even if you delete the source, the cached files are still stored, in my case in an Ubuntu VM in ~/.ccache. By default the cache goes till 1GB of data, but you can change that. If you compile something that you already compiled, it copies the stored compiled code. Even between different versions of one software, if the source code of one file is the same, the cache is used. I am not sure if the source code folder is changed, if this still applies, I think so.

Now, the build system of the PVRs addons are a bit tricky. For what I remember, you need some dependencies already installed, like libkodiplatform-dev. You also need the Kodi headers, which needs to match the API of the addon, for example, if you are compilling the latest version of tvheadend, which the master branch is now for Kripton, you need Kodi 17 Kripton installed and also the headers, I dont know if the way you install Kodi, the headers are included, you have to check that. In the debian folder of pvrs addons on github, you have the needed dependecies for debian based systems. In the Kodi forum you have also the instructions on how to build the PVRs explained.

The libbluray, I dont remember.

I never tried Kodi on Ubuntu Mate, altough I already tried Ubuntu Mate, which I also find it slower than Raspbian, but I never had a problem with remotes on Raspbian. Like you said, you may need to map the keys depending on the remote but I think that is normal.

I can tell when something's already stored in cache, as it runs through the list pretty fast, but when I deleted the entire folder, or did a hard git reset, it runs through.. just not as fast.. like it's re-configuring everything all over again. That's why i didn't think ccache was being used in the first place. I only saw it was enabled by default when I decided to do a ./configure --help.

Building the pvr-hts into kodi actually worked.. it's the backend tvheadend server I'm having issues with. In OpenELEC, OSMC and XBian.. they all have a tvheadend that has a full atsc mux list. For whatever reason... the newest source pulled by git doesn't have a atsc list whatsoever. That was with Kodi 17. I finally got Kodi 16 Jarvis compiled, the only difference to my system was some perl stuffs installed for zap2xml to work. Fired up Jarvis, go to install the now available tvheadend from Community Portal repo... it installs, but says it's incompatible. The pvr-hts is now saying incompatible as well. blah. :P

libkodiplatform-dev?? Never even heard of that yet. :P Tried apt-getting build-dep kodi after adding the ppa, but said it couldn't find dacedec or whatever. I can install that manually... is there a way of using apt to get the build-dep... but tell it to ignore what it can't find?

The remote is driving me nuts. In OE, OSMC and XBian, I just add a few files and it uses them. That didn't work in Raspbian. I even did a full manual scan, creating the files. Same data I already had in my files. Obviously doing something wrong. :P



edit: I just built tvheadend backend again and installed in Mate.. now I have a choice of 2 predefined atsc muxes available.. US CO-Denver, and US-SF-Bay-Area. I should have a US-Center or something like that in the list. All I did was ./configure --enable-bundle --enable-dvbcsa. Maybe I need to enable a few more options.
Last edited by greenbag on Fri Apr 01, 2016 4:58 pm, edited 1 time in total.

Rascas
Posts: 704
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Building Kodi on Pi 2

Fri Apr 01, 2016 4:56 pm

I don't know what is "Community Portal repo" but i don't think its something "official".

The Tvheadend server/backend I install from the oficial repo, it has precompiled binaries for Debian armhf:
https://tvheadend.org/projects/tvheaden ... Repository

I never tested it throughly though, I rarely use it.

The build-dep purpose is to get all the dependencies. When building, than you have options to ignore dependencies. For example with dpkg-buildpackage you can pass -d option to ignore dependencies.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Fri Apr 01, 2016 5:02 pm

Rascas wrote:I don't know what is "Community Portal repo" but i don't think its something "official".

The Tvheadend server/backend I install from the oficial repo, it has precompiled binaries for Debian armhf:
https://tvheadend.org/projects/tvheaden ... Repository

I never tested it throughly though, I rarely use it.

The build-dep purpose is to get all the dependencies. When building, than you have options to ignore dependencies. For example with dpkg-buildpackage you can pass -d option to ignore dependencies.
No.. not "official", but you can also get it from "OpenELEC Unoffical Repo". In fact, that's the "official" way of installing it on OpenELEC. Community Portal used to be something else... can't remember now.


edit: I tried using the official tvheadend repo, but they don't have one for wily... at least not for arm. That's what i liked about Ubuntu 14.04 for arm... it used the same trusty repo as the desktop version. Not all the same files have been ported yet, but a lot of them. I'm not sure if I could use jessie or wheezy on Ubuntu.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Fri Apr 01, 2016 7:36 pm

Rascas wrote:I don't know what is "Community Portal repo" but i don't think its something "official".

The Tvheadend server/backend I install from the oficial repo, it has precompiled binaries for Debian armhf:
https://tvheadend.org/projects/tvheaden ... Repository

I never tested it throughly though, I rarely use it.
I just tried again in Raspbian, but it gives the same error.. malformed data in the repo. I'm building it from source in Raspbian, and I can see the folder that has the files I need.. ~/tvheadend/data/dvb-scan/atsc/us-ATSC-center-frequencies-8VSB. I remember seeing a box in tvheadend's web GUI for a scan file directory. Hmmm... ya think? If they aren't available automatically with this build, then I'll manually specify the path in the web GUI.

Rascas
Posts: 704
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Building Kodi on Pi 2

Fri Apr 01, 2016 7:50 pm

greenbag wrote: I just tried again in Raspbian, but it gives the same error.. malformed data in the repo. I'm building it from source in Raspbian, and I can see the folder that has the files I need.. ~/tvheadend/data/dvb-scan/atsc/us-ATSC-center-frequencies-8VSB. I remember seeing a box in tvheadend's web GUI for a scan file directory. Hmmm... ya think? If they aren't available automatically with this build, then I'll manually specify the path in the web GUI.
The current version that I have installed from the oficial tvheadend repo is 4.0.8, and it is wokring fine. I have that file but i cannot test it because I am not in the US.

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Sat Apr 02, 2016 3:28 am

Rascas wrote:
greenbag wrote: I just tried again in Raspbian, but it gives the same error.. malformed data in the repo. I'm building it from source in Raspbian, and I can see the folder that has the files I need.. ~/tvheadend/data/dvb-scan/atsc/us-ATSC-center-frequencies-8VSB. I remember seeing a box in tvheadend's web GUI for a scan file directory. Hmmm... ya think? If they aren't available automatically with this build, then I'll manually specify the path in the web GUI.
The current version that I have installed from the oficial tvheadend repo is 4.0.8, and it is wokring fine. I have that file but i cannot test it because I am not in the US.
My version's from tvhead's git source, and it's "HTS Tvheadend 4.1-1785~g264b4ec". I'm in Vancouver, Canada, but that's the list that works for me.. otherwise, Calgary's the only Canadian mux list available. It worked by setting "Configuration - General - Base - DVB scan files" path to "/home/pi/tvheadend/data/dvb-scan/"... it's found my streams. Well.. 4 of 10 anyway.
mux list.png
mux list.png (60.83 KiB) Viewed 3482 times

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Sat Apr 02, 2016 4:14 am

btw... when I said the "official" way of installing tvheadend in OpenELEC was to use the OpenELEC Unofficial repo... that comes from all the readme's from successful setups. With OpenELEC, you need the tvheadend backend "service" from OpenELEC Unofficial, but you need the tvheadend "client" pvr-hts from the OpenELEC Official repo. Otherwise, the backend won't work.

As for Community Portal... it's noobsandnerds. It used to be a repository in itself, but now it's under Programs, and it's a hub to a ton of addons, some from OpenELEC's repo as well. It's what I needed to install Phoenix. I really only have 3 repos... fusion, SuperRepo, and noobsandnerds. Everything I need is within those 3.

gkreidl
Posts: 6355
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Building Kodi on Pi 2

Sat Apr 02, 2016 5:38 am

@greenback
This is completely off topic (lots of your posts here). This thread is about building kodi on the RPi2, not about cross-compiling, not about Ubuntu, not about tvheadend. Please create a new thread for your stuff.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Sun Apr 03, 2016 12:40 am

gkreidl wrote:@greenback
This is completely off topic (lots of your posts here). This thread is about building kodi on the RPi2, not about cross-compiling, not about Ubuntu, not about tvheadend. Please create a new thread for your stuff.
You need an OS on the RPi2 in order to install Kodi.. you use Raspbian, I use Ubuntu. Therefore, I'll talk about Ubuntu if I need to. As for cross-compiling.. my first post in this thread was in response to someone else talking about cross-compiling.. I didn't bring it into the thread, I merely responded to it. As for tvheadend.. you are completely right.. I should have realized it was going beyond "installing" Kodi. My bad... I won't do it again.

Have a nice day.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13388
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Building Kodi on Pi 2

Sun Apr 03, 2016 9:44 pm

please keep this forum civil! or i have to start deleting posts, and/or even locking the whole thread.
If the first post was not about building kodi on Ubuntu, then diverting it to that is post hijacking!

greenbag
Posts: 121
Joined: Wed Aug 05, 2015 12:52 am

Re: Building Kodi on Pi 2

Mon Apr 04, 2016 8:50 am

mahjongg wrote:please keep this forum civil! or i have to start deleting posts, and/or even locking the whole thread.
If the first post was not about building kodi on Ubuntu, then diverting it to that is post hijacking!
My apologies.. the title was "Building Kodi on Pi 2".. not building Kodi on Raspbian specifically. As I said, my first response was to someone else talking about cross-compiling... yet nothing was said then. I merely posted my results about "building Kodi on the RPi2".. and which os was easiest to do that on, as well as which os gave the most use of Kodi.. ie: being able to enable libbluray or not. If I was out of line, I'm sorry. The title didn't say it was for "Raspbian" only.

Cheers.

User avatar
Kratos
Posts: 395
Joined: Sun Apr 12, 2015 12:41 pm

Re: Building Kodi on Pi 2

Thu Apr 21, 2016 3:53 pm

greenbag wrote: I just compile the way the instructions in the package tell me to.. or I find a guide. I've used checkinstall in the past to make packages, but when I tried with this.. it tells me it can't find some tar ball or something, then goes through a list of countries.. then continues in a loop. Until I physically close the terminal. blah. :P
Same here. Did you find a way around this? I am building on Ubuntu MATE 15.10 if it helps.

Kratos
I have posted mostly with a Pi 2 running either Ubuntu MATE, or Raspbian.

Return to “Raspberry Pi OS”