Cross-compiling tvheadend for openwrt (mips)
Added by Lyubomir Trifonov over 13 years ago
Hi,
https://forum.openwrt.org/viewtopic.php?id=28035
on above link, user "meta96" gives me an idea, and i managed to make it work
I have successfully compiled, and started tvheadend on my tp-link 1043 openwrt router
but i faced few problems and need support from developer, or some advanced coder.
https://docs.google.com/leaf?id=0B8oQFOm_9mQ3NTI5YjVjNjctYjBmOC00MzU3LTg1NTYtZjZjZWQ1OGRjYmNh&hl=en
above link contains compiled package for openwrt backfire 10.03.1-rc4 TP-LINK 1043
I made few modifications in few files, but they are not significant,
just for making cross-compiler with uclibc happy.
my problem is function "clock_nanosleep" in rawtsinput.c.
I simply commented out line, and linker passed.
in function: static void process_ts_packet(rawts_t *rt, uint8_t *tsb)
.............
d = delta + t->s_pcr_last_realtime;
slp.tv_sec = d / 1000000;
slp.tv_nsec = (d % 1000000) * 1000;
//clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &slp, NULL);
didsleep = 1;
.......................
}
}
it seems that this mips32 CPU doesn't have this function.
tvheadend application is starting well, very low cpu usage in router while browsing web interface,
web interface is working, my DVB card is recognised.
Still don't know if tunning actually works, but tonight will know this
I am afraid that way of commenting "clock_nanosleep" will broke something in the code, and need help workarounding it.
my other problem is with FFDecsa
i am not able to find working combination of compiler options + parallel mode for this MIPS CPU
FFDecsa_test gives me FAILED, FAILED.. with every my attempt.
Help please!
it will be useful for others too
Regards, Lyubo
attached is diff i made for crosscompiling in toolchain for openwrt
Replies (7)
RE: Cross-compiling tvheadend for openwrt (mips) - Added by Rasmus Lundsgaard over 13 years ago
I to have been looking into cross compiling for my router (I'm using Asus wl500gp2) with a mips cpu.
This would be very useful as to have the tvheadend server running on the router and saving recordings to an attached usb HDD or a NAS...
I will follow this thread and come with my own experiences when I get time to look into it.
regards
Termo
RE: Cross-compiling tvheadend for openwrt (mips) - Added by Luigi Capriotti - over 13 years ago
IMHO it would be more useful to have tvheadend running directly on the NAS, so that you could set the recording path via tvheadend GUI only.
RE: Cross-compiling tvheadend for openwrt (mips) - Added by Rasmus Lundsgaard over 13 years ago
Well, I don't see a need to also have a NAS running in my case, when I can have an usb-hdd attached to my wireless router - and actually in that way act as a NAS as well. So yes I agree that running tvheadend on a NAS is the best way of using this software.
My NAS is just also a wireless router running the renewed oleg linux (http://code.google.com/p/wl500g/), and I to would like a bit of help on how to cross compile tvheadend to run on it
/Termo
RE: Cross-compiling tvheadend for openwrt (mips) - Added by Lyubomir Trifonov over 13 years ago
yep,
my setup is also as nas, with very nice and cheap usb HDD docking station from ebay (29$)
into it i am plugged compact flash card for overlay, old IDE HDD for samba/transmission storage,
and there are 2 usb ports
one port is for DVB adapter, and second port is for my usb camera
all things work nicely, with also sterisk, oscam, and squid on my tp-link 1043 router.
i am attaching here makefile for buliding tvheadend package, it will work with my patch from above.
But still not solution to a problem with "clock_nanosleep()" function and need support!
RE: Cross-compiling tvheadend for openwrt (mips) - Added by Pavol Grohol over 12 years ago
Hi,
I have just found this thread while looking for a tutorial how to cross compile tvheadend for raspberry pi.
Did you manage to get it work on your router?
I have ASUS WL500gP v2 and it seems like a good idea to have TvHeadend running there.
Thanks
RE: Cross-compiling tvheadend for openwrt (mips) - Added by Adam Sutton over 12 years ago
See here ... https://www.lonelycoder.com/redmine/issues/1018
RE: Cross-compiling tvheadend for openwrt (mips) - Added by Pavol Grohol about 12 years ago
Hi all,
a bit late but maybe for others trying this to work and also for me to have all information in one place :-)
This is a thread about "clock_nanosleep":
http://lists.uclibc.org/pipermail/uclibc/2010-March/043660.html
It seems that it is working for the guy.
His message:
Hello,
While trying to use jackd on a ARM926 I get a runtime error caused by
the missing clock_nanosleep symbol. After having verified that the
clock_nanosleep syscall is present into the kernel, I cam to the
conclusion that the librt from uclibc simply lack the clock_nanosleep()
declaration. So I wrote this simple patch to try, and it actually seem
to work perfectly well on the target: jackd start and work as expected.
--- /dev/null 2010-03-02 08:54:51.506676601 0100
++ b/librt/clock_nanosleep.c 2010-03-02 11:26:15.000000000 0100@ -0,0 +1,23
@
#include <errno.h>
#include <stdlib.h>
#include <time.h>
#include <sys/syscall.h>
#include "kernel-posix-timers.h"
#ifdef NR_clock_nanosleep
#define __NR_syscall_clock_nanosleep NR_clock_nanosleep
+static __inline _syscall4(long, __syscall_clock_nanosleep,
clockid_t, clock_id, int, flags,
+ const struct timespec *, req,
+ struct timespec *, rem);
+long clock_nanosleep(clockid_t clock_id, int flags,
const struct timespec *req,
+ struct timespec *rem)
{
return __syscall_clock_nanosleep(clock_id, flags, req, rem);
}
+#endif
I don't know if this patch is good enough, so I am open to any comment
about it.
Regards,
Jean-Christian de Rivaz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc-0.9.30.1-add-clock-nanosleep.patch
Type: text/x-diff
Size: 721 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20100303/f64ca7a7/attachment.bin>