piotrasd

VDR, TVHeadend, unRAID 6 x64

277 posts in this topic

OK, so I'm still waiting on kernel headers, in reference to Capt.Insano's recommendation of running inside a VM I have posted a guide.

 

It WON 'T work for everyone. 

 

For Intel users: You MUST have VT-d support on both your motherboard & CPU.

For AMD users: I'm not so sure but I believe it is AMD-Vi or IOMMU

 

These settings must be enabled in the BIOS, For Intel users VT-x is not enough, you need to have VT-d.

 

By all means give it a go, but my personal feeling is that for most users, remaining on beta14b would be the easiest option and waiting for the relevant bzimage bzroot files to be posted.  Unless there is a compelling reason to move to beta 15.

 

Once you get your TV tuner card passed through, you still need to install and configure TVHeadEnd and may need to install drivers for your card as well.

 

If you manage all that then well done and it will give you a very real appreciation of just how much work people like piotrasd, tobbenb and mettbrot do to bring us the ability to run a PVR behind the scenes.

0

Share this post


Link to post
Share on other sites

So with the below advice I tried to get this working....

 

I am always pointing at this wiki site: http://lime-technology.com/wiki/index.php/Installing_Tvheadend_in_unRAID

I updated it once with additional info for version 5.0.5

For version 6 it should be the same, you need newer dev tools (from slack 14.1 I guess) and kernel headers. I updated this wiki with a screenshot of the old dev tools. Its a start but i dont have time to try. It would be very helpfull for all of us if someone could upate this article once succeeded :)

 

make headers_install

 

That is the command used in the kernel makefile to install the headers.

 

If anyone wants to try helping out with this I have assembled the packages below into a tar file setup as the same as in the original wiki article, please download it here unraid-dev.tar

Ok, update:

 

Got the packages from http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/

 

http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/a

  • cpio-2.11-x86_64-2.txz
  • cxxlibs-6.0.18-x86_64-1.txz
  • infozip-6.0-x86_64-2.txz
  • patch-2.7-x86_64-2.txz
  • pkgtools-14.1-noarch-2.tgz

 

http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/ap

  • bc-1.06.95-x86_64-2.txz
  • nano-2.3.2-x86_64-1.txz

 

http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/d

  • binutils-2.23.52.0.1-x86_64-2.txz
  • cmake-2.8.12-x86_64-1.txz
  • gcc-4.8.2-x86_64-1.txz
  • gcc-g++-4.8.2-x86_64-1.txz
  • git-1.8.4-x86_64-1.txz
  • kernel-headers-3.10.17-x86-3.txz
  • make-3.82-x86_64-4.txz
  • perl-5.18.1-x86_64-1.txz
  • pkg-config-0.25-x86_64-1.txz

 

http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/l

  • glibc-2.17-x86_64-7.txz
  • gtk+-1.2.10-x86_64-5.txz
  • gtk+2-2.24.20-x86_64-1.txz
  • gtk+3-3.8.2-x86_64-2.txz
  • gtkspell-2.0.16-x86_64-1.txz
  • libidn-1.25-x86_64-2.txz
  • libmpc-0.8.2-i486-2.txz libmpc-0.8.2-x86_64-2.txz
  • mpfr-3.1.2-x86_64-1.txz
  • ncurses-5.9-x86_64-2.txz

 

http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/n

  • curl-7.31.0-x86_64-1.txz
  • openssl-1.0.1e-x86_64-1.txz

 

https://www.kernel.org/pub/linux/kernel/v3.x/

  • linux-3.19.4.tar.gz

Managed to get all the packages together and then set up directories much the same as in the above wiki article, still haven't got kernel headers for the current kernel but got some advice here, so undeterred I pressed on.

 

Got this far

 

# Put the unraid-dev.tar in /mnt/cache so you can cut and paste below.

cd /mnt/cache
tar xvf unraid-dev.tar

 

# Install all the Development Packages needed to compile a Linux Kernel

cd /mnt/cache/.unraid-dev/dev-packages
installpkg *.t*z

 

