HOW-TO Compile Tvheadend & HDHomerun on Synology NAS

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
aisman Offline
Senior Member
Posts: 150
Joined: Apr 2013
Reputation: 6
Location: Russia
Post: #316
of course, it is my bad. Fixed. Thank you!
find quote
synschwallo Offline
Junior Member
Posts: 1
Joined: Jan 2014
Reputation: 0
Post: #317
Guys,

I would like to kindly ask you for a new build of tvheadend for ppc (qoriq). I use aisman's build 3.9.277 but this not very stable on my Synology DS213+.

Would this be possible?

Sincerely,

Olman
find quote
tripkip Offline
Fan
Posts: 387
Joined: Aug 2010
Reputation: 2
Location: Belgium
Post: #318
Are there any instructions to build tvh (and/or mono = webgrab+) for DS with Qoriq architecture?

Past couple of days I tried to compile gcc on DS413, but can't manage to get all errors solved and I gave up on that.
When I bought my DS413 I never thought qoriq was going to have so little optware support! Especially the ancient gcc and libraries are a big issue!

I see that aisman has built for qoriq before. I wonder how..

Synology DS413 | ASUS AT5IONT-I | Yamaha V673 | Dali Zensor 5 5.1 | LG 50PK950
CouchPotato client iOS
Twitter
find quote
aisman Offline
Senior Member
Posts: 150
Joined: Apr 2013
Reputation: 6
Location: Russia
Post: #319
(2014-03-10 17:00)tripkip Wrote:  Are there any instructions to build tvh (and/or mono = webgrab+) for DS with Qoriq architecture?

Past couple of days I tried to compile gcc on DS413, but can't manage to get all errors solved and I gave up on that.
When I bought my DS413 I never thought qoriq was going to have so little optware support! Especially the ancient gcc and libraries are a big issue!

I see that aisman has built for qoriq before. I wonder how..

If you know how to build tvh with spksrc - you can do it with my toolchain. At once I built it for compiling tvh-3.9, there is gcc 4.6 and glibc 2.8. See instuctions at post #178 and don't forget to change the file toolchain/qoriq (you have to put it in the local server, like tvheadend, change adress and name of toolchain at toolchains/qoriq/ Makefile)
(This post was last modified: 2014-03-11 10:50 by aisman.)
find quote
tom1502 Offline
Junior Member
Posts: 34
Joined: Dec 2012
Reputation: 0
Post: #320
Hey aisman, do you have any experience with DSM5.0? Any improvements? How is the probability to get a more recent version of TVH via synocommunity?
find quote
tripkip Offline
Fan
Posts: 387
Joined: Aug 2010
Reputation: 2
Location: Belgium
Post: #321
Probability of a new tvh via synocommunity is growing because Synology released new toolchains (beta) for DSM 5.0 with newer gcc and gclib that can be used to build TVH.
https://github.com/SynoCommunity/spksrc/pull/865

Synology DS413 | ASUS AT5IONT-I | Yamaha V673 | Dali Zensor 5 5.1 | LG 50PK950
CouchPotato client iOS
Twitter
find quote
tom1502 Offline
Junior Member
Posts: 34
Joined: Dec 2012
Reputation: 0
Post: #322
yay, looks good!
find quote
schumi2004 Offline
Posting Freak
Posts: 1,055
Joined: Aug 2011
Reputation: 9
Post: #323
(2013-08-13 06:35)hoontune Wrote:  I got a couple of requests on how to compile the HDHomerun Drivers.
There has also been a memory issue that was fixed in the latest version.
http://sourceforge.net/p/dvbhdhomerun/di...d/6070e0fa

I cross compiled the ARM Marvell Kirkwood drivers on a Ubuntu box.

Here are my notes:

Code:
-- step 1 setup cross compiler
--
-- download files to /home/administrator/Downloads
-- from http://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/1337branch/synogpl-1373-6281.tbz/download

cd /home/administrator/Downloads
cp gcc421_glibc25_88f6281-GPL.tgz /usr/local/
cd /usr/local
tar -xpf gcc421_glibc25_88f6281-GPL.tgz –C /usr/local/
cd /home/administrator/Downloads
tar -xpf synogpl-1372-6281.tbz

cd /home/administrator/Downloads/source/linux-2.6.32/
cp /home/administrator/Downloads/source/linux-2.6.32/synoconfigs/88f6281 /home/administrator/Downloads/source/linux-2.6.32/.config

uname -r
nano Makefile *EXTRAVERSION= -33-generic

make ARCH=arm \ CROSS_COMPILE=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- menuconfig
--make ARCH=arm \ CROSS_COMPILE=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- oldconfig
make ARCH=arm \ CROSS_COMPILE=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- prepare scripts

nano .config
-- find # CONFIG_DVB_CORE is not set
-- change to CONFIG_DVB_CORE=m

make ARCH=arm \ CROSS_COMPILE=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- modules

