Project

General

Profile

Support of ARM compilation

Added by nunu mp almost 13 years ago

Hello everybody !
I would like to know if tvheadend can be compiled and can work on ARM processor.
I used a synology NAS DS211 & tried to compil tvheadend, but it fails due to function unsupported in GCC ARM tool chain (it seems, i'am not friendly with that : __sync_fetch_and_add_4 is an undefined reference).

There is a TNT usb key (sundtek) which is well supported under multiple architectures and it will be nice that a tvheadend could run under NAS with ARM processor & record directly on it !

regards
Manuel


Replies (39)

RE: Support of ARM compilation - Added by Hein Rigolo almost 13 years ago

guy dububu,

could you maybe provide pointers for the topic starter so that he can resolve his ARM compilation problems instead of just answering with "yes".

Hein

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

Yes, please guy dububu :)

RE: Support of ARM compilation - Added by guy dububu almost 13 years ago

i could certainly do that id I wanted to

RE: Support of ARM compilation - Added by guy dububu almost 13 years ago

Jokes aside,

I just compiled it on a Debian Squeeze device with build-essetientials installed. Nothing special.

apt-get install git-core build-essential libssl-dev libssl0.9.8 pkg-config avahi-daemon
git clone https://github.com/andoma/tvheadend
./configure
make

You couls add --cpu=armv4t --release --disable-avahi to ./configure if you want to but I didn't and it worked fine

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

ok thanks !
but the problem appear only on ARM compilation not on x86 !
but i will retry !

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

Hi,
i doesn't work with --cpu=armv4t --release --disable-avahi options (it generates a x86 binary).

but i'am not very freindly with that kind of things.

regards

RE: Support of ARM compilation - Added by guy dububu almost 13 years ago

You're getting a x86 binary? I guess you're building on an x86 device?

I'm compiling it directly on the Arm device. If you can't do that I think you have to do something called cross-compile but i'm not familiar with that.

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

yes,
on ubuntu i have used the synology tool chain to "cross compil". In their documentation i have used :

env CC=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc \
LD=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld \
RANLIB=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ranlib \
CFLAGS="-I/usr/local/arm-none-linux-gnueabi/include" \
LDFLAGS="-L/usr/local/arm-none-linux-gnueabi/lib"

./configure \
--host=armle-unknown-linux \
--target=armle-unknown-linux \
--build=i686-pc-linux \
--disable-avahi \
--release \
--prefix=/usr/local

make

And i have the __sync_fetch_and_add_4 error at the link edition.
I have found on tvheadend forum somebody that ad the same issue.

RE: Support of ARM compilation - Added by Gil Sas almost 13 years ago

