Tiny Core Base > Raspberry Pi
building love2d on RPI3
breadbanana:
Hello guys!
So i've been working with TC for a while now and the experience is been absolutely good.
So i developed an applicaiton demo on dietpi using love2d with kmsdrm and opengles2 WHICH WORK on this enviroment
So i did the same steps here and was expecting the same results, but this isn't what happend:
i'm on the love 11.5 and built SDL2.32 from source too, i made sure to disable all stuff that i'don't need there
--- Code: ---./configure --enable-alsa=yes --enable-oss=no --enable-pulseaudio=no --enable-esd=no --enable-pipewire=no --enable-arm-neon=yes --enable-arm-simd=yes --enable-video-opengl=no --enable-video-opengles=yes --enable-video-vulkan=no --enable-video-rpi=yes --enable-video-x11=no --enable-video-wayland=no --enable-video-kmsdrm=yes
--- End code ---
Then i built love2d, it works... but the performance is suboptimal!
The first thing i see it declares it is running on:
--- Code: ---OpenGL 4.5 (Core Profile) Mesa 24.2.5 Mesa llvmpipe
--- End code ---
instead:
--- Code: ---OpenGL ES OpenGL ES 2.0 Mesa 23.2.1-1~bpo12+rpt3 Broadcom VC4 V3D 2.1
--- End code ---
The second issue i see when i try to run my application with "SDL_VIDEODRIVER=kmsdrm" to force the application to run over kmsdrm i get:
--- Code: ---Error: Could not initialize SDL video subsystem (kmsdrm not available)
--- End code ---
i do tce-loaded rpi-vc-dev, mesa-dev, libegl-dev and libdrm-dev
Any ideia of what may i be missing? anything may help! thanks!
Juanito:
Do you have dtoverlay=vc4-kms-v3d in your config.txt?
Have you loaded Xorg-3d?
breadbanana:
Juanito, thanks for your interest in the topic
the config.txt is pretty much the standard one, some diferences are on the sound cart and in the uart peripherals.
just before the end of file it has:
--- Code: ---[all]
# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2
--- End code ---
i'm not using X at all, this is my main objective with this build. i had success when doing it trough dietpi.
love let me use some system vars to configure which driver and which graphics backend i can use
the main question is i want to use kmsdrm, and i THINK i had everything tce-loaded from it ( may i be wrong? ) but as soon i force using it i get that "kmsdrm not available". i think this might be the first hint that something is wrong.
i've tested the SDL2 from the repo and tryied to built it myself.
Thanks in advance.
Juanito:
You’ll need graphics-KERNEL loaded.
I just updated SDL2 - it says it supports kmsdrm.
breadbanana:
let's do some sanity checks
I'm on raspberry pi 3b+. I'm pretty sure it is a good unity, is quite new, and was being used on other machine.
i've downloaded the image from
--- Code: ---http://tinycorelinux.net/15.x/aarch64/releases/RPi/piCore64-15.0.0.zip
--- End code ---
, my focus with this device is to work mainly with RPI3 maybe on Zero W2, and RPI4 on some rare ocasions.
I've removed every .tcz i've built and working with only the .tczs that are on the repository.
using uname-r i get
--- Code: ---6.6.47-piCore-v8
--- End code ---
when requesting kmsprint i get:
--- Code: ---terminate called after throwing an instance of 'std::runtime_error'
what(): failed to find DRM cards
Aborted
--- End code ---
but if i modprobe -r vc4 and then modprobe vc4, i get from kmsprint:
--- Code: ---Connector 0 (32) HDMI-A-1 (connected)
Encoder 0 (31) TMDS
Crtc 3 (90) 1600x900@60.00 108.000 1600/24/80/96/+ 900/1/3/96/+ 60 (60.00) P|D
Plane 3 (80) fb-id: 292 (crtcs: 3) 0,0 1600x900 -> 0,0 1600x900 (XR24 AR24 AB24 XB24 RG16 BG16 AR15 XR15 RG24 BG24 YU16 YV16 YU24 YV24 YU12 YV12 NV12 NV21 NV16 NV61 RGB8 BGR8 XR12 AR12 XB12 AB12 BX12 BA12 RX12 RA12)
FB 292 1600x900 RG16
--- End code ---
i believe this might be a hint:
after that, when i load love2d and request what drivers it is using it returns :
--- Code: ---OpenGL 2.1 Mesa 24.2.5 Broadcom VC4 V3D 2.1
--- End code ---
and i see my fps are quite low. it is using OpenGL2.1 instead OpenGL ES 2.0 ( which this might make some sense as i'm using the repo built not my custom built sdl) but atleast is using the video hardware.
my questions are, why i'm need to reload module vc4 by hand after built?
in the past I used to configure the desired video resolution on config.txt, and afaik these configs are legacy and barelly supported, what are the standards today? how can i force 720p for instance and maybe even ignore monitor EDID?
Thanks in advance!
Navigation
[0] Message Index
[#] Next page
Go to full version