[APPLE TV 4] pre-alpha builds CURRENT STATUS / merging viability
#1
THIS WILL NEVER RUN ON ANY OLDER APPLE TV. APPLE TV 4 ONLY.
Now that that’s out of the way...

This thread’s purpose is to discuss the overall state of the port. Any discussion related to
support/testing in the comments here will be deleted. Please respect this.

To install this build: http://forum.kodi.tv/showthread.php?tid=254199
To help test: http://forum.kodi.tv/showthread.php?tid=254201
For addon help: http://forum.kodi.tv/showthread.php?tid=254200

TL;DR:
We are far away from Apple TV 4 being another supported platform, as functional as the current pre-alpha build is.
There is many things preventing things from progressing quicker, some listed below.


I’ve had a discussion with Memphiz and will be attempting to help him as much as possible with communication in hopes to free up his very small amount of free time to dedicate to coding and not having to respond to messages as much. Please, respect his time and others and read as much as possible before posting questions. We’re all here to learn.

TVOS is the name of the new operating system that the Apple TV 4 uses. Currently the Kodi for TVOS source code resides in a branch in Memphiz’s github, and is not in a state that can be 'merged into mainline’ meaning become another platform officially supported by Kodi. This thread, and others related, is the very early starting points of that eventual merging and explaining what the steps are needed to reach said goal.

MERGING VIABILITY:
For getting the atv4 platform into mainline Memphiz will try to split it up into 3 major Pull Requests:
a. All changes to the depends system which adds support for compiling arm64 for ios (which is a side product from tvos support) and support for compiling for arm64 tvos
b. All changes to core which maks Kodi arm64 compatible in general. From this point on we are also able to compile ARM64 ios builds of Kodi. This again is a side product from tvos support
c. All changes related to the TVOS platform.

Point c will be a tough one. The TVOS platform is different from any other ios platform we are dealing with. All the addon stuff and thumbnails, databases and everything beside XML files is currently saved to the Cache directory of the Apps Sandbox. There is only one small section of non-volatile memory where apps can save data. Its a normal directory accessible via filesystem but the TV operating system is allowed to delete its contents whenever it likes. And this section is limited to 500 KB (yes KB!). ATM MrMC uses this place for saving all the xml configurations only. It is no space in a filesystem as usual but uses some sort of TVOS API which is based on dictionaries. The change which is needed for supporting saving our XML files via this API is a bit clunky and i expect a lot of discussion and maybe a lot of refactoring until it is accepted for kodi mainline. (there is a chance i might be wrong here though...).
So basically ATM we can't guarantee that anything we save there will be there on the next time we are starting. (or maybe its deleted even while we are running - not sure how tvos handles this.)

The TVOS platform is different from any other ios platform we are dealing with.

BUILD SYSTEM ISSUES:
Memphiz has figured out dedicated xcode versions per job w/ jenkins now and updated the build tools on the slaves, so we can get tvos builds from his branch in jenkins. Automation!

There is no jenkins support for building for TVOS atm. Thats something Memphiz is trying to work out with a higher prio but it needs updated build tools and Memphiz also needs to ensure that current Jarvis branches are able to be built with the old build tools.
Because TVOS requires the latest xcode environment, and Jarvis is built using older, we can’t risk ’tainting’ the current environment by upgrading things to the latest. Once Jarvis is End of Life we can safely upgrade, but we don’t know how long that will take...



HOW THE PORT CAME ABOUT:
MrMC is a pretty extensive fork of Kodi and they did all the initial work getting Apple TV 4 up and running. Because it’s a fork, they can cut out anything they want, so while the codebase is similar, it’s not the same and thus much harder to cherry pick changes out. Consider MrMC the platform maintainer for the TVOS platform and Memphiz is doing his best to hold it together with Kodi mainline. The plan is to leave all this really platform dependent stuff like rendering, remote control, tvos main application stuff to MrMC currently. There is tons of stuff Memphiz would love to get the time to backport into Kodi, but he just started a new job, in a new city and is currently the only dev working on this.


