Compiling Tvheadend addon for testing from source

Hi,

I am after some information about how to compile from source for JeOS. There are some fixes that are being put in place for tvheadend. I’d like to be able to build tvheadend and install it as an addon.

Would someone be able to assist in how to compile it for wp2/odroid. It would make testing and patching so much easier. kodi addons have an interface between the binary and clearly that already exists, so if someone could provide that, that’d be great.

Alternatively can someone compile the latest master? (take a silent video whilst its being done as well so I can follow the steps :grinning:)

To compile it yourself, it’s best to first build an image for S905 - PROJECT=Amlogic DEVICE=S905 ARCH=arm make image, and then build the addon by replacing make image with scripts/create_addon 'name_of_package'

Thanks for your response. I was looking at building it that way, how do I ensure that it is being built using master source from tvheadend and not the latest stable?

Looking file tree i see that:

https://github.com/CoreELEC/CoreELEC/blob/master/packages/addons/service/tvheadend42/package.mk

has 4.2.7-44 do I change the following values?

PKG_VERSION=“5c218500579d5bd1c1f7e7a4b5f7f0fb35baa626”
PKG_SHA256=“a9fe5a4c36aa185e3f0a73a709f0dc05794ae9c12f5d888985b559ff68a2508d”
PKG_VERSION_NUMBER=“4.2.7-44”
PKG_REV=“118”

I am sorry if this sounds trivial, it will be the first time I’ll be building.

You need to change PKG_VERSION and PKG_SHA256.
You can download the master by taking the PKG_URL and replacing $PKG_VERSION with the SHA of the last commit, then pasting it in your web browser.
I then use HashCalc to get the SHA256 checksum for the package.
Then update the PKG_VERSION and PKG_SHA256 values and save. Then build the addon.

You’ll also need this patch:

or master branch will crash on Amlogic.

Thank you, it worked.

@Uukrul When i ran it it kept stopping at hdhomerun, then i replaced it with the patch file cvh made and it worked. I think he may have added your fixes in there and pulled into master libre

Does this build enable auto-mapping of DVB-T/DVB-C channels by Tvheadend, based on an E2 style bouquet?

It would be almost the same as the nightlies that cvh makes. I only wanted to start experimenting a little, so wanted to build myself instead of waiting a week for cvh nightlies.

As for the bouquet, I think it’s far easier to use the API to map than to wait around for E2 mapping to fix. How are you generating your bouquets anyway?

Thanks I tried CVH’s nightlies without any improvement.
I generated the DVB-T (E2) bouquet from the API some time ago, and have used that same file ever since.
There have been no changes to speak of to the DVB-T muxes here.

If you have a script to generate a different type bouquet from the Tvheadend API I would appreciate it if it could be shared.

Have fun with your experiments! :wink:

Well here is part of a script. Just manipulate your bouquet file into a format that can be read and here is the API to tag a channel:

curl -d 'node=[{"tags":["uuid_of_the_tag"],"number":"##","uuid":"uuid_of_channel"}]' 'http://localhost:9981/api/idnode/save'

You can modify this to do all channels in one bouquet at once by adding more json elements of the other channels. Its far quicker than e2 allocations anyway.

EDIT 1: You can manipulate the json by getting all the channels first and just making your own string in excel notepad or whatever you’re comfortable with.

curl 'http://localhost:9981/api/channel/grid?limit=999' > channels.JSON
1 Like

At present I use that second curl command and parse the output to get an E2 simple style bouquet.

I am unsure what the intention is for the first command unfortunately, or how it should be used or what the outcome should look like. :frowning:

Maybe I am better off just using the E2 style bouquet I have presently, rather than delving into the unknown (to me).

If you are using the second command to generate enigma2 style bouquets. Instead of going through all that effort to make a bouquet that doesn’t work, you could just make a bunch of curl commands which would in essence create “tags” in tvheadend.

I am assuming you want to identify a bouquet and then create tags based on bouquet so you can navigate as if it was a group of channels on kodi?

Not quite.
All I want is to have a bouquet file for my preferred DVB-S channels and another for my DVB-T channels that will automap when used in tvheadend.

I have no problem generating each of those, or indeed a combined (E2 style) bouquet, by parsing from the api/channel/grid. Takes about a second to generate from my desktop install.

The DVB-T channels do not automap in tvheadend, so I thought that a different ‘style’ bouquet, that could be generated in a somwhat similar manner, would allow/force tvheadend to automap the DVB-T files. (The DVB-T channels do automap in X86-64 devices but not in ARM devices here)

From an operational point of view in house, the E2 style bouquet is sufficient for my needs.

I have no idea what format an alternative might take. :frowning:

.

https://mega.nz/#!olgwAKbT!E4DzpOc5QRWMJYdEPEEJUoBzXwIs8owcBWPyf22ommI

tvheadend 4.3 last commit 14 days ago. Amlogic-ng.Arm

2 Likes

Yes, that appears to have the patch to get tvheadend working properly.