SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-27-2015, 06:34 AM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 42
FreeBSD Port

So, I've started to try to port the server to FreeBSD, so I can run it on my FreeNAS server. Since OSX is BSD based, there are some nice hints along the way.

So far, I have got the Sage.jar to build, but it's not running, because I haven't got all my natives sorted yet.

I've run into a problem with the Sage IVTV code. the Sage.jar seems to require it, but I don't know if it really provides value on FreeBSD. There's work to emulate V4L, but I will be using "HDHomerun Connect"s exclusively, so I don't really need it.

Therefore, the question to those in the know is: Is my time better spent trying to get the IVTV libs to compile, or to try to modify the java code to decouple the dependency?
Reply With Quote
  #2  
Old 10-27-2015, 07:23 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,541
I wonder if you'd have more success if you ran a Docker container for SageTV on your FreeNAS server?

https://wiki.freebsd.org/Docker
Reply With Quote
  #3  
Old 10-27-2015, 07:38 AM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 42
Quote:
Originally Posted by stuckless View Post
I wonder if you'd have more success if you ran a Docker container for SageTV on your FreeNAS server?

https://wiki.freebsd.org/Docker
I had considered it, but FreeNAS is currently running on FreeBSD 9.3. FreeNAS is concerned more with stability than anything else. Also, Docker is still rather experimental on BSD.

So my current approach is probably best. As far as I can tell, there isn't a ton of native code for the server portion? So far, it's mostly #ifdef's and Makefile modifications. In the IVTV code, though, there's a bunch of non-portable recursive thread locking that will take some time to figure out.
Reply With Quote
  #4  
Old 10-27-2015, 09:39 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by ptoal View Post
I had considered it, but FreeNAS is currently running on FreeBSD 9.3. FreeNAS is concerned more with stability than anything else. Also, Docker is still rather experimental on BSD.

So my current approach is probably best. As far as I can tell, there isn't a ton of native code for the server portion? So far, it's mostly #ifdef's and Makefile modifications. In the IVTV code, though, there's a bunch of non-portable recursive thread locking that will take some time to figure out.
Unfortunately, there's no 'difference' between the server and the client, regarding the actual compilation, just the configuration at launch makes the difference. Because of that, all the 'native' ties for the client (IR input, video decoding, etc) are rolled into a server build as well. Separating them apart would be a big undertaking. I have started looking at what it would take to move as much as possible to pure java, so that a 'lite' server could be built, and it's daunting (for me at least). My reasoning was to be able to make a 64-bit server build 'easier' than having to have all 64-bit native libraries as well.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #5  
Old 10-27-2015, 11:57 AM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 42
Running

Well, I managed to cobble enough things together that the service runs on FreeBSD. I ran into some ugly problems with the PVR150/250 support, so just disabled them in my Sage.properties. I won't be using them anyway.

I had an issue with my Placeshifter connecting, but that was actually an issue with a missing native library, which I fixed. So now, I can actually connect to the server, too... W00t!

The only major stumbling block I have right now is that the HDHomerun natives exploded all over the place when I tried to build them. Might be a simple issue, like the other things I've run into, but I've spent all the time I have for now. Maybe try again in a day or two.

Last edited by ptoal; 10-27-2015 at 12:21 PM.
Reply With Quote
  #6  
Old 10-27-2015, 12:26 PM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 42
Github Fork

If anyone is interested in following along, you can pull my forked repo, and checkout the FreeBSD branch.

https://github.com/ptoal/sagetv/tree/FreeBSD
Reply With Quote
  #7  
Old 10-29-2015, 07:39 PM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 42
It's Alive!

Finally got the HDHomeRun2.0 module to compile, and Ho-lee-cow, it seems to be working!
Reply With Quote
  #8  
Old 03-29-2016, 12:06 PM
MoePat MoePat is offline
Sage User
 
Join Date: Feb 2008
Location: Colorado
Posts: 8
Any Progress?

I would really like to see this work. Any more progress getting Sage to run under FreeNAS? Or even just FreeBSD?

Scott
Reply With Quote
  #9  
Old 03-29-2016, 12:15 PM
ptoal ptoal is offline
Sage User
 
Join Date: Jan 2007
Posts: 42
Quote:
Originally Posted by MoePat View Post
I would really like to see this work. Any more progress getting Sage to run under FreeNAS? Or even just FreeBSD?

Scott
Actually, I have had Sage running in a Jail on my FreeNAS for 3+ months now. It's been rock solid.

Unfortunately, a few of the changes I made were in haste, and really should have been made with more care to integration back into the main SageTV fork.

You're the first person that has commented on this in the nearly 5 months since I posted this, so I don't think there's a lot of interest in the FreeBSD port. I basically got things working for myself, and left my forked repo up for anyone to do with as they please. I don't really need any future features, I just needed to get rid of the old machine that was in my basement. Unfortunately, I don't have time to do a lot more than I already have.
Reply With Quote
  #10  
Old 04-01-2016, 04:43 PM
KJake KJake is offline
Sage Icon
 
Join Date: May 2003
Location: West Michigan
Posts: 1,117
Wanna comment that this is cool! My FreeNAS box is running two jails already, so once I upgrade the hardware a bit - I will be looking at this!
Reply With Quote
  #11  
Old 04-06-2016, 10:18 AM
ex-tivoman ex-tivoman is offline
Sage User
 
Join Date: Apr 2009
Location: Sacramento
Posts: 18
Ditto, this is a cool port

Once I have fully moved from v7 on WHS to OSS 9 on Linux(using FREENAS as my storage volume) I will then look at this to cut the Linux component out.

So please post any new/interesting problems and solutions.

Don't let this thread die.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Building for FreeBSD Jail? ptoal SageTV Github Development 0 10-22-2015 11:44 AM
Attempting something different... FreeBSD madtrader SageTV Linux 29 11-17-2010 09:42 AM
SageTV Not Opening Com Port (Using Digi realport multi-port serial adapter) personalt Hardware Support 0 06-09-2010 07:02 PM
EPG Port srcurtis SageTV EPG Service 2 05-17-2008 10:50 AM
Com Port Error danward79 Hardware Support 5 11-08-2003 02:28 PM


All times are GMT -6. The time now is 04:28 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.