FNA Games on ARM board (i.e. play FEZ, Stardew Valley, Bastion... on Odroid/OrangePI/RPi)


linux-image-4.15.17-letux-lpae-pyra-l is the one that has the gpu stuff :

apt install linux-image-4.15.17-letux-lpae-pyra-l
boot with that kernel.
stop xorg/dm ( from serial/ssh: systemctl stop lightdm)
edit /usr/share/pyra/scripts/letux/tiler-ctl and change ROTATION=0 to ROTATION=1
disable tiler rotation : /usr/share/pyra/scripts/letux/tiler-ctl 0


wget http://packages.pyra-handheld.com/images/extra/pvrsrvkm.ko
insmod pvrsrvkm.ko
/opt/omap5-sgx-ddk-um-linux/bin/pvrsrvctl --start --no-module
/opt/omap5-sgx-ddk-um-linux/bin/gles1test1 500
 
Last edited:
Thanks for reply.

But i got same result as i try self compiled kernel 4.15.17.
No screen output and endless kernel exception on serial console like this:
WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x244/0x31c
[ 80.809353] 44000000.ocp:L3 Custom Error: MASTER MPU TARGET DMM1 (Read): Data Access in User mode during Functional access
[ 80.809355] Modules linked in: snd_soc_dmic snd_soc_omap_hdmi_audio sg at24 palmas_gpadc snd_soc_omap_mcbsp snd_soc_omap_abe_twl6040 snd_soc_omap_mcpdm snd_soc_twl6040 snd_soc_omap snd_pcm_dmaengine leds_gpio binfmt_misc smsc95xx usbnet sunrpc ecryptfs encrypted_keys ip_tables x_tables ipv6 autofs4 as5013 tca8418_keypad tsc2007 industrialio pwm_bl panel_boe_w677l pwm_omap_dmtimer omapdrm drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm dwc3 encoder_tpd12s015 omapdss connector_hdmi cec omapdss_base ehci_omap dwc3_omap gpio_twl6040 palmas_pwrbutton
[ 80.809441] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 4.15.17-letux-lpae-pyra-l #5
[ 80.809444] Hardware name: Generic OMAP5 (Flattened Device Tree)
[ 80.809458] [<c020ef6c>] (unwind_backtrace) from [<c020b2ec>] (show_stack+0x10/0x14)
[ 80.809466] [<c020b2ec>] (show_stack) from [<c07e3d48>] (dump_stack+0x7c/0x98)
[ 80.809474] [<c07e3d48>] (dump_stack) from [<c0228cb8>] (__warn+0xdc/0xfc)
[ 80.809480] [<c0228cb8>] (__warn) from [<c0228d0c>] (warn_slowpath_fmt+0x34/0x44)
[ 80.809486] [<c0228d0c>] (warn_slowpath_fmt) from [<c051af58>] (l3_interrupt_handler+0x244/0x31c)
[ 80.809495] [<c051af58>] (l3_interrupt_handler) from [<c026ccb0>] (__handle_irq_event_percpu+0x4c/0x258)
[ 80.809503] [<c026ccb0>] (__handle_irq_event_percpu) from [<c026ced4>] (handle_irq_event_percpu+0x18/0x54)
[ 80.809508] [<c026ced4>] (handle_irq_event_percpu) from [<c026cf48>] (handle_irq_event+0x38/0x5c)
[ 80.809514] [<c026cf48>] (handle_irq_event) from [<c02707d0>] (handle_fasteoi_irq+0xb0/0x124)
[ 80.809520] [<c02707d0>] (handle_fasteoi_irq) from [<c026c140>] (generic_handle_irq+0x18/0x28)
[ 80.809526] [<c026c140>] (generic_handle_irq) from [<c026c690>] (__handle_domain_irq+0xa0/0xb4)
[ 80.809532] [<c026c690>] (__handle_domain_irq) from [<c0201414>] (gic_handle_irq+0x4c/0x78)
[ 80.809539] [<c0201414>] (gic_handle_irq) from [<c07fb2f8>] (__irq_svc+0x58/0x8c)
[ 80.809541] Exception stack(0xc0c01f40 to 0xc0c01f88)
[ 80.809546] 1f40: 00000000 00032bb0 fe600000 00000000 00000001 c0c00000 c0c03d78 c0c03dc8
[ 80.809550] 1f60: 00000000 c0c03d40 c0a52a38 00000000 2e561000 c0c01f90 c021caa0 c02081b0
[ 80.809552] 1f80: 60070013 ffffffff
[ 80.809561] [<c07fb2f8>] (__irq_svc) from [<c02081b0>] (arch_cpu_idle+0x1c/0x38)
[ 80.809568] [<c02081b0>] (arch_cpu_idle) from [<c0260c18>] (do_idle+0xc8/0x118)
[ 80.809574] [<c0260c18>] (do_idle) from [<c0260ec4>] (cpu_startup_entry+0x18/0x1c)
[ 80.809581] [<c0260ec4>] (cpu_startup_entry) from [<c0a00c1c>] (start_kernel+0x35c/0x3c8)
[ 80.809586] ---[ end trace 6abbb082670207b9 ]---
[ 81.089728] pgd = 4a4aa19b
[ 81.092563] [b5949830] *pgd=ab5fa003, *pmd=fc92c003

