• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 45
TvOS Kodi Build
#31
(2018-01-24, 12:20)wrxtasy Wrote: As an addition to @dmytrokoren 's earlier compiling and Xcode instructions - thx. mate. I will add some additions to make life a bit easier:
(I used Xcode v9.2 and @Memphiz 's yab Kodi 17.6 Github branch)

2. Install Kodi build depends:

Add --with-sdk=11.2 such as:
Code:
cd $HOME/Kodi
cd tools/depends
./bootstrap
./configure --host=arm-apple-darwin --with-cpu=arm64 --with-platform=tvos --with-sdk=11.2
make -j$(getconf _NPROCESSORS_ONLN)
5. Adjust Settings in Xcode

Navigate to Kodi folder using macOS Finder and double click to open Kodi.xcodeproj in Xcode

Now from Top Left to Right, select:

Kodi-TVOS > Apple TV

two lines below that select Kodi-TVOS

Identity > Display name = Kodi
Identity > Bundle Identifier = your username you use in the Signing Window > Team box below
Signing > Tick Automatically manage signing and use an iPhone Developer Certificate
Signing > [Your username attached to your AppleID] (Personal Team) - there should only be one most times anyway.

Deployment Info > Deployment Target > 11.2

Linked Frameworks and Libraries > add AVKit.framework

Xcode Top Menu Bar: Product > Clean
Xcode Top menu Bar: Product > Build


Results:
Frame Rate matching and HDR > SDR conversion works.

H264 1080 25i deinterlacing is only Half Motion and produces video combing. Hardware decoding needs to be disabled for this combo so full motion Deinterlace (YADIF2x) can work. The A10X Fusion can easily handle this, it has the CPU ponies !
Needs some patching.

The TVOSTopshelf Xcode option will not compile unless you have a full blown developer paid up account.

EDIT: The A10X Fusion SoC in the Apple TV 4K is a bit of a beast - you can simply turn off all hardware acceleration and playback 1080p content - even 10bit 1080p HEVC. It has a 6 core CPU clocked at 2.39GHz 
 @wrxtasy  i installed your build on my apple tv 4K and Frame Rate matching and HDR > SDR conversion works great.

One thing i noticed is that nfs in kodi isn't working.
Can you confirm?

And i can't select deinterlace  with HW accelerate is enabled.
If i disable i can select deinterlace.

How to select deinterlace when HW decoding is enabled?
Am i missing some settings?

There are 2 scripts that don't work on my apple tv 4K toolbox.script and colorbox.script how can i get my kodi.log from my ATV so i can see what's going on?

Thank you very much everything is running great!
Reply
#32
(2018-01-26, 18:23)wrxtasy Wrote: Yes once I found @Memphiz's deb generation script. This has AVKit.framework Framework in Xcode added to it.

kodi-20182601-9d5284f_tvos_17.6.deb
 Thanks for the build! But is it supposed to work with tvOS 11.3 beta 1? Because it doesn't switch to HDR in any video I tested with my ATV 4K. Also, but that must be something to do with the tvOS beta, even selecting HDR manually on my TV the pictures is awful. Like a coloured negative, I mean, seriously unwatchable.
Reply
#33
Although this thread is a bit old, but it was VERY helpful for my attempt to build Kodi for ATV 4K. Therefore I would like to say a big thanks for all posters, and add my 2 cents for readers.

I can confirm, that the latest  @Memphiz 's yab Kodi 17.6 Github branch works with latest XCode version 9.3 (9E145) and SDK 11.3.
There is only one minor configuration issue, that can be fixed with following patch:

Code:
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac
index d01bffc..19970dc 100644
--- a/tools/depends/configure.ac
+++ b/tools/depends/configure.ac
@@ -374,12 +374,12 @@ case $host in
           platform_cflags+=" -mcpu=cortex-a8 -mfpu=neon"
           platform_ldflags+=" -Wl,-segalign,4000"
         fi
+        use_sdk_path=[`$use_xcodebuild -version -sdk $sdk_name | grep ^Path | awk '{ print $2}'`]
         platform_cflags+=" -ftree-vectorize -pipe -Wno-trigraphs -fpascal-strings -O3"
         platform_cflags+=" -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2"
         platform_cflags+=" -Wno-error=implicit-function-declaration"
         platform_ldflags+=" -L$use_sdk_path/usr/lib/system"
         platform_cxxflags+=" $cpu_flags"
-        use_sdk_path=[`$use_xcodebuild -version -sdk $sdk_name | grep ^Path | awk '{ print $2}'`]
       ;;
     esac
     platform_cflags+=" -arch $use_cpu -m$platform_min_version"

Also there is no paid developer account is needed to build TVOSTopshelf target.

I have no comment regarding  feature, codecs, video quality etc yet. Just I hope, this post may help someone to build Kodi for ATV, like this thread helped to me Smile.
Reply
#34
(2018-04-24, 20:04)srg70 Wrote: Although this thread is a bit old, but it was VERY helpful for my attempt to build Kodi for ATV 4K. Therefore I would like to say a big thanks for all posters, and add my 2 cents for readers.

I can confirm, that the latest  @Memphiz 's yab Kodi 17.6 Github branch works with latest XCode version 9.3 (9E145) and SDK 11.3.
There is only one minor configuration issue, that can be fixed with following patch ...

I also have an Apple TV 4K and also use the same software. But I didn’t have any configuration issues and didn’t need the patch.

Which issue did you have?

Greetings Hoppel
frontend: nvidia shield tv 2019 pro | apple tv 4k | sonos arc 5.1.2 | lg oled65c97la
backend: supermicro x11ssh-ctf | xeon | 64gb ecc | wd red | zfs raid-z2 | dd max s8

software: debian | proxmox | openmediavault | docker | kodi | emby | tvheadend | fhem | unifi
Reply
#35
It may depend from the content of /usr/lib/system folder on your computer. Without patch any target dependency project failed on test of C compiler (on linkage stage), because linker flags were contain /usr/lib/system path. For me it is wrong to have host pathes in cross-compiling enviroument.

So why this path exists? It been added at :

Code:
platform_ldflags+=" -L$use_sdk_path/usr/lib/system"

But use_sdk_path was empty on that line of configuration script. It was defined on few lines after. 

The patch just moves declaration of use_sdk_path  few lines up.

I would remove this folder at all from LD flags, but I don't have good enough overview of whole configiration workflow.
herefore I just corrected "copy-paste" mistake (IMO).
Reply
#36
Yes, It was a copy/paste monster issue Smile
Reply
#37
See https://github.com/xbmc/xbmc/pull/13816, noticed the issue already a few days ago.
Reply
#38
Thank you all for great suggestions Wink
Reply
#39
It seems I found another minor issue with build for ATV. In my case the app was crashed every time on exit. The reason was an assertion about size of gpgrt_lock_t struct in posse-lock.c file of libgpg-error library. It checks the size of native mutex object against some lib's stuff.
cpp:
   
if (sizeof (gpgrt_lock_t) < sizeof (_gpgrt_lock_t))
    {
      assert (!"sizeof lock obj");
      abort ();
    }
The wrong size is detected because a wrong header file, that been used during the build of libgpg-error. To compile Kodi we use arm-apple-darwin triplet. But ATW is 64-bit platform, and the library expects aarch64-apple-darwin triplet. To build Kodi with "right" triplet looks a non-trivial task. Therefore I patched makefile of the libgpg-error project (like it was done for other platforms).
cpp:
ifeq ($(OS),ios)
ifeq ($(CPU),arm64)
    cp $(PLATFORM)/src/syscfg/lock-obj-pub.aarch64-apple-darwin.h $(PLATFORM)/src/syscfg/lock-obj-pub.arm-apple-darwin.h
endif
endif
Fortunately, the library already contains good header file named src/syscfg/lock-obj-pub.aarch64-apple-darwin.h. Just before build it may be copied over src/syscfg/lock-obj-pub.arm-apple-darwin.h.  Now the the size of lock object is good.

I am not sure how important is the issue, and how wide this library is in-use,  but it seems to important to let Kodi to exit without interrupts anyway.
Reply
#40
Could you do a pull request with this change - this is relevant for iOS aswell - I saw those assertion in debugger for a while and always thought it’s only during debugging ...
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
#41
Sure Memphiz. Just as you may guess, my fork contains other changes, and of course in YAB branch  Confused . Tomorrow I'll cleanup my repo and provide PR for this fix only. Sorry for delay.
Reply
#42
PR has been created.
PS: This is my first one, so my apologies in advance Smile
Reply
#43
Thx - that pr looks good. But could you do it to xbmc repo? I want this in official Kodi if possible.

If you can‘t do it - I can do it for you once time permits on my side.

(Basically you fork xbmc/xbmc repo - checkout master and cherry pick your commit on top and PR against xbmc/xbmc repo to branch master)
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
#44
Hey, do any have idea when will Kodi support macOS Mojave, Xcode 10?
Reply
#45
Unrelated to this thread ...
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
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 45

Logout Mark Read Team Forum Stats Members Help
TvOS Kodi Build3