HOW CAN I HELP?
Find devs! Kodi needs mac devs, now more than ever. Memphiz is the sole guy for Mac/iOS/TVOS/everything apple related, and he doesn’t even use an actual mac.

Documentation! If you find something I’m missing in this thread that’s needed, post a response.

Join #kodi-ios on freenode and help out.
Reply
#2
Great work ! Really happy that you started working on this at last !
Now, I maybe talking nonsense, but how about saving the whole Kodi profile on external storage, like NAS-es ? Would it work ? Cause if it works, this would solve the issue with tvos erasing settings and stuff probably. Again, sorry if this is totally ridiculous, just wanted to share the idea.
Reply
#3
(2015-12-31, 09:45)joro_abv Wrote: Great work ! Really happy that you started working on this at last !
Now, I maybe talking nonsense, but how about saving the whole Kodi profile on external storage, like NAS-es ? Would it work ? Cause if it works, this would solve the issue with tvos erasing settings and stuff probably. Again, sorry if this is totally ridiculous, just wanted to share the idea.

(MOD: Moved this thread from TESTING to Current Status, since it applies in this discussion more than testing)

The problem with this is then Kodi would crash if the NAS/etc is not available. Plus the latency with offsite storage. MrMC has some ideas on how to get around this issue and has shared them all with Memphiz, basically NSUserDefaults, (limited to 512k, which is used for XML's currently) cache (can't get nuked while running) and then tmp (which can get nuked anytime) and right now MrMC does most in cache, except for a few things in NSUserDefaults. This might be an option for Kodi, but then it has to be aware on boot to check everything from my understanding..

The investigation on the most optimal way of implementing this is just beginning and I'm sure much iteration of MrMC's methods will happen before Memphiz decides on something he's happy with and the team will find acceptable too.
Reply
#4
Memphiz, in his infinite wisdom and very little free time, has managed to get multiple xcode versions working together! Kodi now has dedicated xcode versions per jobs in jenkins and the build tools have been updated.

This is a huge step to getting automated builds out of tvos and closer to being able to merge it.
Reply
#5
Good to see that ATV4 is still in focus for Kodi!

For ATV2 the platform could be determined by using:
Code:
xbmc.getCondVisibility("system.platform.atv2")

What value should an add-on/skin maker use for ATV4 (and perhaps other Apple platforms)?
Reply
#6
Good question! I'll leave that up to Memphiz/the smarter folks than I. Smile

I'll add it to the testing thread.
Reply
#7
system.platform.tvos
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
(2016-01-04, 20:25)Memphiz Wrote: system.platform.tvos
Thanks for the quick reply!
Reply
#9
@Memphiz, I have macs and two ATV4 and two ATV2, I am willing to help but my coding is not as strong. I am willing to test and respond back. In addition, if you can give me the basic structure I can probable help with skinning I have a graphic background as well. I can help in what ever is needed.
Reply
#10
I have not side-loaded kodi yet as I am running Mavericks and will need to update to get newer version of Xcode, I am rebuilding a IMac will install El Capitan and XCode on there by end of the weekend.
Reply
#11
come back then Wink
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#12
pull request 1 of 3 was merged today (tvos depends)
pull request 2 of 3 planted and acked (arm64) - waits for jenkins
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#13
pull request 1 of 3 was merged today (tvos depends)
pull request 2 of 3 was merged today (arm64)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#14
split pull request 3 up into some more. (at least 2 i think).

pull request 3.1 of 3.x was proposed for review (includes some generic mrmc backports which are not dedicated to tvos only)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#15
Woohoo! Great progress. Thanks for all the hard work refactoring MrMC's code into Kodi!
Reply

Logout Mark Read Team Forum Stats Members Help
[APPLE TV 4] pre-alpha builds CURRENT STATUS / merging viability1