On HDMI screen no login shown, only a blinking curser on top left corner.

Login over ssh works and

"insmod pvrsrvkm.ko"
"/opt/omap5-sgx-ddk-um-linux/bin/pvrsrvctl --start --no-module"

was succesfully, all kernel symbols are available.

Thomas
 
Last edited:
Same here, it's because lightdm keeps restarting because xorg keeps crashing on the driver , if you stop lightdm the messages will stop too.
Something in those kernels > 4.15.0 goes pretty wrong.
3d should work once the kernel module is loaded though, and that won't do anything while xorg is running anyway.
 
How did you realize that comes from lightdm? Try and error?

So, at the end, for me it is not possible using gl4es for this board.

Thomas
 
Last edited:
I think "/opt/omap5-sgx-ddk-um-linux/bin/gles1test1 500" must be working, before using gl4es, or?
And this reports error:
Code:
PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]
PVR:(Error): Couldn't connect to services [0, ]
'eglInitialize' returned egl error 'EGL_BAD_ALLOC' (0x3003)
So, egl is not working.

Code:
Module                  Size  Used by
pvrsrvkm              380928  0
omapdrm                61440  1
drm_kms_helper        114688  1 omapdrm
cfbfillrect            16384  1 drm_kms_helper
syscopyarea            16384  1 drm_kms_helper
cfbimgblt              16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
cfbcopyarea            16384  1 drm_kms_helper
drm                   282624  4 omapdrm,drm_kms_helper,pvrsrvkm
snd_soc_dmic           16384  0
smsc95xx               28672  0
usbnet                 32768  1 smsc95xx
snd_soc_omap_abe_twl6040    16384  0
snd_soc_twl6040        28672  2 snd_soc_omap_abe_twl6040
sg                     28672  0
snd_soc_omap_hdmi_audio    16384  0
leds_gpio              16384  0
palmas_gpadc           16384  0
at24                   24576  0
snd_soc_omap_mcpdm     16384  3 snd_soc_omap_abe_twl6040
snd_soc_omap_mcbsp     24576  0
snd_soc_omap           16384  3 snd_soc_omap_hdmi_audio,snd_soc_omap_mcbsp,snd_soc_omap_mcpdm
snd_pcm_dmaengine      16384  1 snd_soc_omap
binfmt_misc            20480  1
sunrpc                217088  1
ecryptfs               73728  0
encrypted_keys         20480  1 ecryptfs
ip_tables              20480  0
x_tables               20480  1 ip_tables
ipv6                  335872  43
autofs4                36864  2
as5013                 20480  0
tca8418_keypad         16384  0
tsc2007                16384  0
industrialio           53248  2 tsc2007,palmas_gpadc
pwm_bl                 16384  0
panel_boe_w677l        20480  0
pwm_omap_dmtimer       16384  0
dwc3                  106496  0
encoder_tpd12s015      16384  1
connector_hdmi         16384  1
omapdss               217088  3
omapdss_base           16384  5 omapdrm,omapdss,encoder_tpd12s015,panel_boe_w677l,connector_hdmi
cec                    36864  1 omapdss
ehci_omap              16384  0
dwc3_omap              16384  0
gpio_twl6040           16384  0
palmas_pwrbutton       16384  0

Thomas
 
I noticed that if you try to use "regular" GLES app (or gl4es with LIBGL_FB=0 or without that export), the EGL part get unusable until reboot.

Note that you can use GL4ES in a X11 windows using LIBGL_FB=3 , but it will be a bit slow because the rendering is done in a PBuffer (so offscreen) and then blitted by X11 in the window. But it does work fine in X11, so that's something....
 
Sorry, I'm confused.

kernel 4.15.17: I can't use x11 cause lightdm crashed on start, searching around i found nothing about this behavior
kernel 4.15.0rc8: I can't use egl cause needed module pvrsrvkm.ko can not be loaded, missing drm sysmbols

Any other options?

Thomas
 
On IRC, aTc said:
Code:
<aTc> ptitSeb|Work: ive packaged 4.19.0-rc6-letux-lpae-pyra , gpu kernel module here : http://packages.pyra-handheld.com/images/extra/pvr/
Try this one (tiler doesn't work, but you don't need it on the evm).
 
No luck, kernel is loaded but no screen output, on serial console endless messages, but new messages:
Code:
[   89.966978] [drm:omap_irq_handler [omapdrm]] *ERROR* FIFO underflow on gfx (0x00000040)
[   89.975971] [drm:omap_crtc_error_irq [omapdrm]] *ERROR* tv: errors: 00008040

