how to actually install Kodi after cross-compiling?
#16
(2016-04-05, 15:04)rucksman Wrote: I had the same issues with the languages, but I did not care too much about it as long as it finished successfully.

Concerning the CONFIG_EXTRA: I did the exact same thing (reconfigure everything into 1 line and removing the \) and was not successful at all like you. In the end I did put the whole CONFIG_EXTRA stuff in one line into the Makefile in tools/depends/target/xbmc/ which worked for me.

I did all the cross compiling and checkinstall in a VM running Ubuntu 14.04.

Probably your deb package won't work due to the "7 - Architecture: [ amd64 ]" (at least it did not work for me). I had to change it to "armhf" which then built a working .deb file for the raspberry.

I actually just saw the amd64 and thought it installed into my desktop.. I double clicked the *deb, hoping Ubuntu Software Center would tell me wrong architecture.. it didn't, saying Kodi16.1 was already installed. Then I remembered I installed Kodi16.1 on my desktop.. I just don't remember making a deb package. Tongue

That languages error threw me off compiling on the pi.. 20 minutes of it nagging, looping through the countries multiple times. I thought it was stuck. Tongue

So... just as simple as renaming the *deb package, or does armhf need to be specified with checkinstall?

edit: never mind... I see I should specify in the checkinstall package data list.

Code:
This package will be built according to these values:

0 -  Maintainer: [ root@lotusland ]
1 -  Summary: [ Kodi16.1 ]
2 -  Name:    [ xbmc ]
3 -  Version: [ 16.1.000 ]
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: [  ]
Reply
#17
It worked.. but not what I expected. It basically did the same as the tar ball, extracting everything to /opt, requiring me to run it from /opt/~. I guess I was expecting it to install on the system like a normal repository install.

I also just found the instructions for cross-compiling tvheadend server.. basically the same process as Kodi, building it in /opt. I shall give that a try. Smile
Reply
#18
I spoke too soon. Kodi runs, but none of the addons will. Now if I could find the log... Tongue
Reply
#19
The good news is that the strip command worked on the raspberry (although kodi.bin ist still 45MB). The bad news: After installing the .deb package and starting kodi (or kodi-standalone) I can see the Kodi logo for some secondsm, then the screen goes black and that's it.
Reply
#20
Failed... I started the whole process from scratch including a fresh installation of my VM, but unfortunately my kodi.bin ist still 371MB in size (I tried to insert --disable-debug in the makefile that is used in the last make, but obviously this was not the correct place). The biggest problem ist that Kodi won't start on the raspberry. It shows the Kodi logo and then nothing happens anymore. If I check the raspberry via SSH with top there is no load, nothing. It just shows the logo. I think that was it for me. Spent so many hours without getting further, frustrating. Maybe I give it a last try with compiling on the raspberry itself, although I do not want to do it on the SD card (read reports that compiling detroys SD cards due to too many writes). I have to find a way to use a HDD for this.
Reply
#21
(2016-04-07, 17:21)rucksman Wrote: Failed... I started the whole process from scratch including a fresh installation of my VM, but unfortunately my kodi.bin ist still 371MB in size (I tried to insert --disable-debug in the makefile that is used in the last make, but obviously this was not the correct place). The biggest problem ist that Kodi won't start on the raspberry. It shows the Kodi logo and then nothing happens anymore. If I check the raspberry via SSH with top there is no load, nothing. It just shows the logo. I think that was it for me. Spent so many hours without getting further, frustrating. Maybe I give it a last try with compiling on the raspberry itself, although I do not want to do it on the SD card (read reports that compiling detroys SD cards due to too many writes). I have to find a way to use a HDD for this.

Are you running it from a terminal? What's the output saying once you have your desktop back? If it's just a black screen... is it copying files on the initial boot, and you didn't wait long enough, or is it crashing.. leaving you with a black desktop? If the latter.. when stuck with a black desktop, [ctrl]+[alt]+[f8] followed by [ctrl]+[alt]+[f7]. Not sure why, but that brings back the desktop. If the Pi isn't frozen that is. Tongue

