How to compile TVHeadend for ARM CPU (TBS MOI+ device)
Added by Mariusz Ch. over 7 years ago
Hello,
Please give me tips / instructions on how to build TVHeadend for the Sheeva CPU core V5TE ARM.
The device is TBS MOI+.
Operating system:
[Root @ moi /] # uname -a
Linux moi 2.6.35.14 # 6 Tue May 12 03:05:38 SGT 2015 armv5tel GNU / Linux
I assume that to build the tvh version, It must be done on another computer because MOI+ OS seems to me that it is not possible to install any additional packages.
Thank you in advance for your help.
Regards,
MariuCh
Replies (17)
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
I believe the MOI+ uses a custom linux build, so you may have to get the SDK or whatever to actually be able to cross compile.
E-mail TBS & ask them for instructions on how to build binaries for the MOI+.
EDIT: You may find this useful: http://www.tbsdtv.com/forum/viewtopic.php?f=164&t=9352
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mariusz Ch. over 7 years ago
Thx for answer.
Mark Clarkstone wrote:
I believe the MOI+ uses a custom linux build, so you may have to get the SDK or whatever to actually be able to cross compile.
Cross compile tool is available from TBS:
https://sourceforge.net/projects/moiplus/files/Files/cross_compile_tool/
but readme.txt is only:
" Set the compile environment.
First:
Uncompress to /opt folder;
tar jxvf moiplus_cross_compile_tool.tar.bz2 -C /opt
Second:
Set the cross compile tool
export PATH=/opt/cross/bin:$PATH
Or you can manual use the cross compile tool it is
cross/bin/armv-mv5sft-linux-gnueabi-gcc "
I don't know what next...
EDIT: You may find this useful: http://www.tbsdtv.com/forum/viewtopic.php?f=164&t=9352
This topic is for updates available to tvh 4.1-2347 version.
I would like to build newer version because https://tvheadend.org/issues/4166 issue.
Regards,
MariuCh
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
Mariusz Ch. wrote:
Thx for answer.
Mark Clarkstone wrote:
I believe the MOI+ uses a custom linux build, so you may have to get the SDK or whatever to actually be able to cross compile.
Cross compile tool is available from TBS:
https://sourceforge.net/projects/moiplus/files/Files/cross_compile_tool/
but readme.txt is only:
" Set the compile environment.
First:
Uncompress to /opt folder;
tar jxvf moiplus_cross_compile_tool.tar.bz2 -C /opt
Second:
Set the cross compile tool
export PATH=/opt/cross/bin:$PATH
Or you can manual use the cross compile tool it is
cross/bin/armv-mv5sft-linux-gnueabi-gcc "I don't know what next...
EDIT: You may find this useful: http://www.tbsdtv.com/forum/viewtopic.php?f=164&t=9352
This topic is for updates available to tvh 4.1-2347 version.
I would like to build newer version because https://tvheadend.org/issues/4166 issue.Regards,
MariuCh
You'd more than likely run something like.
cd /source/tvheadend ./configure --enable-bundle make ARCH=arm CROSS_COMPILE=/path/to/armv-mv5sft-linux-gnueabi-gcc-
You'll then find the binary in ./build.linux
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mariusz Ch. over 7 years ago
Mark Clarkstone wrote:
You'd more than likely run something like.
[...]
You'll then find the binary in ./build.linux
How do you think what linux version I can run the compilation? Ubuntu 32bit will be OK?
Do I need to copy the source codes to the /source/tvheadend directory?
Sorry for "basic" questions but I have no experience in compiling.
Regards,
MariuCh
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
Mariusz Ch. wrote:
Mark Clarkstone wrote:
You'd more than likely run something like.
[...]
You'll then find the binary in ./build.linux
How do you think what linux version I can run the compilation? Ubuntu 32bit will be OK?
If you do
file armv-mv5sft-linux-gnueabi-gcc
It should tell you what system/arch it was built for. If it says 64 Bit. You'll need a 64 bit version. If it's 32 bit you can install the multiarch package on 64 bit Ubuntu.
Do I need to copy the source codes to the /source/tvheadend directory?
No, if the compilers in you path you just need pull tvheadend's source, cd into the directory & configure/make.
Sorry for "basic" questions but I have no experience in compiling.
Regards,
MariuCh
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mariusz Ch. over 7 years ago
Mark Clarkstone wrote:
You'd more than likely run something like.
[...]
You'll then find the binary in ./build.linux
after command:./configure --enable-bundle
Checking support/features
checking for cc execinfo.h ... ok
checking for cc -mmmx ... ok
checking for cc -msse2 ... ok
checking for cc -Wunused-result ... ok
checking for cc getloadavg ... ok
checking for cc atomic64 ... ok
checking for cc atomic_time_t ... ok
checking for cc bitops64 ... ok
checking for cc lockowner ... ok
checking for cc qsort_r ... ok
checking for cc stime ... ok
checking for cc gmtoff ... ok
checking for cc recvmmsg ... ok
checking for cc sendmmsg ... ok
checking for cc libiconv ... fail
checking for cc libdvben50221 ... fail
checking for cc ifnames ... ok
checking for cc llabs ... ok
checking for py module gzip ... ok
checking for pkg-config ... ok
checking for xgettext ... ok
checking for msgmerge ... ok
checking for gzip ... ok
checking for bzip2 ... ok
checking for pkg openssl ... fail (detected <none>)
checking for pkg libssl ... fail (detected <none>)
checking for cc openssl/ssl.h ... fail
ERROR: SSL development support not found
I get errors and I can not handle them
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
install libssl-dev..
I think for the MOI+ the configure line should be.
./configure --enable-bundle --disable-ffmpeg_static
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mariusz Ch. over 7 years ago
OK, now after ./configure --enable-bundle
commnad:
Checking support/features
checking for cc execinfo.h ... ok
checking for cc -mmmx ... ok
checking for cc -msse2 ... ok
checking for cc -Wunused-result ... ok
checking for cc getloadavg ... ok
checking for cc atomic64 ... ok
checking for cc atomic_time_t ... ok
checking for cc bitops64 ... ok
checking for cc lockowner ... ok
checking for cc qsort_r ... ok
checking for cc stime ... ok
checking for cc gmtoff ... ok
checking for cc recvmmsg ... ok
checking for cc sendmmsg ... ok
checking for cc libiconv ... ok
checking for cc libdvben50221 ... ok
checking for cc ifnames ... ok
checking for cc llabs ... ok
checking for py module gzip ... ok
checking for pkg-config ... ok
checking for xgettext ... ok
checking for msgmerge ... ok
checking for gzip ... ok
checking for bzip2 ... ok
checking for pkg openssl ... ok (detected 1.0.2g)
checking for cc linux/dvb/version.h ... ok
checking for pkg zlib ... ok (detected 1.2.8)
checking for pkg liburiparser ... ok (detected 0.8.4)
checking for pkg avahi-client ... ok (detected 0.6.32-rc)
checking for cmake ... ok
checking for cc -lstdc++ ... ok
checking for cc nvEncodeAPI.h ... fail
checking for cc sys/inotify.h ... ok
checking for cc inotify_init1 ... ok
fetching dvb-scan files ... ok
checking for cc epoll_create1 ... ok
checking for pkg dbus-1 ... ok (detected 1.10.6)
Compiler:
Using C compiler: gcc
Using LD flags: -ldvben50221 -ldvbapi -lucsi
Build for arch: i686
Binaries:
Using PYTHON: python
Using GZIP: gzip
Using BZIP2: bzip2
Options:
pie yes
ccdebug no
cwc yes
capmt yes
constcw yes
linuxdvb yes
satip_server yes
satip_client yes
hdhomerun_client yes
hdhomerun_static yes
iptv yes
tsfile yes
dvbscan yes
timeshift yes
trace yes
imagecache yes
avahi yes
zlib yes
libav yes
ffmpeg_static yes
libx264 yes
libx264_static yes
libx265 yes
libx265_static yes
libvpx yes
libvpx_static yes
libtheora yes
libtheora_static yes
libvorbis yes
libvorbis_static yes
libfdkaac yes
libfdkaac_static yes
nvenc no
qsv no
libmfx_static no
inotify yes
epoll yes
uriparser yes
ccache no
tvhcsa yes
bundle yes
pngquant no
dvbcsa no
dvben50221 yes
kqueue no
dbus_1 yes
android no
tsdebug no
gtimer_check no
slow_memoryinfo no
libsystemd_daemon no
bintray_cache yes
execinfo yes
mmx yes
sse2 yes
W_unused_result yes
getloadavg yes
atomic64 yes
atomic_time_t yes
bitops64 yes
lockowner yes
qsort_r yes
stime yes
gmtoff yes
recvmmsg yes
sendmmsg yes
libiconv yes
libdvben50221 yes
ifnames yes
llabs yes
py_gzip yes
bin_pkg_config yes
bin_xgettext yes
bin_msgmerge yes
bin_gzip yes
bin_bzip2 yes
ssl yes
linuxdvbapi yes
upnp yes
bin_cmake yes
stdcpp yes
libogg_static yes
inotify_h yes
inotify_init1 yes
linuxdvb_ca yes
epoll_create1 yes
mpegts yes
mpegts_dvb yes
Packages:
openssl 1.0.2g
zlib 1.2.8
liburiparser 0.8.4
avahi-client 0.6.32-rc
dbus-1 1.10.6
But after a few minutes of compilation I get such errors:./libavutil/arm/asm.S: Assembler messages:
'
./libavutil/arm/asm.S:65: Error: unknown pseudo-op: `.syntax'
./libavutil/arm/asm.S:66: Error: junk at end of line, first unrecognised character is `
./libavutil/arm/asm.S:67: Error: unknown pseudo-op: `.eabi_attribute'
./libavutil/arm/asm.S:68: Error: junk at end of line, first unrecognised character is `'
'
libavcodec/arm/ac3dsp_arm.S:23: Error: junk at end of line, first unrecognised character is `
libavcodec/arm/ac3dsp_arm.S:24: Error: invalid char '{' beginning operand 1 `{lr}'
libavcodec/arm/ac3dsp_arm.S:25: Error: no such instruction: `ldrb lr,[r1],'
libavcodec/arm/ac3dsp_arm.S:27: Error: too many memory references for `lsl'
libavcodec/arm/ac3dsp_arm.S:28: Error: no such instruction: `ldrh r12,[r0,r3]'
libavcodec/arm/ac3dsp_arm.S:29: Error: too many memory references for `sub'
libavcodec/arm/ac3dsp_arm.S:30: Error: no such instruction: `it gt'
libavcodec/arm/ac3dsp_arm.S:31: Error: no such instruction: `ldrbgt lr,[r1],'
libavcodec/arm/ac3dsp_arm.S:32: Error: too many memory references for `add'
libavcodec/arm/ac3dsp_arm.S:33: Error: no such instruction: `strh r12,[r0,r3]'
libavcodec/arm/ac3dsp_arm.S:34: Error: no such instruction: `bgt 1b'
libavcodec/arm/ac3dsp_arm.S:35: Error: invalid char '{' beginning operand 1 `{pc}'
libavcodec/arm/ac3dsp_arm.S:36: Error: junk at end of line, first unrecognised character is `'
common.mak:72: recipe for target 'libavcodec/arm/ac3dsp_arm.o' failed
make[2]: *** [libavcodec/arm/ac3dsp_arm.o] Error 1
make[2]: Leaving directory '/tvheadend/build.linux/ffmpeg/ffmpeg-3.2.4'
Makefile.ffmpeg:593: recipe for target '/tvheadend/build.linux/ffmpeg/ffmpeg-3.2.4/.tvh_build' failed
make[1]: *** [/tvheadend/build.linux/ffmpeg/ffmpeg-3.2.4/.tvh_build] Error 2
make[1]: Leaving directory '/tvheadend'
Makefile:758: recipe for target '/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/libavcodec.a' failed
make: *** [/tvheadend/build.linux/ffmpeg/build/ffmpeg/lib/libavcodec.a] Error 2
Do you have an idea what is a problem?
What ubuntu version is optimal for compiling? I have 16.04...
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
Mariusz Ch. wrote:
OK, now after
./configure --enable-bundle
commnad:
.. snip ..
You're trying to build ffmpeg & it's failing for some reason or another. As I previously said don't build with ffmpeg..
./configure --enable-bundle --disable-ffmpeg_static
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mariusz Ch. over 7 years ago
Mark Clarkstone wrote:
You're trying to build ffmpeg & it's failing for some reason or another. As I previously said don't build with ffmpeg..
[...]
Yes - you are right.
Now the compilation is successful, the tvheadend binary is being created. I do not know how to create packages with "data" and "src" directories now.
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
Mariusz Ch. wrote:
Mark Clarkstone wrote:
You're trying to build ffmpeg & it's failing for some reason or another. As I previously said don't build with ffmpeg..
[...]
Yes - you are right.
Now the compilation is successful, the tvheadend binary is being created. I do not know how to create packages with "data" and "src" directories now.
If you're lucky you should just be able to copy over the binary now & it should run..
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by saen acro over 7 years ago
Mariusz Ch. wrote:
Now the compilation is successful, the tvheadend binary is being created. I do not know how to create packages with "data" and "src" directories now.
They are inside bundle
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
saen acro wrote:
Mariusz Ch. wrote:
Now the compilation is successful, the tvheadend binary is being created. I do not know how to create packages with "data" and "src" directories now.
They are inside bundle
Exactamundo, this is why I said to pass --enable-bundle :p
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mariusz Ch. over 7 years ago
The file is compiled, but the attempt to run it ends like this:/usr/local/bin/tvheadend: line 1:ELFe4h▒▒4: not found
/usr/local/bin/tvheadend: line 2: syntax error: unexpected "&"
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
Mariusz Ch. wrote:
The file is compiled, but the attempt to run it ends like this:
/usr/local/bin/tvheadend: line 1:ELFe4h▒▒4: not found
/usr/local/bin/tvheadend: line 2: syntax error: unexpected "&"
That suggests the binary isn't compatible. Have you asked the guy on the TBS forum how he did it?
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mariusz Ch. over 7 years ago
Mark Clarkstone wrote:
That suggests the binary isn't compatible. Have you asked the guy on the TBS forum how he did it?
Can anyone in the development team know any of the TBS supporters? My questions remain unanswered unfortunately ...
RE: How to compile TVHeadend for ARM CPU (TBS MOI+ device) - Added by Mark Clarkstone over 7 years ago
Mariusz Ch. wrote:
Mark Clarkstone wrote:
That suggests the binary isn't compatible. Have you asked the guy on the TBS forum how he did it?
Can anyone in the development team know any of the TBS supporters? My questions remain unanswered unfortunately ...
There are some on the IRC channel (#hts) that were given TBS MOI boxes to play around with but those are different to the MOI+.
Your best bet would be to ask TBS to build you a new image with updated packages if the MOI+ is still supported.