-- step 2 download hdhomerun driver source
--  then build it
cd /home/administrator/src
cvs -z3 -d:pserver:anonymous@dvbhdhomerun.cvs.sourceforge.net:/cvsroot/dvbhdhomerun co -P dvbhdhomerun
cd /home/administrator/src/dvbhdhomerun/kernel

nano Makefile
-- set KERNEL_DIR    := /home/administrator/Downloads/source/linux-2.6.32

make ARCH=arm \ CROSS_COMPILE=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-

-- find dvb_hd*.ko files in
cd /home/administrator/src/dvbhdhomerun/kernel
-- find dvb_core.ko file in
cd /home/administrator/Downloads/source/linux-2.6.32/drivers/media/dvb/dvb-core

I've built them for the Marvell Kirkwood and posted them here if anyone wants them:
http://www.mediafire.com/folder/u4o0hhry...un_drivers

Recently i tried to compile latest version but seems i'm getting a invalid argument when doing this:

nano Makefile *EXTRAVERSION= -33-generic

[Image: all-thin-banner.jpg]
find quote
hoontune Offline
Junior Member
Posts: 7
Joined: Oct 2012
Reputation: 0
Post: #324
(2014-03-13 19:10)schumi2004 Wrote:  ... Recently i tried to compile latest version but seems i'm getting a invalid argument when doing this:

nano Makefile *EXTRAVERSION= -33-generic

Sorry, nano is the editor - they were my notes you weren't supposed to take it literally Blush
It should probably read more like
Code:
nano Makefile
-- Find EXTRAVERSION change it to
-- EXTRAVERSION= -33-generic

I'll update the post
find quote
schumi2004 Offline
Posting Freak
Posts: 1,055
Joined: Aug 2011
Reputation: 9
Post: #325
(2014-03-14 04:38)hoontune Wrote:  
(2014-03-13 19:10)schumi2004 Wrote:  ... Recently i tried to compile latest version but seems i'm getting a invalid argument when doing this:

nano Makefile *EXTRAVERSION= -33-generic

Sorry, nano is the editor - they were my notes you weren't supposed to take it literally Blush
It should probably read more like
Code:
nano Makefile
-- Find EXTRAVERSION change it to
-- EXTRAVERSION= -33-generic

I'll update the post
Now yo say it it sounds pretty logic, sorry Wink

Eventualy i followed this guide here https://tvheadend.org/boards/4/topics/37...ssage-4330 and tried to compile a working version for DSM5 but it doesn work also.
Do you have any ideas what could be the cause that drivers aren't working in DSM5?

[Image: all-thin-banner.jpg]
find quote
aisman Offline
Senior Member
Posts: 150
Joined: Apr 2013
Reputation: 6
Location: Russia
Post: #326
(2014-03-13 14:39)tripkip Wrote:  Probability of a new tvh via synocommunity is growing because Synology released new toolchains (beta) for DSM 5.0 with newer gcc and gclib that can be used to build TVH.
https://github.com/SynoCommunity/spksrc/pull/865

for QoriQ official toolchain is still outdated Sad
find quote
sebj Offline
Senior Member
Posts: 181
Joined: Nov 2008
Reputation: 0
Post: #327
I'm not 100% crystal clear on getting a driver for a 1812+ (atom)

Is there ever going to be an easy way to get this hurdle passed?

would be nive if the theheadend package itself was aware of the device like videostation.
find quote
tripkip Offline
Fan
Posts: 387
Joined: Aug 2010
Reputation: 2
Location: Belgium
Star  RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS
Post: #328
(2014-03-14 17:32)aisman Wrote:  
(2014-03-13 14:39)tripkip Wrote:  Probability of a new tvh via synocommunity is growing because Synology released new toolchains (beta) for DSM 5.0 with newer gcc and gclib that can be used to build TVH.
https://github.com/SynoCommunity/spksrc/pull/865

for QoriQ official toolchain is still outdated Sad

I'm cross compiling for qoriq using spksrc.
What looks outdated is the kernel Frown

These are undeclared symbols regarding DVB-t2. Even though I would never use DVB-t2 I cannot compile tvheadend because our kernel version doesn't support it...
This affects all powerpc and arm users.

Code:
uname -a
Linux DiskStation 2.6.32.12 #4458 SMP Thu Mar 6 14:15:06 CST 2014 ppc GNU/Linux synology_qoriq_413