I gave up on cross-compiling.. I finally figured out Ubuntu 14.04 using xubuntu-desktop... damn config flags were /opt/vc/include/~ for every other distro.. including Ubuntu Mate, but they seem to be just /usr/include/~ in 14.04 LTS. I even got my libbluray built in. Added libraspberrypi0 to the initial Ubuntu install package, but stayed away from libraspberrypi-bin-nonfree.. it has stuffs that cause some needed dependencies from installing completely, as their own dependencies will clash with it installed. Weirdest thing though... after a fresh install of Ubuntu, followed by apt-get upgrade and apt-get dist-upgrade, with all but the testing update repositories enabled, I couldn't find Kodi in Synaptic.. or even xbmc. But about 30 minutes after installing from a compile... Ubuntu update manager pops up, saying it has updates for Kodi... lol. I'll have to turn whatever repo got triggered off.

A complete build.. including manually building some dependencies that I couldn't install via apt (found in /xbmc/tools/depends/target), came to a little more than 4 hours using make -j4. That's at 900mhz, gpu_mem=256.. no overclock. Added a 8gb usb stick formatted to swap partition.. the whole thing, as I was lazy and didn't want to partition it smaller. Can't use the rest of it anyway. Swap peaked about 600mb's, but usually about less than 60mb for most of the build. And I installed the os to a 1TB WD Passport usb hard drive... all connected through a powered usb hub. On Raspbian.. the unit would literally freeze using -j4. On Ubuntu.. even Mate.. it's using nearly all the Pi's resources, but only during the actual build of kodi.bin. But it doesn't freeze up the system either. Smile 4 hours first build.. less than 2 hours for a rebuild with modifications. Tongue


If you do try with a hard drive or usb stick.. it's better to install the os to the stick and run it from there, rather than use the drive/stick as storage to build on. I ran into permissions issues doing that.. telling me it couldn't find libraries or files I knew for a fact were installed. Just doing ./bootstrap on a separate drive gave it fits..lol. Said I didn't have permission. So I sh'd it.. ran through, but that's where errors popped up later in the build. Easiest way to install to a drive or stick, is to write the image to both the microsd and the hard drive/usb stick. You then edit /boot/cmdline.txt on the sdcard, pointing it to /dev/sda2.. the root partition of the image on the external drive. You also edit /etc/fstab, commenting out the /dev/mmcblk0p2 line, and add your /dev/sda2 with the rest of the data in that line. The microsd will now boot the external drive from the root partition. Reboot and type dh -f to see what it spits out... it should show the size of the external drive.
Reply
#22
Quote:If it's just a black screen
No. I got a black screen only after my first build. The second and third etc. builds stopped at the Kodi logo. I waited really a very long time and there was no LED activity, so I guess it was not a problem of waiting not long enough. The raspberry was not frozen, I was able to SSH into it from my laptop, and "top" showed no activity at all.

Concerning the hard drive: Are you saying that building kodi with the hard drive attached does not work/delivers errors? Or was that only meant to be the case when simply attaching a hard drive and mount it as additional storage? When doing what you suggested in the last part of your post (installing the OS on both SD card and USB drive, edit cmdline.txt and fstab), will that work without errors?
Reply
#23
(2016-04-07, 21:01)rucksman Wrote:
Quote:If it's just a black screen
No. I got a black screen only after my first build. The second and third etc. builds stopped at the Kodi logo. I waited really a very long time and there was no LED activity, so I guess it was not a problem of waiting not long enough. The raspberry was not frozen, I was able to SSH into it from my laptop, and "top" showed no activity at all.

Concerning the hard drive: Are you saying that building kodi with the hard drive attached does not work/delivers errors? Or was that only meant to be the case when simply attaching a hard drive and mount it as additional storage? When doing what you suggested in the last part of your post (installing the OS on both SD card and USB drive, edit cmdline.txt and fstab), will that work without errors?

