This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RetroPie on the Tinker Board
#11
Ok, I dropped this for a little while due to life things, but I'm back on it. I since gave up trying to get RetroPie working on this board...it seems there are just too many things to modify and it isn't worth the effort when I can just customize RetroArch instead.

That said, I still am lacking some understanding of how the Mali drivers are being utilized, and whether I have the right Mali drivers on my system. As I noted earlier, I have the Midgard drivers in /usr/lib/arm-linux-gnueabihf/libmali-midgard-r9p0-r0p0.so...but is SDL (I see that this is a framework that should use what is available for rendering) not properly detecting the driver in my environment? It's probably worth noting that I did't change any flags when compiling RetroArch (https://buildbot.libretro.com/docs/compi...x-and-bsd/), this was just to try things out.

There is a team working on a project called Lakka which is a very polished full distribution with RetroArch they have customized for multiple SBCs which is awesome, but I thought maybe I could get a headstart on this once I get an idea of where I should be headed. They are still working on support for the Tinker Board.
Reply
#12
Hi,

I've been working on getting RetroPie on my Tinkerboard for a few weeks too. Like you, I too am having difficulty getting the userspace drivers installed correctly.

What I've been experimenting with lately is using Rockchip's Yocto build to create an image from source. The images I've been able to build already have the custom XServer using the binary Mali drivers. I've been able to run glmark2, which prints out that it detected a Mali T760 device and that it is using OpenGL ES 3.1. I've also been able to build libSDL2 with OpenGL ES support (while disabling desktop OpenGL support).

The bad news is the images I've built are very sparse (basically no functional desktop support) and some of the hardware isn't working (Wifi and Bluetooth). I'm pretty sure I can get these issues worked out easier than getting the userspace drivers working elsewhere though.

I also tried creating a Yocto recipe to build RetroArch, but I failed there. I'm a Yocto newbie, so that's probably why its not working. I might give this a try again, I've learned more about Yocto since I've last tried that.

Before I tried Yocto, I customized the RetroPie setup script to detect the Tinkerboard. I compiled many emulators successfully, but it didn't matter because of the drivers. Well, now that I have working graphics drivers, I might give RetroPie another go. I'd like to fix the Wifi and Bluetooth issues before I try RetroPie again.
Reply
#13
(09-21-2017, 05:37 AM)johnobe Wrote: Hi,

I've been working on getting RetroPie on my Tinkerboard for a few weeks too. Like you, I too am having difficulty getting the userspace drivers installed correctly.

What I've been experimenting with lately is using Rockchip's Yocto build to create an image from source. The images I've been able to build already have the custom XServer using the binary Mali drivers. I've been able to run glmark2, which prints out that it detected a Mali T760 device and that it is using OpenGL ES 3.1. I've also been able to build libSDL2 with OpenGL ES support (while disabling desktop OpenGL support).

The bad news is the images I've built are very sparse (basically no functional desktop support) and some of the hardware isn't working (Wifi and Bluetooth). I'm pretty sure I can get these issues worked out easier than getting the userspace drivers working elsewhere though.

I also tried creating a Yocto recipe to build RetroArch, but I failed there. I'm a Yocto newbie, so that's probably why its not working. I might give this a try again, I've learned more about Yocto since I've last tried that.

Before I tried Yocto, I customized the RetroPie setup script to detect the Tinkerboard. I compiled many emulators successfully, but it didn't matter because of the drivers. Well, now that I have working graphics drivers, I might give RetroPie another go. I'd like to fix the Wifi and Bluetooth issues before I try RetroPie again.
Johnobe, 

Thanks for your input; do you have some steps you could post to get me started?

Right now, I think I might have a few missing pieces. I need to check my kernel config to make sure it is pointing to the right driver. I may also not have the custom X11 that includes for 2d and 3d acceleration in desktop, so I'll look into that as well.

I also understand that the Wayland drivers are much better (smoother and more power efficient) if you can get them running. Did you look into this as well?

From reading online, it seems that the Rockchip driver only works for X11, and the one provided by ARM works for Wayland.

I also found some helpful information here: GitHub.com/phhusson/rockchip_forwardports
Reply
#14
Sorry, I don't have much for steps or instructions at the moment. I'll try to put together some documentation soon. If I can put together an SD card image that's capable of compiling/running RetroPie or RetroArch with accelerated graphics and other hardware drivers working, I'll post that image somewhere so people can try it out.

Rockchip's Yocto BSP supports Wayland and X11. Depending on which option you choose, it'll use a different binary Mali driver. The X11 driver is r9 and the Wayland driver is r13. The newer Wayland driver also supports OpenGL ES 3.2. The Wayland driver seems smoother, but glmark2 framerates are identical. Honestly, I'd take either one working at this point. Setting up Wayland seems to have a different set of complications from X11. X11 is still more widely supported, especially by packages that Yocto can compile.
Reply
#15
(09-27-2017, 08:38 AM)johnobe Wrote: Sorry, I don't have much for steps or instructions at the moment. I'll try to put together some documentation soon. If I can put together an SD card image that's capable of compiling/running RetroPie or RetroArch with accelerated graphics and other hardware drivers working, I'll post that image somewhere so people can try it out.

Rockchip's Yocto BSP supports Wayland and X11. Depending on which option you choose, it'll use a different binary Mali driver. The X11 driver is r9 and the Wayland driver is r13. The newer Wayland driver also supports OpenGL ES 3.2. The Wayland driver seems smoother, but glmark2 framerates are identical. Honestly, I'd take either one working at this point. Setting up Wayland seems to have a different set of complications from X11. X11 is still more widely supported, especially by packages that Yocto can compile.

That would be awesome, please let us know here if you are able to get a working image.

Right now, I have a little progress. I've compiled RetroArch with the following configure options: 

Code:
./configure --enable-opengles --disable-sdl2 --disable-x11 --enable-neon --enable-floathard --enable-udev --disable-pulse --disable-oss

Now however, when I run RetroArch, I get a segfault  Sad
Code:
linaro@linaro-alip:~/retroarch$ ./usr/local/bin/retroarch --verbose
[INFO] RetroArch 1.6.7 (Git 23fe08c)
[INFO] === Build =======================================
Capabilities: NEON VFPv3 VFPv4
Built: Sep 28 2017
[INFO] Version: 1.6.7
[INFO] Git: 23fe08c
[INFO] =================================================
[INFO] [Config]: Loading default config.
[INFO] [Config]: loading config from: (null).
[INFO] Looking for config in: "/home/linaro/.config/retroarch/retroarch.cfg".
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 960x720
[INFO] [EGL] Falling back to eglGetDisplay
[INFO] [EGL]: EGL version: 1.4
[INFO] [GL]: Found GL context: mali-fbdev
[INFO] [GL]: Detecting screen resolution 0x0.
Segmentation fault

Any ideas? It appears as if it is failing to make some call to get the screen resolution?

It's also worth noting that I am giving up on RetroPie and am just focusing on getting RetroArch working
Reply
#16
I'm looking into this this afternoon, but here is what I have from the print output:

Code:
linaro@linaro-alip:~/retroarch$ usr/local/bin/retroarch --menu --verbose
[INFO] RetroArch 1.6.7 (Git 23fe08c)
[INFO] === Build =======================================
Capabilities: NEON VFPv3 VFPv4
Built: Sep 28 2017
[INFO] Version: 1.6.7
[INFO] Git: 23fe08c
[INFO] =================================================
[INFO] [Config]: Loading default config.
[INFO] [Config]: loading config from: (null).
[INFO] Looking for config in: "/home/linaro/.config/retroarch/retroarch.cfg".
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 960x720
[INFO] [EGL] Falling back to eglGetDisplay
[ERROR] [EGL]: #0x3001, Unknown
[ERROR] [Mali fbdev]: EGL error: 12288.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [DRM]: Found 1 connectors.
[INFO] [DRM]: Connector 0 connected: yes
[INFO] [DRM]: Connector 0 has 13 modes.
[INFO] [DRM]: Connector 0 assigned to monitor index: #1.
[INFO] [DRM]: Mode 0: (1920x1080) 1920 x 1080, 60 Hz
[INFO] [DRM]: Mode 1: (1920x1080i) 1920 x 1080, 60 Hz
[INFO] [DRM]: Mode 2: (1920x1080) 1920 x 1080, 50 Hz
[INFO] [DRM]: Mode 3: (1920x1080i) 1920 x 1080, 50 Hz
[INFO] [DRM]: Mode 4: (1600x900) 1600 x 900, 60 Hz
[INFO] [DRM]: Mode 5: (1280x1024) 1280 x 1024, 60 Hz
[INFO] [DRM]: Mode 6: (1152x864) 1152 x 864, 75 Hz
[INFO] [DRM]: Mode 7: (1280x720) 1280 x 720, 60 Hz
[INFO] [DRM]: Mode 8: (1280x720) 1280 x 720, 50 Hz
[INFO] [DRM]: Mode 9: (1024x768) 1024 x 768, 60 Hz
[INFO] [DRM]: Mode 10: (800x600) 800 x 600, 60 Hz
[INFO] [DRM]: Mode 11: (720x576) 720 x 576, 50 Hz
[INFO] [DRM]: Mode 12: (720x480) 720 x 480, 60 Hz
[INFO] [GL]: Found GL context: kms
[INFO] [GL]: Detecting screen resolution 1920x1080.
[INFO] [EGL] Found EGL_EXT_platform_base, trying eglGetPlatformDisplayEXT
[INFO] [EGL] Falling back to eglGetDisplay
Segmentation fault

And if I debug with GDB:

Code:
(gdb) run
Starting program: /home/linaro/retroarch/usr/local/bin/retroarch
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb0cd31a0 (LWP 2170)]
[New Thread 0xb04d31a0 (LWP 2172)]
[New Thread 0xafcd31a0 (LWP 2173)]
[New Thread 0xaf4d31a0 (LWP 2174)]
[New Thread 0xaecd31a0 (LWP 2175)]
[New Thread 0xae4d31a0 (LWP 2176)]
[New Thread 0xadcd31a0 (LWP 2177)]
[New Thread 0xad4d31a0 (LWP 2178)]
[New Thread 0xaccd31a0 (LWP 2179)]

Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0xb43e2afc in _XSend () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
(gdb) backtrace
#0  0xb43e2afc in _XSend () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#1  0xb43e2dd2 in _XFlush () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#2  0xb43e4a38 in _XGetRequest () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#3  0xb43d7dfc in XNoOp () from /usr/lib/arm-linux-gnueabihf/libX11.so.6
#4  0xb5b4ae2a in ?? () from /usr/lib/arm-linux-gnueabihf/libgbm.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Reply
#17
Well, great collaboration guys..I haven't gotten very far with this. Moderators, I guess you can close this thread.

I guess we'll leave this up to the guys that are getting paid for their work.
Reply
#18
(10-21-2017, 08:54 PM)RPisces Wrote: Well, great collaboration guys..I haven't gotten very far with this. Moderators, I guess you can close this thread.

I guess we'll leave this up to the guys that are getting paid for their work.

Dude don't give up now lol The scene NEEDS guys like you.

While you're reading this, can I suggest you have a look into Lakka? They just released their first bata for the ATB and its a good start. Maybe have a look into what they use and how they get about getting it to work?
Reply
#19
I did get emulationstation compiled (binary here: https://github.com/mikerr/EmulationStation/)
and merged the lakka retroarch cores with files/themes from recalbox to make a mostly functioning recalbox image ( tinkerOS based: g )

...is anyone working on recalbox for tinkerboard ? (https://www.recalbox.com/)
Reply
#20
I guess if you just want to use it as a retro game console, you can use Mednafen/Mednaffe.
The OpenGL acceleration doesn't work, but using SDL actually makes SNES, GBA etc. pretty playable.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)