# Move default linux-3.19.4-unRAID out of the way so we can create a new one.

mv /usr/src/linux-3.19.4-unRAID/ /usr/src/linux-3.19.4-unRAID_original
tar -C /usr/src/ -xvf /mnt/cache/.unraid-dev/dev-packages/linux-kernel-3.19.4/linux-3.19.4.tar.gz
ln -sf /usr/src/linux-3.19.4 /usr/src/linux-3.19.4-unRAID

 

# Copy over the all the unRAID stuff into our new Linux Kernel

cp -rf /usr/src/linux-3.19.4-unRAID_original/* /usr/src/linux-3.19.4-unRAID
cp -f /usr/src/linux-3.19.4-unRAID_original/.config /usr/src/linux-3.19.4-unRAID/

 

# Install Kernel Headers for our new Linux Kernel

Now this bit I was a bit stumped... Following the advice from BRiT I was going to try

make headers_install

 

But I get an error from make..

As0VXCL.jpg

 

OK, so I thought I'd try installing libmpc thinking that would sort the problem out but still getting the same error.

 

So went back to the drawing board and tried installing kernel-headers-3.10.17-x86-3.txz as that was the package in the Slackware 14.1 build.

But same error.

 

So then I thought perhaps going back to the old way detailed in the wiki and Link kernel headers includes to the new source includes

ln -sf /usr/src/linux-3.19.4-unRAID/include/asm-generic /usr/include/asm-generic
ln -sf /usr/src/linux-3.19.4-unRAID/include/linux /usr/include/linux
ln -sf /usr/src/linux-3.19.4-unRAID/arch/x86/include/asm /usr/include/asm

 

But still getting errors on libmpc.so.2

 

Any ideas where I'm going wrong?

 

Would appreciate any help.  :-[

 

EDIT:  I was installing the 32bit libmpc, corrected above.

0

Share this post


Link to post
Share on other sites

this

ln -sf /usr/src/linux-3.19.4-unRAID/include/asm-generic /usr/include/asm-generic

ln -sf /usr/src/linux-3.19.4-unRAID/include/linux /usr/include/linux

ln -sf /usr/src/linux-3.19.4-unRAID/arch/x86/include/asm /usr/include/asm

is no needed anymore

 

0

Share this post


Link to post
Share on other sites

this

ln -sf /usr/src/linux-3.19.4-unRAID/include/asm-generic /usr/include/asm-generic

ln -sf /usr/src/linux-3.19.4-unRAID/include/linux /usr/include/linux

ln -sf /usr/src/linux-3.19.4-unRAID/arch/x86/include/asm /usr/include/asm

is no needed anymore

I know, I was just trying it out, any ideas why I'm getting the errors when issuing the make command?

0

Share this post


Link to post
Share on other sites

If I good see, you used libmpc i486 version not x64 try install x64 ;)

0

Share this post


Link to post
Share on other sites

If I good see, you used libmpc i486 version not x64 try install x64 ;)

 

Oh my, such a stupid mistake! Thanks piotrasd for being a second pair of eyes!  Will try again when I get home.

0

Share this post


Link to post
Share on other sites

Ok, so getting somewhere now.... sort of.

 

Starting from here...

 

# Copy over the all the unRAID stuff into our new Linux Kernel

cp -rf /usr/src/linux-3.19.4-unRAID_original/* /usr/src/linux-3.19.4-unRAID
cp -f /usr/src/linux-3.19.4-unRAID_original/.config /usr/src/linux-3.19.4-unRAID/

 

# Install Kernel Headers for our new Linux Kernel

installpkg /mnt/cache/.unraid-dev/dev-packages/linux-kernel-3.19.4/kernel-headers-3.10.17-x86-3.txz

 

# Select the Linux Kernel Options you want compiled in the kernel or as modules

 cd /usr/src/linux-3.19.4-unRAID
make menuconfig <--- This is where you select what you want in the kernel or not. * = Compile into the kernel M = Module

 

Now 64 bit is selected

ZRODNZk.jpg

 

And I think this is probably all the DVB stuff that's needed.

7CfBfx6.jpg

 

So saved all that to .config & then

 

# Compile Linux Kernel, Modules and install Modules into new Linux Kernel

make -j4 bzImage <--- Set -j to the number of processors you have
make -j4 modules <--- Set -j to the number of processors you have
make modules_install

 

However this creates bzimage in arch/x86/boot/bzImage and I want a 64bit bzimage right?

 

I can't work out why I'm getting 32bit depsite 64bit being selected at make menuconfig.

 

Anyone?

 

 

0

Share this post


Link to post
Share on other sites

However this creates bzimage in arch/x86/boot/bzImage and I want a 64bit bzimage right?

 

Reading around thus may actually be OK.  Had a look on the Gentoo forums and this seems to be normal.

 

In my defence, when I was messing last night I'd been awake for over 30 hours!

 

Will see if I can get a bit further tonight, Mrs CHBMB permitting of course...

 

0

Share this post


Link to post
Share on other sites

However this creates bzimage in arch/x86/boot/bzImage and I want a 64bit bzimage right?

 

Reading around thus may actually be OK.  Had a look on the Gentoo forums and this seems to be normal.

 

In my defence, when I was messing last night I'd been awake for over 30 hours!

 

Will see if I can get a bit further tonight, Mrs CHBMB permitting of course...

It's been a while since I did this myself, but if I remember correctly the bzimage in the 64bit folder links to the x86 folder bzimage. So it should be the same.

0

Share this post


Link to post
Share on other sites

However this creates bzimage in arch/x86/boot/bzImage and I want a 64bit bzimage right?

 

Reading around thus may actually be OK.  Had a look on the Gentoo forums and this seems to be normal.

 

In my defence, when I was messing last night I'd been awake for over 30 hours!

 

Will see if I can get a bit further tonight, Mrs CHBMB permitting of course...

It's been a while since I did this myself, but if I remember correctly the bzimage in the 64bit folder links to the x86 folder bzimage. So it should be the same.

 

Yeah, that's what I've realised.  I'm completely new to this so very unsure what I'm doing.  Still haven't worked out at which point I have to add TBS drivers, but if I can at least get a media build then maybe someone can benefit even if it isn't me.

0

Share this post


Link to post
Share on other sites

Ok, so got all the command line stuff down and have created new bzroot & bzimage files.  That's the good news.

 

The bad news is when I go to TVHeadEnd settings - media tree not detected.

 

EDIT:  If anyone wants to try this out here is an updated unraid-dev.tar to place in /mnt/cache

 

Here's what I'm running.

 

How to compile and unRAID in minutes

# Put the unraid-dev.tar in /mnt/cache so you can cut and paste below.

cd /mnt/cache
tar xvf unraid-dev.tar

# Install all the Development Packages needed to compile a Linux Kernel

cd /mnt/cache/.unraid-dev/dev-packages
installpkg *.t*z

# Move default linux-3.19.4-unRAID out of the way so we can create a new one. 

mv /usr/src/linux-3.19.4-unRAID/ /usr/src/linux-3.19.4-unRAID_original
tar -C /usr/src/ -xvf /mnt/cache/.unraid-dev/dev-packages/linux-kernel-3.19.4/linux-3.19.4.tar.gz
ln -sf /usr/src/linux-3.19.4 /usr/src/linux-3.19.4-unRAID

# Copy over the all the unRAID stuff into our new Linux Kernel

cp -rf /usr/src/linux-3.19.4-unRAID_original/* /usr/src/linux-3.19.4-unRAID
cp -f /usr/src/linux-3.19.4-unRAID_original/.config /usr/src/linux-3.19.4-unRAID/

# Install Kernel Headers for our new Linux Kernel

installpkg /mnt/cache/.unraid-dev/dev-packages/linux-kernel-3.19.4/kernel-headers-3.10.17-x86-3.txz

# Select the Linux Kernel Options you want compiled in the kernel or as modules

cd /usr/src/linux-3.19.4-unRAID
make menuconfig <--- This is where you select what you want in the kernel or not. * = Compile into the kernel M = Module

# Compile Linux Kernel, Modules and install Modules into new Linux Kernel

make -j4 bzImage <--- Set -j to the number of processors you have
make -j4 modules <--- Set -j to the number of processors you have
make modules_install

# Compile new Linux Kernel to the new-bzfiles folder

mkdir /mnt/cache/.unraid-dev/bzfiles
cp arch/x86/boot/bzImage /mnt/cache/.unraid-dev/bzfiles/bzimage

# Preparation for new bzroot

rm -r /mnt/cache/.unraid-dev/bz-mod <--- Just in case, remove old directory
mkdir /mnt/cache/.unraid-dev/bz-mod
cd /mnt/cache/.unraid-dev/bz-mod

# unzip stock bzroot into bz-mod folder

xzcat /boot/bzroot | cpio -i -d -H newc --no-absolute-filenames

# Copy any new modules you created into our new bzroot folder

rsync -av --delete /lib/modules/3.19.4-unRAID/ /mnt/cache/.unraid-dev/bz-mod/lib/modules/3.19.4-unRAID/

# zip bz-mod folder into bzroot and copy to new-bzfiles folder

find . | cpio -o -H newc | xz --format=lzma > /mnt/cache/.unraid-dev/bzfiles/bzroot 

 

Here are the bits I'm enabling..

klLghOf.jpg

 

7CfBfx6.jpg

 

klLghOf.jpg

 

I'm saving the changes to .config before exiting.

 

Any aid accepted!

 

 

 

0

Share this post


Link to post
Share on other sites

Are you using the plugin or docker for Tvheadend?

Anyway it might be that tvheadend doesn't have the rights to see the adapter.

Did you check that the DVB frontend is loaded at boot? Search the log for frontend and you will see if it's loaded.

0

Share this post


Link to post
Share on other sites

I'm using the plugin at the moment. 

 

I use TBS drivers, so using that build I get media tree and DVB tuner both as detected.

 

Using piotrasd's Beta14b build without TBS drivers I get media tree detected but no DVB tuner detected as would be expected.

 

I'm just trying to build Beta 15 without TBS drivers at the moment, but when I boot up, neither media tree or DVB tuners are detected.

 

I was expecting Media tree to be detected only.

 

I must be missing something in the menuconfig I think.  Tried it a fair few times already, going to give it another go..  ::)

0

Share this post


Link to post
Share on other sites

I'm a little bit confused about what you mean.

You do not see anything in tvheadend about media build, only the adapters as far as I know.

You have to build the tbs modules before anything appears in tvheadend. Do you mean that you should see in syslog that the media tree is enabled in your kernel?

I'm on vacation right now, so can't try it until I get back home and have the time.

0

Share this post


Link to post
Share on other sites

Well they say a picture is worth a thousand words........

 

I have finally got a media tree build of beta 15, I have enabled all the drivers as in my previous screenshots, plus ALSA under the sound menu.  I think the problem was I needed to go into the submenus a bit more and select all the cards.

 

wBoQIkX.jpg

 

It still shows DVB Tuner as not detected because as I've said I have a TBS card and this doesn't have those drivers installed.

 

But hopefully it will help some of you.

 

V6 Beta 15 bzroot

V6 Beta 15 bzimage

 

This is kernel 3.19.4 and the kernel headers were from 3.10.17

None of the OE patches that piotrasd applied to his beta 14b build have been applied, as to be honest, I'd have no idea where to start.

0

Share this post


Link to post
Share on other sites

Now I get it  :) I have never tried the plugin, so didn't know it looked for enabled media tree.

Good luck with the tbs modules  :)

0

Share this post


Link to post
Share on other sites

Now I get it  :) I have never tried the plugin, so didn't know it looked for enabled media tree.

Good luck with the tbs modules  :)

 

Thanks I'm used to installing them on ubuntu but don't suppose you have any clues on when in the process I should install them and where?

0

Share this post


Link to post
Share on other sites

You have to compile them before you zip the new bzroot  :)

0

Share this post


Link to post
Share on other sites

Now I get it  :) I have never tried the plugin, so didn't know it looked for enabled media tree.

Good luck with the tbs modules  :)

 

Thanks I'm used to installing them on ubuntu but don't suppose you have any clues on when in the process I should install them and where?

 

I do not promisse anything:

https://dl.dropboxusercontent.com/u/18726846/bzimage-new

https://dl.dropboxusercontent.com/u/18726846/bzroot-new

 

 

0

Share this post


Link to post
Share on other sites

Now I get it  :) I have never tried the plugin, so didn't know it looked for enabled media tree.

Good luck with the tbs modules  :)

 

Thanks I'm used to installing them on ubuntu but don't suppose you have any clues on when in the process I should install them and where?

 

I do not promisse anything:

https://dl.dropboxusercontent.com/u/18726846/bzimage-new

https://dl.dropboxusercontent.com/u/18726846/bzroot-new

 

Wow, that worked perfectly, I've spent all day trying to get that working.  I'd really appreciate it if you could show me how you did it.

 

This is how I was approaching it.

 

cd /mnt/cache
mkdir tbs-linux-drivers
cd/mnt/cache/tbs-linux-drivers
wget http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v150429.zip
unzip tbs-linux-drivers_v150429.zip
mkdir tbs
mv linux-tbs-drivers.tar.bz2 szap-s2.tar.bz2 scan-s2.tar.bz2 tbs/
mv astra_szap-s2.conf astra_scan-s2.conf v4l-cx23885-avcore-01.fw tbs/
cd tbs
tar xjvf linux-tbs-drivers.tar.bz2
cd linux-tbs-drivers
./v4l/tbs-x86_64.sh

 

Then I always got an error when trying to run make.

0

Share this post


Link to post
Share on other sites

There is some packages you have to install to be able to compile the tbs drivers. I do not remember which though... Patch might be one of them... Take a look at the tbsdtv.com forum and you might get some hints.

0

Share this post


Link to post
Share on other sites

Do you remember that script I sent you? https://gist.github.com/gfjardim/c18d782c3e9aa30837ff

 

So, I did steps 1, 2, 3, 3.1 (and selected the Multimidia Tree),  3.2 and 3.3. Stopped the script here.

 

The rest is pretty much what you did.

 

mkdir TBS
cd TBS
wget http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v150429.zip
unzip tbs-linux-drivers_v150429.zip
tar jxf linux-tbs-drivers.tar.bz2
cd linux-tbs-drivers
./v4l/tbs-x86_64.sh
make -j $(nproc)
make install

 

After that, I started the script again and did the steps 4, 4.1 and 4.3. Then copied the result files using steps 5 and 6.

 

0

Share this post


Link to post
Share on other sites

There is some packages you have to install to be able to compile the tbs drivers. I do not remember which though... Patch might be one of them... Take a look at the tbsdtv.com forum and you might get some hints.

 

Thanks saarg for your help.  I did look at the TBS forums, but not much about slack on there.

0

Share this post


Link to post
Share on other sites

Do you remember that script I sent you? https://gist.github.com/gfjardim/c18d782c3e9aa30837ff

 

So, I did steps 1, 2, 3, 3.1 (and selected the Multimidia Tree),  3.2 and 3.3. Stopped the script here.

 

The rest is pretty much what you did.

 

mkdir TBS
cd TBS
wget http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v150429.zip
unzip tbs-linux-drivers_v150429.zip
tar jxf linux-tbs-drivers.tar.bz2
cd linux-tbs-drivers
./v4l/tbs-x86_64.sh
make -j $(nproc)
make install

 

After that, I started the script again and did the steps 4, 4.1 and 4.3. Then copied the result files using steps 5 and 6.

 

I still have a copy of the script, but I was reading it and trying to replicate it manually as I wanted to learn.  Sometimes for me, it's not about the destination but the journey.

 

Thanks very much for posting this.  Really helpful and I do feel like I've learnt a lot.  8)

0

Share this post


Link to post
Share on other sites

Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.