Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mips port #5570

Merged
merged 8 commits into from Feb 1, 2015

Conversation

@rbalint
Copy link
Contributor

commented Oct 25, 2014

The attached patches makes XBMC build on mipsel (tested on CI20) and the GUI also runs with the patches back-ported to Gotham.
Currently master can't be started on MIPS due to a crash in the internal FFmpeg copy.

Updated for Helix by Balint Reczey
@@ -0,0 +1,115 @@
/*
* Copyright (C) 2005-2011 Team XBMC

This comment has been minimized.

Copy link
@MartijnKaijser

MartijnKaijser Oct 27, 2014

Member

just put 2014 as year

* You should have received a copy of the GNU General Public License
* along with XBMC; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
* http://www.gnu.org/copyleft/gpl.html

This comment has been minimized.

Copy link
@MartijnKaijser

MartijnKaijser Oct 27, 2014

Member

maybe c/p the header from another XBMC file as that has up to date addresses. of course leave the (c) for Ralf Baechle

This comment has been minimized.

Copy link
@MartijnKaijser

MartijnKaijser Jan 28, 2015

Member

Didn' t i ask to get this updated first?

@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

@topfs2 @wsnipex perhaps to a brief look?

@wsnipex

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

looks ok to me build system wise. No idea about the atomics.

@fritsch

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

Was that at least once run tested?

2014-10-27 11:44 GMT+01:00 Wolfgang Schupp notifications@github.com:

looks ok to me build system wise. No idea about the atomics.

Reply to this email directly or view it on GitHub
#5570 (comment).

               Key-ID:     0x1A995A9B
               keyserver: pgp.mit.edu

Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B

@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

@fritsch see PR description ;)

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Oct 27, 2014

@fritsch

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

Oki - this patch is for Gotham, which won't receive a 13.3 release - therefore getting it working in master (while fixing upstream ffmpeg issues) would be the prefered way.

Could I see the crashlog? Is it our internal ffmpeg only? Is that reported ffmpeg upstream?

@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

personally i have no objection in including this into master if it doesn't affect any other platforms/build systems and gives others a way to start working on it. Crashes/improvements can be done as successive PRs @topfs2 ?

@FernetMenta

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

We should never ever merge untested code. I'd rather remove some other dead code than integrate something not tested.

@fritsch

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

That code is tested on Gotham (as I have read inthe PR). But including it
to master, when the OA directly says: it will crash, is something we should
not do. We should rather file bugs with upstream (ffmpeg) and get those
fixed. Afterwards we can get the PR in with the result of a) fixed ffmpeg
b) mips support.

2014-10-27 16:10 GMT+01:00 Rainer Hochecker notifications@github.com:

We should never ever merge untested code. I'd rather remove some other
dead code than integrate something not tested.

Reply to this email directly or view it on GitHub
#5570 (comment).

               Key-ID:     0x1A995A9B
               keyserver: pgp.mit.edu

Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B

@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Oct 27, 2014

ok, for further discussion please open a forum thread. provide some logs using master branch and likely other can help out.

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Nov 2, 2014

I have opened a thread here:
http://forum.kodi.tv/showthread.php?tid=207865

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2015

I managed to run patched Kodi 14.0 using --with-ffmpeg=shared configure option with the ffmpeg packages here:
https://people.debian.org/~rbalint/ppa/xbmc-ffmpeg/xbmc-ffmpeg-wheezy-backports/
I can post a screenshot of the GUI running, but playing video still crashes in the vendor-provided libPVROGL_MESA.so.1.11.2580795 like with XBMC.
I have already reported the issue here:
https://groups.google.com/d/topic/mips-creator-ci20/zZOm38HX81g

@AndriyP

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2015

I was little bit late with own pr #5759 :-) But it works fine. While this PR is not merged please include next fix:

Kodi builds libXBMC_addon-mips.so but during loading binary addons expects libXBMC_addon-mipsel-linux.so. And as result Kodi cant load any binary addon. So that names should be synced. Fix is below.

--- a/addons/library.xbmc.addon/libXBMC_addon.h
+++ b/addons/library.xbmc.addon/libXBMC_addon.h
@@ -55,8 +55,8 @@ typedef intptr_t      ssize_t;
 #define ADDON_HELPER_ARCH       "powerpc64-linux"
 #elif defined(__ARMEL__)
 #define ADDON_HELPER_ARCH       "arm"
-#elif defined(_MIPSEL)
-#define ADDON_HELPER_ARCH       "mipsel-linux"
+#elif defined(__mips__)
+#define ADDON_HELPER_ARCH       "mips"
 #else
 #define ADDON_HELPER_ARCH       "i486-linux"
 #endif
@AndriyP

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2015

Currently master can't be started on MIPS due to a crash in the internal FFmpeg copy.

Maybe I can help, my build works with internal ffmpeg.

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 17, 2015

@AndriyP Thanks, I have added your patch to the PR. Do I understand correctly that this PR works for you? In that case @MartijnKaijser could it please be merged?

@AndriyP

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2015

To be precisely, I am working with build that doesnt have asm mips atomic operations that you added in this PR. All rest changes are same, I didnt tried to pick up atomic operations because it works without as well. Will integrate them when this PR will be merged.

Regarding FFMPEG for our platform I had to disable some specific MIPS optimization. Here additional ffmpeg configure options added for internal build:

--disable-mips32r2 \
--disable-mipsdspr1 \
--disable-mipsdspr2

Maybe it make sense to disable them by default. It can be enabled for specific platform with that CPU features on demand.

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 19, 2015

@AndriyP Most probably those flags made the trick. They are used during the ffmpeg package build as well: https://buildd.debian.org/status/fetch.php?pkg=ffmpeg&arch=mipsel&ver=7%3A2.5.3-1&stamp=1421595399
Since those are platform specific I don't think they should be used in Kodi's build scripts by default.
@fritsch Could this PR please be merge since it has been tested by two of us?

*/