Thomas
 
Yes, with kernel 4.15.

With fbdev i got no more error message on serial console, but starting "/opt/omap5-sgx-ddk-um-linux/bin/eglinfo" prints out
Code:
PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086849 (strerror returns no value.). [0, ]
PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
PVR:(Error): Couldn't connect to services [0, ]
Unable to initialise egl
    egl error 'EGL_BAD_ALLOC' (0x3003)

We have to move this discussion into another thread.

Thomas
 
Yes, with kernel 4.15.

With fbdev i got no more error message on serial console, but starting "/opt/omap5-sgx-ddk-um-linux/bin/eglinfo" prints out
Code:
PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086849 (strerror returns no value.). [0, ]
PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
PVR:(Error): Couldn't connect to services [0, ]
Unable to initialise egl
    egl error 'EGL_BAD_ALLOC' (0x3003)

We have to move this discussion into another thread.

Thomas
eglinfo will probably not work because it try to use X11 integration, that, for now, crash the driver. But try "LIBGL_FB=1 glxgears" with gl4es compiled and that should work (you'll need to restart the board to reset the driver after a crash...).

(And yeah, this discussion should be in it's own thread, about getting 3D acceleration on EVM Board).
 
Steps i have done:

boot system with kernel 4.15.17
sudo insmod pvrsrvkm.ko successfully
create a skript
set LC_ALL=”C”
export LIBGL_ES=2
export LIBGL_GL=21
export LIBGL_FB=1
export LD_LIBRARY_PATH="$HOME/Projects/gl4es/lib"
set
glxgears > test.txt
start script
LIBGL: Initialising gl4es
LIBGL: v1.0.9 built on Aug 31 2018 14:28:25
LIBGL: framebuffer output enabled
LIBGL: Using GLES 2.0 backend
LIBGL:loaded: libGLESv2.so
LIBGL:loaded: libEGL.so
LIBGL: Using GLES 2.0 backend
PVR:(Error): PVRSRVBridgeCall: Failed to access device. Function ID:3223086849 (strerror returns no value.). [0, ]
PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
PVR:(Error): Couldn't connect to services [0, ]
LIBGL: Targeting OpenGL 2.1
LIBGL: glXMakeCurrent FBO workaround enabled
LIBGL: Current folder is:/home/thomas
PVR:(Error): PVRSRVBridgeCall: Failed to access device. Function ID:3223086849 (strerror returns no value.). [0, ]
PVR:(Error): PVRSRVEnumerateDevices: BridgeCall failed [0, ]
PVR:(Error): PVRSRVConnect: Unable to enumerate devices. [0, ]
PVR:(Error): InitialiseServices: PVRSRVConnect failed: PVRSRV_ERROR_BRIDGE_CALL_FAILED [0, ]
PVR:(Error): WSEGL_InitialiseDisplay: Services initialisation failed [0, ]
Error: glXCreateContext failed
As you can see, no luck.

dmesg:
Code:
[ 1179.439002] pvrsrvkm: loading out-of-tree module taints kernel.
[ 1179.465107] omap_hwmod: gpu: _wait_target_disable failed
[ 1179.471097] [drm] Initialized pvr 1.14.3699939 20110701 for 5600fe00.sgx on minor 1
[ 3088.280684] PVR_K:(Error): BridgedDispatchKM: Driver initialisation not completed yet.
[ 3088.295448] PVR_K:(Error): BridgedDispatchKM: Driver initialisation not completed yet.

What I'm doing wrong?
Thomas
 
Last edited:
After the insmod of pvrsrvkm.ko, did you also start the driver with
Code:
/opt/omap5-sgx-ddk-um-linux/bin/pvrsrvctl --start --no-module
 
Success, that was the missing link.

Thank you for your patience.

Thomas

endless message log:
[ 287.094194] omap_hwmod: gpu: _wait_target_disable failed
 
That's a start!
So you had glxgears running with LIBGL_FB=1?
You can try the FNA games now, to go back on the subject of this thread :p
 
Yes, glxgears is running in fullscreen with 60 fps vsync and debug output shows, that egl is used.

And a self written breakout game with monogame 3.6 is working too, testing FNA game next.

Thomas
[doublepost=1538826183,1538822122][/doublepost]I have "Bastion" from gog but this seems too big for start, and i have no idea who extract needed files.

Is there a simpler fna game?

Thomas
 
Bastion can work, it start on my Pandora, but is too slow to be fun. I use big swapfile on my Pandora, so I'm not sure of the memory consumption...
But I'm not sure I understood your issue: you have trouble extracting the data (I described how to extract gog data in the article) or the game don't start?
Other FNA game can be Owlboy or "A Virus Named TOM". Simpler and faster game for me is "Towerfall: Ascension".
 
Back
Top