Yeah, that's me, I finally got it to work on a Pogoplug style device (armv5) running Debian lenny (compiling on squeeze as of now). I gave some details there:
[[https://www.lonelycoder.com/redmine/boards/5/topics/2316]]

Basically this was for me at least a matter of using the adequate gcc version capable of generating code for that nasty __sync_fetch_and_add_4. Give it a try with that version of gcc and report back!

RE: Support of ARM compilation - Added by Andreas Smas almost 13 years ago

If you want I think you can replace atomic.h with the one from Showtime

see: https://github.com/andoma/showtime/blob/master/src/arch/atomic.h

That file include asm specific code when you are on gcc versions below 4.3

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

ok, thanks !
could it be possible to have native "arm" support with tvheadend ?

regards

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

Hi !!
so i have use the atomic.h file from Showtime (and clean in it all what was not arm ... ), compil it and run it : that seems to work (i don't have the sundtek key yet).
Compilation tool chain provide by synology . I have run it under ubuntu 11.10.
Options for compilation environnement & configure.

env CC=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc \
LD=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld \
RANLIB=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ranlib \
CFLAGS="-I/usr/local/arm-none-linux-gnueabi/include" \
LDFLAGS="-L/usr/local/arm-none-linux-gnueabi/lib" \
./configure \
--host=armle-unknown-linux \
--target=armle-unknown-linux \
--build=i686-pc-linux \
--disable-avahi \
--release \
--prefix=/usr/local
...
make

RE: Support of ARM compilation - Added by Andreas Smas almost 13 years ago

Ok, I've pushed showtime's version of atomic.h to master now

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

oh !!
cool ! thanks a lot !
i have only compiled with version 2.12 of tvheadend (from tar.gz).
I will try from the git !

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

Hi,
so this is in progress.
I have directly compil the tvheadend on the NAS from the GIT. And i have received the TNT dongle.
I made tests with sundtek support and it works fine on my synology DS211.
...
but (there is always a but), tvheadend doesn't display channel names for example and other things (i will provide picture this evening).
but if channels are set manually it works !

So i would like to have your comments is any ! maybe i have miss something ! does somebody have run tvheadend on ARM ?

regards
nunu

RE: Support of ARM compilation - Added by Hein Rigolo almost 13 years ago

Search the forums .....

https://www.lonelycoder.com/redmine/boards/5/topics/2082?r=2532#message-2532

You need to instal a Full version of gconv ...

Hein

RE: Support of ARM compilation - Added by nunu mp almost 13 years ago

Thanks a lot ! it solves the problem.

And your right i should have check the forums before ...

regards

RE: Support of ARM compilation - Added by Hein Rigolo almost 13 years ago

Wel, not everybody is trying to read everything on these forums .... And then stil remember an old post ....

Happy that it works ....

RE: Support of ARM compilation - Added by Lennart Jütte over 12 years ago

Manuel J. Garcia Egido pasquiers: can you explain how you managed to compile tvheadend on ubuntu? Where did you get your toolchain? Which packages did you need? Anything to configure?

Thanks,
Lennart

RE: Support of ARM compilation - Added by nunu mp over 12 years ago

all instruction are in the documents (where to keep the toolchain) :
http://download.synology.com/download/ds/userguide/Synology%20DiskStation%20Manager%203rd-Party%20Apps%20Developer%20Guide_V2.pdf

and from tvheadend directory :

env CC=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc \
LD=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld \
RANLIB=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ranlib \
CFLAGS="-I/usr/local/arm-none-linux-gnueabi/include" \
LDFLAGS="-L/usr/local/arm-none-linux-gnueabi/lib" \
./configure \
--host=armle-unknown-linux \
--target=armle-unknown-linux \
--build=i686-pc-linux \
--disable-avahi \
--release \
--prefix=/usr/local
and then
make

But now i compil directly tvheadend on the NAS.

Hope this help

RE: Support of ARM compilation - Added by Randy M over 12 years ago

I followed instructions as described in Synology guide and mentioned in this topic but every time i try to compile tvheadend it's giving missing libssl or openssl
the following errors

CC build.linux/tvheadend
/usr/local/arm-none-linux-gnueabi/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
make: *** [build.linux/tvheadend] Error 1
openelec@openelec-VirtualBox:~/tvheadend$

It has something to do with SSL but SSL is installed on my system:
openelec@openelec-VirtualBox:~/tvheadend$ apt-cache search libssl | grep SSL
libcherokee-mod-libssl - Cherokee web server - SSL crypto functions plugin
libssl-ocaml - OCaml bindings for OpenSSL (runtime)
libssl-ocaml-dev - OCaml bindings for OpenSSL
libssl-dev - SSL development libraries, header files and documentation
libssl0.9.8 - SSL shared libraries

Do i need to add extra argument to point to openssl maybe?
Any ideas on how to solve this ?

RE: Support of ARM compilation - Added by Anonymous almost 12 years ago

hello, i read this article because i have a question:

if tvheadend added support for arm compilation does we could compile them with Android Kernel so it could run on a tv box come with Android?

RE: Support of ARM compilation - Added by Sergey Borsukov over 11 years ago

Hello! Here you can find a package SPK tvheadend for arm-sinology built for gcc-4.6.2, which helps you to build and switch on timeshift. The package was built on the basis of final version of GIT Tvheadend for today. It was tested on DSM 411j and DSM212j (armv5tej).
I don't use DVB adapters, only IPTV, that's why can't check if it functons correctly or not. That's the reason i'm asking you to test the system. If there are some mistakes, i'll fix them.

RE: Support of ARM compilation - Added by Randy M over 11 years ago

@Sergey

How did you compile it ?
Going to test it in a few on my DS211

(1-25/39)