Code:
src/input/mpegts/dvb_support.c:410: error: 'SYS_DVBT2' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:411: error: 'SYS_TURBO' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:459: error: 'BANDWIDTH_5_MHZ' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:459: error: initializer element is not constant
src/input/mpegts/dvb_support.c:459: error: (near initialization for 'bwtab[4].val')
src/input/mpegts/dvb_support.c:460: error: 'BANDWIDTH_10_MHZ' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:460: error: initializer element is not constant
src/input/mpegts/dvb_support.c:460: error: (near initialization for 'bwtab[5].val')
src/input/mpegts/dvb_support.c:461: error: 'BANDWIDTH_1_712_MHZ' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:461: error: initializer element is not constant
src/input/mpegts/dvb_support.c:461: error: (near initialization for 'bwtab[6].val')
src/input/mpegts/dvb_support.c:471: error: 'TRANSMISSION_MODE_1K' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:471: error: initializer element is not constant
src/input/mpegts/dvb_support.c:471: error: (near initialization for 'modetab[3].val')
src/input/mpegts/dvb_support.c:472: error: 'TRANSMISSION_MODE_16K' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:472: error: initializer element is not constant
src/input/mpegts/dvb_support.c:472: error: (near initialization for 'modetab[4].val')
src/input/mpegts/dvb_support.c:473: error: 'TRANSMISSION_MODE_32K' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:473: error: initializer element is not constant
src/input/mpegts/dvb_support.c:473: error: (near initialization for 'modetab[5].val')
src/input/mpegts/dvb_support.c:485: error: 'GUARD_INTERVAL_1_128' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:485: error: initializer element is not constant
src/input/mpegts/dvb_support.c:485: error: (near initialization for 'guardtab[5].val')
src/input/mpegts/dvb_support.c:486: error: 'GUARD_INTERVAL_19_128' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:486: error: initializer element is not constant
src/input/mpegts/dvb_support.c:486: error: (near initialization for 'guardtab[6].val')
src/input/mpegts/dvb_support.c:487: error: 'GUARD_INTERVAL_19_256' undeclared here (not in a function)
src/input/mpegts/dvb_support.c:487: error: initializer element is not constant
src/input/mpegts/dvb_support.c:487: error: (near initialization for 'guardtab[7].val')

For those who wonder how to get to this point:
Use a Debian x86 installation or install a Debian x86 VM.
Code:
sudo aptitude install build-essential debootstrap python-pip automake libgmp3-dev libltdl-dev libunistring-dev libffi-dev ncurses-dev imagemagick libssl-dev pkg-config zlib1g-dev gettext git curl subversion check bjam intltool gperf flex bison xmlto php5 expect libgc-dev mercurial cython lzip
sudo pip install -U pip

Code:
DSM 4.3:
git clone https://github.com/jdel/spksrc.git -b toolchains
DSM 5.0:
git clone https://github.com/SynoCommunity/spksrc.git

cd spksrc/
make setup
vi cross/tvheadend/Makefile

Change the version and put 'v' infront of the distribution name:
Code:
PKG_VERS = 3.9
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)

Code:
vi cross/tvheadend/patches/001-configure.inc.patch

Paste this and save (:wq):
Code:
--- support/configure.inc   2014-03-16 19:51:13.414825207 +0100
+++ support/configure.inc   2014-03-16 19:51:42.578824872 +0100
@@ -265,8 +265,6 @@
EOF
   $CC $CFLAGS $LDFLAGS $TMPDIR/$$.c -o $TMPDIR/$$.bin $opt #&> /dev/null
   RET=$?
-  [ $RET -eq 0 ] && $TMPDIR/$$.bin
-  RET=$?
   rm -f $TMPDIR/$$.{c,bin}
   return $RET
}

Code:
cd cross/tvheadend
rm digests
make download
make digests
make clean
make arch-qoriq

Update
Adam Sutton (tvheadend creator) says his code should be able to detect support for DVB-t2 or not. Something in syno's kernel tree is wrong.
https://tvheadend.org/issues/2004

Aisman, any clue how we can tackle this issue?

Synology DS413 | ASUS AT5IONT-I | Yamaha V673 | Dali Zensor 5 5.1 | LG 50PK950
CouchPotato client iOS
Twitter
(This post was last modified: 2014-03-17 14:32 by tripkip.)
find quote
aisman Offline
Senior Member
Posts: 150
Joined: Apr 2013
Reputation: 6
Location: Russia
Post: #329
It's very strange, but I was able to build a new tvh-3.9.438 with official toolchain, and with mine which I've been shared here.
Btw in the new tvh we don't need to patch configure.inc.
find quote
tripkip Offline
Fan
Posts: 387
Joined: Aug 2010
Reputation: 2
Location: Belgium
Post: #330
(2014-03-17 16:12)aisman Wrote:  It's very strange, but I was able to build a new tvh-3.9.438 with official toolchain, and with mine which I've been shared here.
Btw in the new tvh we don't need to patch configure.inc.

Found my issue. I was trying to compile archived version 3.9, which was missing a crucial fix: https://github.com/tvheadend/tvheadend/c...32b8402ac3

After using the master branch it compiled! Great success!

Synology DS413 | ASUS AT5IONT-I | Yamaha V673 | Dali Zensor 5 5.1 | LG 50PK950
CouchPotato client iOS
Twitter
find quote
Post Reply