#ifndef __ATOMIC_MIPS_H_
#define __ATOMIC_MIPS_H_

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta Jan 19, 2015

Member

we use pragma once which is supported by all compilers we support

@AndriyP

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2015

Since those are platform specific I don't think they should be used in Kodi's build scripts by default.

Have same opinion. So maybe it make sense to change this in this PR?

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 19, 2015

@AndriyP No, I mean we should not add "--disable-mips32r2" etc. , just use the defaults like now.

@wsnipex

This comment has been minimized.

Copy link
Member

commented Jan 19, 2015

@AndriyP

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2015

@rbalint I thought that mipsr2 and dsp support is platform specific. And "default" is minimum optimisation to cover more platforms.

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 21, 2015

Kodi starts and plays video using SW rendering with the patches in the PR:
http://balintreczey.hu/blog/xbmc-from-debian-running-on-mips-ci20-dev-board
@AndriyP I meant we could ask FFmpeg leave mipsr2 and dsp support disabled by default (use GCC's default), but I have added the configure flags here now..

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 28, 2015

@MartijnKaijser @fritsch @wsnipex @FernetMenta Is there anything missing I should do in this PR?

@wsnipex

This comment has been minimized.

Copy link
Member

commented Jan 28, 2015

its fine from my side. jenkins build this please

@FernetMenta

This comment has been minimized.

Copy link
Member

commented Jan 28, 2015

I am fine with it, thanks

@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 28, 2015

@MartijnKaijser sorry fixed the date now
@wsnipex the build seems to be failing due to a problem elsewhere and the problem has been fixed in an other PR already

@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Jan 28, 2015

jenkins build this please

@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Jan 28, 2015

You still have the old header in it. The address mentioned there is wrong. Fix it and squash into the correct commit

@rbalint rbalint force-pushed the rbalint:mips branch from 187a75a to 796839b Jan 28, 2015
@rbalint

This comment has been minimized.

Copy link
Contributor Author

commented Jan 29, 2015

@MartijnKaijser

This comment has been minimized.

Copy link
Member

commented Jan 29, 2015

thx
jenkins build this please

@wsnipex

This comment has been minimized.

Copy link
Member

commented Jan 31, 2015

jenkins build this please

@bkuhls

This comment has been minimized.

Copy link
Contributor

commented Jan 31, 2015

Hi, just a comment: using buildroot with a Sourcery CodeBench toolchain (mips-2014.11-22-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2), current Kodi git master, your patch and a tweaked Kodi buildroot package (to enable mips support) I could compile a mips binary. Due to lack of mips hardware I could not do a run-time test though.


Kodi Configuration:

Kodi Version: 15.0-ALPHA1
git Rev.: db54f53
Debugging: No
Profiling: No
Optimization: Yes
SWIG Available: Yes
JRE Available: Yes
Doxygen Available: No
Crosscomp.: Yes
target ARCH: mips
target CPU:
OpenGL: Yes
ALSA: Yes
DBUS: No
VDPAU: No
VAAPI: Yes
VTBDecoder: No
OpenMax: No
Joystick: No
XRandR: Yes
Waveform: Yes
Spectrum: Yes
GOOM: Yes
RSXS: Yes
FishBMC: Yes
ProjectM: No
Touch skin: No
X11: Yes
Wayland: No
Bluray: Yes
TexturePacker:Yes
MID Support: No
ccache: No
ALSA Support: Yes
PulseAudio: No
DVDCSS: Yes
Google Test Framework Configured: Yes
Avahi: No
mDNSEmbedded: No
Non-free: Yes
ASAP Codec: No
MySQL: No
Webserver: Yes
libssh support: No
libRTMP support: Yes
libsmbclient support: Yes
libnfs client support:Yes
libafpclient support: No
AirPlay support: Yes
AirTunes support (libshairplay): Yes
UPnP support: Yes
Optical drive: Yes
libudev support: Yes
libusb support: No
libcec support: Yes
libcap support: No
additional players: No
additional codecs: No
PVR add-ons: No
prefix: /usr

$ file output/target/usr/lib/kodi/kodi.bin
output/target/usr/lib/kodi/kodi.bin: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), for GNU/Linux 2.6.32, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x3040000, not stripped

wsnipex added a commit that referenced this pull request Feb 1, 2015
@wsnipex wsnipex merged commit b217174 into xbmc:master Feb 1, 2015
1 check passed
1 check passed
default Merged build finished.
Details
@rbalint rbalint deleted the rbalint:mips branch Feb 1, 2015
@MartijnKaijser MartijnKaijser modified the milestone: I******* 15.0-alpha1 Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.