Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633764 - media-tv/kodi - Raspberry patches
Summary: media-tv/kodi - Raspberry patches
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal enhancement (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-08 13:33 UTC by Walter Hüttenmeyer
Modified: 2018-11-23 21:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modified ebuild for raspberries (kodi-17.4-r1.ebuild,9.16 KB, text/plain)
2017-10-08 13:33 UTC, Walter Hüttenmeyer
Details
proposed patch for kodi-17.4 to detect cortex-a53 (kodi-archsetup.patch,868 bytes, patch)
2017-10-08 13:34 UTC, Walter Hüttenmeyer
Details | Diff
modified ebuild for raspberries - updated (kodi-17.4-r1.ebuild,9.04 KB, text/plain)
2017-10-09 14:46 UTC, Walter Hüttenmeyer
Details
kodi stop to run after global gentoo update (kodi_crashlog-20171106_192225.log,12.84 KB, patch)
2017-11-06 21:18 UTC, Rafael Miranda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Hüttenmeyer 2017-10-08 13:33:24 UTC
Created attachment 498086 [details]
modified ebuild for raspberries

A suggestion for the Kodi-17.4 ebuild.
Added flags for raspberry, rpi1, rpi2 and rpi3

Removed dependency X on raspberry architecture, to allow X-less systems.
Removed dependency for crossguid, as portage tree provided crossguid does not work (wrong version). Set to use internal crossguid.

Added patch for kodi to use better flags on raspberrypi-3 (could be much more enhanced, but actually not a matter of the ebuild but the kodi team)
Comment 1 Walter Hüttenmeyer 2017-10-08 13:34:25 UTC
Created attachment 498088 [details, diff]
proposed patch for kodi-17.4 to detect cortex-a53

I know it's part of the KODI team, but maybe someone more involved can forward it to the appropriate guys at kodi?
Comment 2 Walter Hüttenmeyer 2017-10-09 14:46:39 UTC
Created attachment 498226 [details]
modified ebuild for raspberries - updated

added crossguid as dependency again as I could not reproduce the behaviour of BUG#633762
Comment 3 Craig Andrews gentoo-dev 2017-10-19 19:34:03 UTC
(In reply to Walter Hüttenmeyer from comment #1)
> Created attachment 498088 [details, diff] [details, diff]
> proposed patch for kodi-17.4 to detect cortex-a53
> 
> I know it's part of the KODI team, but maybe someone more involved can
> forward it to the appropriate guys at kodi?

I've submitted a PR to Kodi at https://github.com/xbmc/xbmc/pull/12937

We'll first need to get it into Kodi 18 (the master branch) then we can request a backport to 17.

Note, for your patch:
* In this case, -march should not be specified in addition to -mcpu - see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72736#c2
* -funsafe-math-optimizations is (shockingly!) unsafe, see https://github.com/RetroPie/RetroPie-Setup/issues/1385 so I'm not asking Kodi to use it.
Comment 4 Walter Hüttenmeyer 2017-10-26 18:44:55 UTC
Thank you for forwarding this to the KODI team!
It's also great that you pointed out the issues with -march and -mcpu;
using "-funsafe-math-optimizations" is anyway a thing that people should or should not set via make.conf of package.env - I was a little tired when opening the bug.

By the way, is there any plan to include the "raspberry-use-flag" modifications in the ebuild?

Thanks for your efforts,
Walter
Comment 5 Rafael Miranda 2017-11-06 21:18:57 UTC
Created attachment 502854 [details, diff]
kodi stop to run after global gentoo update

$ kodi
/usr/bin/kodi: line 175:  9340 Falha de segmentação  (imagem do núcleo gravada)"$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS
Comment 6 Rafael Miranda 2017-11-07 08:10:55 UTC
Comment on attachment 502854 [details, diff]
kodi stop to run after global gentoo update

After downgrade media-libs/mesa-17.1.8 to media-libs/mesa-17.0.6 kodi turn back to life.
Apparently solve my problem, but I don't know what cause the incompatibility.
Waiting for discussion!
Comment 7 Walter Hüttenmeyer 2018-03-01 23:38:26 UTC
(In reply to Rafael Miranda from comment #6)
> Comment on attachment 502854 [details, diff] [details, diff]
> kodi stop to run after global gentoo update
> 
> After downgrade media-libs/mesa-17.1.8 to media-libs/mesa-17.0.6 kodi turn
> back to life.
> Apparently solve my problem, but I don't know what cause the incompatibility.
> Waiting for discussion!

You are running it on i686 and are haveing a problem with mesa.
Could you please turn to the appropriate forums with this issue?

This bug is about improving the ebuild for RaspberryPi.

@CraigAndrews:
Is there any plan to implement Raspberry-specific flags in the ebuild?

Thanks, Walter
Comment 8 Walter Hüttenmeyer 2018-11-23 21:04:02 UTC
It seems that upstream has implemented the change.
I did find it in kodi-18.0b5 and kodi-18.0rc1; others were not checked.

PR#13638 was merged into master on the 17th of March.
Should we ask for a backport?
Personally, i care more for kodi-18 and am happy here.


Confirmation that it's there, unpacked via ebuild.

# grep -r -i -o -e 'cortex-a53'
xbmc-18.0rc1-Leia/tools/depends/target/ffmpeg/Makefile:cortex-a53
xbmc-18.0rc1-Leia/tools/depends/target/ffmpeg/CMakeLists.txt:cortex-a53
xbmc-18.0rc1-Leia/tools/depends/configure.ac:cortex-a53
xbmc-18.0rc1-Leia/tools/depends/configure.ac:cortex-a53
xbmc-18.0rc1-Leia/tools/depends/configure.ac:cortex-a53
xbmc-18.0rc1-Leia/tools/depends/configure.ac:cortex-a53
xbmc-18.0rc1-Leia/tools/depends/configure.ac:cortex-a53
xbmc-18.0rc1-Leia/cmake/scripts/linux/ArchSetup.cmake:cortex-a53
xbmc-18.0rc1-Leia/cmake/scripts/linux/ArchSetup.cmake:cortex-a53
xbmc-18.0rc1-Leia/cmake/scripts/linux/ArchSetup.cmake:cortex-a53
xbmc-18.0rc1-Leia/cmake/scripts/linux/ArchSetup.cmake:cortex-a53

taken from xbmc-18.0rc1-Leia/cmake/scripts/linux/ArchSetup.cmake

  elseif(CPU MATCHES "cortex-a7")
    set(ARCH arm)
    set(NEON True)
    set(NEON_FLAGS "-fPIC -mcpu=cortex-a7")
  elseif(CPU MATCHES "cortex-a53")
    set(ARCH arm)
    set(NEON True)
    set(NEON_FLAGS "-fPIC -mcpu=cortex-a53")
  elseif(CPU MATCHES arm)
    set(ARCH arm)
    set(NEON True)