The external drive worked with one distro, but it gave me issues with another distro. My guess is it was permissions issues. As for the os on both microsd and hard drive.. it's fine as long as the those files get edited to point to the files on the external drive. There's posts about copying the system portion from the card to the drive, even a script at Adafruit to do it for you, but in the end.. it does the same thing... edits those files to boot the system from the external drive. The Pi runs so much faster on an external drive compared to the microsd as well. I have a 120gb Sandisk Extreme 500 portable ssd drive coming next week that'll replace the WD Passport... it should be even faster.

https://learn.adafruit.com/external-driv...ying-slash

https://www.raspberrypi.org/forums/viewt...6eca6add7e
Reply
#24
I should have mentioned, the reason for giving up on cross-compiling.. Kodi built and opened, but it failed the "version check", therefore, none of the plugins would work. And seeing how I need to compile tvheadend server on the Pi anyway, as it failed during cross-compiling, I figured just compile the whole damn thing on the Pi. Tongue

Btw.. I tried that Adafruit script.. it works, but as soon as I reboot, it changes the files back, causing it to boot from the microsd. Doing it manually and it works.

/etc/fstab:
Code:
proc            /proc           proc    defaults          0       0
/dev/sda2       /               ext4    defaults,noatime  0       1
/dev/mmcblk0p1  /boot/firmware  vfat    defaults          0       2
/dev/sdb1    none        swap    sw        0    0


/boot/cmdline.txt:
Code:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/sda2 rootdelay=5 rootwait

