TvHeadend on kernel 2.4.20
Added by Pavol Grohol about 12 years ago
Hi,
is it possible to compile TvHeadend on a kernel 2.4.20?
When I try to do it, I am getting errors about missing header files:
In file included from /opt/tmp/tvheadend/src/main.c:44:
/opt/tmp/tvheadend/src/dvb/dvb.h:22:31: error: linux/dvb/version.h: No such file or directory
/opt/tmp/tvheadend/src/dvb/dvb.h:23:32: error: linux/dvb/frontend.h: No such file or directory
In file included from /opt/tmp/tvheadend/src/main.c:44:
/opt/tmp/tvheadend/src/dvb/dvb.h:72: error: field 'dmc_fe_params' has incomplete type
In file included from /opt/tmp/tvheadend/src/main.c:57:
/opt/tmp/tvheadend/src/v4l.h:23:29: error: linux/videodev2.h: No such file or directory
make: *** [build.linux/src/main.o] Error 1
I have tried to use --disable-linuxdvb --disable-v4l but it did not help. The dvb headers are still required.... :-(
Replies (32)
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
Are you trying to run it as IPTV only?
To be honest this has not been properly checked for a while and it wouldn't surprise if those flags are not being properly honoured. In which case feel free to submit a bug report.
However depending on the version of the rest of your system/libraries you may still encounter other problems.
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Yes, this is what I would like to have. Just IPTV functionality.
I started with patching the code but it seems it is a lot of places that needs to be modified...
I am going to continue and see where I will be able to get :-)
Anyway is there some older version where those flags are handled correctly?
Maybe I can just checkout that version and use it...
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
You could try 2.12 (or 3.0) before we started making changes. But really not sure. It's on my list of things to do (check each of the configure flags) but I just never seem to get to it.
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Adam, sorry for stupid question. But it is probably the quickest way how to get right way....
What should I do to get sources of 2.12?
Till now I just did what is described here:
https://www.lonelycoder.com/redmine/issues/1018
But this seems to get latest sources.
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
Actually looking at the code I think it will indeed require quite a bit of work to get this working properly.
We are planning to restructure some stuff quite a lot in 3.4, I will try and bare this in mind.
If you do get it working though, let me know I'd be interested in what you changed etc..
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
git clone FOO
git checkout 2.12
if you need to make your own changes and track those:
git checkout -b BLAH
will create a new branch named BLAH from 2.12
I think it might be easier with 2.12/3.0 just because it doesn't include my epg code which I know breaks the --disable-linuxdvb.
However I think its always been assumed the kernel headers would be there even if they're not used. This is something I will try and look at for 3.4, if I remember. If you do report as an issue that would be appreciated so I don't forget and also good place to track what you find.
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Cool, I can help with testing "IPTV only" flags :-)
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
One issue that needs to be overcome is the rather blurred edge between real DVB (i.e. linux DVB) code and the stuff that sits on top of that to help us process stuff in the MPEGTS stream (including the SI tables).
Some of this is obviously is re-used for IPTV and the SI tables stuff in particular will cause problems here as that references our own DVB structures (where it need not) which in turn references the linux stuff.
We have talked about fixing this, so hopefully something will happen, its just finding the time.
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
You have scared me now :-(
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
It's not as bad as it sounds, probably worse for me
You can simply chop huge swathes of code out (with the #if's) to get what you need, but I need to give it more thought to be sure exactly where the axe should eventually fall.
Just shout if you get stuck. And thank's for the bug report.
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Hi Adam,
so I am working on latest TvHeadend for the start.
I have commented out a lot of code that is not needed in my opinion for IPTV.
But now I am stuck at:
- clock_nanosleep in file rawtsinput.c seems that my system does not have the method
- atomic_add in file atomic.h the same story. I have tried to use _sync_fetch_and_add, but I am getting "undefined reference to `_sync_fetch_and_add_4'" error.
Any ideas?
Thanks
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
Not sure about when clock_nanosleep started appearing in libc/kernel etc.. But you can probably ignore that code as you possibly won't need it. Also the atomic code has recently been significantly changed to rely entirely on the built-in functions provided within GCC. However you must use GCC > 4.3/4?
To overcome the atomic's issue you could just use the release/3.2 branch which does not include the atomic mods.
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Hi Adam,
I was able to checkout 2.12 as you explained me (git checkout 2.12).
But how to get 3.2?
I have tried git checkout 3.2 and also git checkout v3.2 but this did not work....
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
git checkout v3.2 (that's the release tag)
or
git checkout release/3.2 (that's the release branch)
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Hi Adam,
I am still having a problem with atomic_add...
What would happen if the method is not atomic? Would it cause some problems?
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
OK, so it seems I am done....
After a lot of code changes I was able to compile but when it is starting I just get lots of errors:
tcp_server: epoll_wait: Function not implemented
Seems that I would need to update the firmware of my router to be able to run TvHeadend.
It seems that on OpenWRT it could be done.
I am using Oleg firmware which is pretty old :-(
Ok, let's see if I will have a guts to start from beginning with router settings :-)
Now I am taking a break and looking forward to 3.4 version.
RE: TvHeadend on kernel 2.4.20 - Added by Igosr Petroff about 12 years ago
Hi Pavol.
I'm also trying to compile stuff only for IPTV in regular PC (not for router) but from John Tornblom's transcoding branch ( without success too ). I need only IPTV but without cwc and dvb at all plus for transcoding HD from 1080i to 720p. Also will be great to add multicasting output too. Actually here is some code inside /src/iptv_output.c but think need to somehow to implement it.Can you please share your code work here?
Regards.
P.S. Try to compile 2.12 branch. Also error.with --disable-avahi --disable-linuxdvb --disable-v4l --disable-cwc options :(
/home/igosr/tvheadend/src/transports.c:1064: undefined reference to `dvb_transport_get_signal_status'
collect2: ld returned 1 exit status
make: *** [build.Linux/tvheadend] Error 1
So will try older versions but it's buggy
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Hi,
do you also have some older kernel?
Because when I have compiled TvHeadend for "regular pc" (raspberry pi :-)), it was working without problems.
If you need just IPTV then use --disable-avahi --disable-linuxdvb --disable-v4l --disable-cwc options.
It is difficult to share my work because it is a lot of #ifdef lines added without too much sence :-)
I really just wanted to try what happens when it compiles.
But the result is not working.
If you really want to see it, I can try to put it to github to some branch.
By the way, I was working on 2.12 version.
RE: TvHeadend on kernel 2.4.20 - Added by Igosr Petroff about 12 years ago
I compiled it on last 3 kernel in uname -a
Linux igosr 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 i686 i686 i386 GNU/Linux
igosr@igosr:~$ I have some knowledge in C and assembler so I can uderstand what you did. If you can share your work please attach source here or somewhere.
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
My biggest problem was missing dvb kernel headers and a couple of calls without implementation in my uClibc.
Find files that I have changed attached.
Please do not be disappointed. The changes are not worth a Nobel price :-)
If you have some comments or something that could be done better (especially atomic_add method) please let me know.
RE: TvHeadend on kernel 2.4.20 - Added by Igosr Petroff about 12 years ago
Tonight I was testing last version from git 3.3.122~g3cd6336-dirty and can say that working pretty nice with mumudvb
from here: https://github.com/ostryck/MuMuDVB (this version of mumudvb with newcamd support). Before I can't get mumu up with Tvheadend. Why mumu if Tvheadnd supporting dvb-adapters? Simple - for generating tests multicast streams. ( mumu can sid, sdt rewrite and much more).Ofcourse I did quick and dirty things- simply commented in /src/main.c a couple of lines but for testing purpose it's ok So as I told before I need only iptv support. I want to know even possible to get scrambled iptv channels working with IPTV support of Tvheadend like it works with dvb adapters?
Nov 01 01:38:07 [INFO]:subscription: "HTTP" subscribing on "test2", weight: 100, adapter: "eth0", network: "<N/A>", mux: "239.100.0.0", provider: "<N/A>", service: "<N/A>", quality: 100
Last thing to get it up with transcoding. There is big problem to put right options in ffmpeg because for now something is wrong that ffmpeg's structure of stream a bit different then from mumudvb. Will try to analyse it later.
Rgards.
main.c.tar.gz (5.2 KB) main.c.tar.gz |
RE: TvHeadend on kernel 2.4.20 - Added by Pavol Grohol about 12 years ago
Hi Adam,
I have updated to kernel 3.3.8 and I have build and started tvheadend 2.12.99 successfully :-).
I was also able to configure one channel and connect with XBMC to tvheadend. But when selecting the channel to play, I see that it is subscribing but then I get error "Graceperiod expired". What could be the reason?
Thanks.
RE: TvHeadend on kernel 2.4.20 - Added by Igosr Petroff about 12 years ago
I have same thing with old 2.12.99 that's reason why I'm trying to play with latest git version.
RE: TvHeadend on kernel 2.4.20 - Added by Adam Sutton about 12 years ago
That implies that TVH failed to receive stream data from the DVB card within the required period. Why I couldn't say, it would need more investigation.
Adam
RE: TvHeadend on kernel 2.4.20 - Added by Kjell A. Stormo about 12 years ago
Just made a new atempt on the latest git repo.
The first thing that happend was that it discowerd all the muxes all ower, and duplicated them.
then i removed all muxes, from this adapter (whitch has auto discower on)
and restarted tvheadend.
Then:
Nov 02 12:15:54 [ALERT]:CRASH: Signal: 6 in PRG: ./build.linux/tvheadend (3.3.123~g4515f5a) [eabbe05e67c06723284d7df636441b13f38fd85a] CWD: /tvheadend
Nov 02 12:15:54 [ALERT]:CRASH: Fault address 0x2990 (N/A)
Nov 02 12:15:54 [ALERT]:CRASH: Loaded libraries: /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 /usr/lib/x86_64-linux-gnu/libavahi-client.so.3 /lib/x86_64-linux-gnu/librt.so.1 /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libdbus-1.so.3 /lib64/ld-linux-x86-64.so.2
Nov 02 12:15:54 [ALERT]:CRASH: Register dump [23]: 0000000000000000 00007fc7b0d92ca8 0000000000000008 0000000000000206 0000000000000044 0000000000000065 00007fc7ad462500 0000000000000043 0000000000002990 000000000000299c 00007fc7ad462d90 0000000000000000 0000000000000006 0000000000000000 ffffffffffffffff 00007fc7ad462358 00007fc7b0dc5425 0000000000000206 0000000000000033 0000000000000000 0000000000000000 fffffffe7ffbfa17 0000000000000000
Nov 02 12:15:54 [ALERT]:CRASH: STACKTRACE
At least i got a crash report now....