[REQUEST] Mini doc how to cross compile an addon?
#1
Hi, I'v some trouble to crosscompile for RPi2 vnsi. Because, I cannot find a precise guide on how to "cross compile for raspberry" with right steps.

before I'v git cloned and cross build, into my debian x86_64 vmware KODI following this doc:

https://github.com/xbmc/xbmc/blob/master...aspberrypi

After I'v try to build vnsi addon using that guide:

http://forum.kodi.tv/showthread.php?tid=...ight=cross

My src is installed in:

Quote:/root/xbmc/ (for kodi sources)
/root/kodiaddons/vns.vdr.pnsi (for my addon sources)

Cross compile commands:

Quote:cmake -DADDONS_TO_BUILD=pvr.vdr.vnsi -DADDON_SRC_PREFIX=/root/kodiaddons/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/root/xbmc/addons/ -DPACKAGE_ZIP=1 project/cmake/addons/

make -j4

but the binary built is for x86_64 (that is strange because kodi.bin is built correctly for ELF armhf):
Quote:root@raspbuild:~/xbmc# file /root/xbmc/addons/pvr.vdr.vnsi/pvr.vdr.vnsi.so.1.11.7
/root/xbmc/addons/pvr.vdr.vnsi/pvr.vdr.vnsi.so.1.11.7: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=0cc189ef5ad7f97b1507625f47f0f15f7ea13406, not stripped

another issue is that zip isn't made.......why if I specified "-DPACKAGE_ZIP=1" ?
Reply
#2
No one?

I need only a guide how to understand from zero how to cross build and create a zip of an addon......
Reply
#3
you have to point cmake to the proper compilers. there will be a Toolchain_binaddons.cmake in your depends target folder, point cmake to that using -DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain_binaddons.cmake
Reply
#4
as for PACKAGE_ZIP, it sort of has a dual purpose. it doesn't enable packaging to zip, it changes the installation paths from unix standards PREFIX/lib and so on, to instead install everything to a single folder. this is called PACKAGE_ZIP since the cmake packaging to zip uses the install target, and we want a flat folder in the zip file. it has a dual purpose because that way you can also use the install target to inject the addons into a build tree for testing right out of there. if you are going to install these on your system, you do not want that option enabled.
Reply
#5
Ok understand tha toolchain part but I don't understand for ZIP part, can you explain me with an example?

I want to distribute a zip file to install on my rpi2, what I have to do? PACKAGE_ZIP seams is not the way.......If I understand.
Reply
#6
I'v build successfully addon, that is installed in my prefix folder into two place INTO MY VMWARE X86_64 machine:

/opt/kodi/arm-linux-gnueabihf/lib/kodi/addons/pvr.vdr.vnsi

and

/opt/kodi/arm-linux-gnueabihf/share/kodi/addons/pvr.vdr.vnsi

but when I copy these two folders into my rpi2, I haven't any VDR Client addon into kodi.......whyHuh?
Reply
#7
(2015-10-28, 22:32)SoftWord Wrote: I'v build successfully addon

I'm trying to do the same for Android with a different addon. What was the cmake command that you used? And you used just "make -j 4"? Did you ever get complaints about tinyxml when you ran make? Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
[REQUEST] Mini doc how to cross compile an addon?0