I also enabled full usb current in /boot/config.txt:
Code:
max_usb_current=1
Reply
#25
Enabling the external HDD was quite straightforward and works like charm. I am now going to compile directly on the raspberry. A first attempt failed (Ifollowed this guide here: http://not-guild.de/temp/kodi.txt). Some problems with GLES... Do you have a better or more recent guide for compiling?
Reply
#26
(2016-04-08, 22:40)rucksman Wrote: Enabling the external HDD was quite straightforward and works like charm. I am now going to compile directly on the raspberry. A first attempt failed (Ifollowed this guide here: http://not-guild.de/temp/kodi.txt). Some problems with GLES... Do you have a better or more recent guide for compiling?

Which os, and which version of Kodi? I started with Kodi15.txt (google it by name) as the base, then adjusted as needed for the os I was working with.. ie: searched for similar package names that were not found by the compiler. I also looked in /xbmc/tools/depends/target directory as that contained a lot of the dependencies. When git cloning xbmc, use...

Code:
git clone -b Jarvis git://github.com/xbmc/xbmc.git

... otherwise you'll get a development release. -b Jarvis will clone from the Jarvis branch.

Let me know which os you're running, and I'll look for my dependency list.
Reply
#27
Quote:Let me know which os you're running, and I'll look for my dependency list.

I am running the most recent raspbian release (jessie). I managed to build kodi 15 (did not test it yet, but at least the build process finished successfully), but I have no clue about this "flags" thing. I followed http://not-guild.de/temp/kodi.txt and tried the flags from there but had to delete --enable-gles, otherwise I got an error during make.

In addition I tried the flags from here https://www.raspberrypi.org/forums/viewt...p?t=109088 (the ones for Jessie 15.2) but they did not work at all (xrandr not available etc.).

I also started with a Kodi 16 build but did not manage to get the "flags"-thing right. How do I know which flags are available and which ones I have to or should I set?

Funny enough my kodi.bin is again huge: almost 300MB.

Thanks for helping!
Reply
#28
(2016-04-09, 11:48)rucksman Wrote:
Quote:Let me know which os you're running, and I'll look for my dependency list.

I am running the most recent raspbian release (jessie). I managed to build kodi 15 (did not test it yet, but at least the build process finished successfully), but I have no clue about this "flags" thing. I followed http://not-guild.de/temp/kodi.txt and tried the flags from there but had to delete --enable-gles, otherwise I got an error during make.

In addition I tried the flags from here https://www.raspberrypi.org/forums/viewt...p?t=109088 (the ones for Jessie 15.2) but they did not work at all (xrandr not available etc.).

I also started with a Kodi 16 build but did not manage to get the "flags"-thing right. How do I know which flags are available and which ones I have to or should I set?

Funny enough my kodi.bin is again huge: almost 300MB.

Thanks for helping!

Kodi16 comes in at 324.6 mb's, so 300mb's sounds reasonable.

Here's my list and steps for kodi 16 Jarvis on Raspbian Jessie....

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update

sudo apt-get install git-core build-essential make checkinstall

sudo apt-get install libboost1.50-all-dev swig curl libxml2-dev libxslt1-dev libfreetype6-dev libfontconfig1-dev libfribidi-dev libmpeg2-4-dev libmad0-dev libjpeg-dev libsamplerate0-dev libogg-dev libvorbis-dev libflac-dev libtiff5-dev liblzo2-dev cmake zip unzip libsqlite3-dev libpng12-dev libpcre3-dev libjasper-dev libsdl1.2-dev libsdl-image1.2-dev libass-dev libmodplug-dev libcdio-dev libtinyxml2-dev libyajl-dev libgpg-error-dev libgcrypt11-dev libmicrohttpd-dev autoconf libtool autopoint libudev-dev python-dev python-imaging libmysqlclient-dev libcurl4-gnutls-dev libbz2-dev libtinyxml-dev libssh-dev libxrandr-dev libsmbclient-dev libcap-dev gawk gperf debhelper libiso9660-dev liblockdev1-dev libgnutls28-dev uuid-dev doxygen librtmp-dev libnfs-dev libgif-dev libplist-dev libshairplay-dev libbluray-dev libbluray1 libbluetooth-dev

git clone -b Jarvis git://github.com/xbmc/xbmc.git

git clone --recursive git://github.com/Pulse-Eight/libcec.git

cd libcec/src/platform
mkdir build
cd build
cmake ..
make
sudo make install
cd

cd libcec
mkdir build
cd build
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
make -j4
sudo make install
cd

cd xbmc/lib/taglib
make -j4
sudo make install
cd

sudo make -C tools/depends/target/libdcadec PREFIX=/usr/local

sudo make -C tools/depends/target/crossguid PREFIX=/usr/local

sudo make -C tools/depends/target/librtmp PREFIX=/usr/local

sudo make -C tools/depends/target/libdvdcss PREFIX=/usr/local

cd xbmc/project

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

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

make -j4


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 --enable-optical-drive --enable-dvdcss --enable-libusb --disable-vtbdecoder --enable-alsa --enable-player=omxplayer --enable-libbluray

make -j4

sudo checkinstall


That will give you Kodi 16 Jarvis, with bluray enabled, and tvheadend pvr built in. If you want the tvheadend backend...

Code:
sudo apt-get install liburiparser-dev libavcodec-dev libavformat-dev libswscale-dev libavresample-dev libhdhomerun-dev dvb-apps libkqueue-dev

https://github.com/tvheadend/tvheadend/releases/tag/v4.0.8

cd tvheadend-4.0.8

./Autobuild.sh

That "should" give you the backend.. that list is from Ubuntu.. just check the names of the files to match with Raspbian.. either apt-cache search (name of package), or apt-get install synaptic, then look in there. Synaptic's better.. as you should enable all repositories in Raspbian.. like the sources repos. You need those.

Note: make -j4 uses all 4 cores... as long as you have swap space, building on an external drive, you should be ok. Otherwise, you may want to use make -j3 instead. The more cpu processing.. the more ram it needs.

If you get stuck just let me know.
Reply
#29
Forgot to mention... the above will install Kodi, but also make a *.deb package so you can uninstall Kodi if and when needed. It builds and installs Kodi, then it builds the package... it will fail trying to locate language packs.. you'll see it go into various country's folders, then exit not being able to find anything... then looks like it's stuck in a loop. Don't exit the program... it will finish without errors. Just without the language packs. Tongue

It took me a week before realizing it continues on after not finding the language packs. Tongue
Reply
#30
Thanks a lot! That's great! I do not need tvheadend (and also bluray is not required), that should make life easier. I will try during the next days and get back to you with results (hopefully not problems).
Reply

Logout Mark Read Team Forum Stats Members Help
how to actually install Kodi after cross-compiling?0