Hello,
I think I'm trying to get /dev/dri to populate?
I've got an SDL2 application I'm working on and trying to make run on piCore 12.0. I had started with piCore13.03 but as per:
http://forum.tinycorelinux.net/index.php?topic=24762.0http://forum.tinycorelinux.net/index.php/topic,24855.msg159683.html#msg159683It appears piCore13.03 doesn't yet work for SDL applications. Before I saw these messages I tried piCore13.03 and was getting errors that /dev/dri could not be opened.
So trying again with piCore12.0.$ uname -a
Linux box 5.4.51-piCore #1 Sat Sep 19 11:11:32 EDT 2020 armv6l GNU/Linux
Note I'm not running X, here's my onboot.lst.
openssh.tcz
compiletc.tcz
rpi-vc.tcz
rpi-vc-dev.tcz
SDL2-dev.tcz
SDL2_image.tcz
SDL2_image-dev.tcz
SDL2_gfx.tcz
graphics-5.4.51-piCore.tcz
squashfs-tools.tcz
> I made the SDL2_gfx tcz.
> I was hoping graphics-5.4.51-piCore would make things work, but no.
I am running on a old RpiB1
$ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2835
Revision : 0002
Serial : 00000000bc3f268b
Model : Raspberry Pi Model B Rev 1
Here is my cmdline.txt, I tried without vga=791 also:zswap.compressor=lz4 zswap.zpool=z3fold console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed multivt vga=791
I've tried with and without the following line in config.txt. Otherwise config.txt is stock. (sounds like I may actually not want to do this).
dtoverlay=vc4-fkms-v3d
----
Currently my issue is that when I run my application, video fails to initialize. With piCore12.0 I don't get errors about /dev/dri, but SDL_GetError says there is no available video device. Here's my video init snippet and the resulting output.
int numRenderDrivers = SDL_GetNumRenderDrivers();
printf( "%d render drivers:\n", numRenderDrivers );
for( int i = 0; i < numRenderDrivers; ++i )
{
SDL_RendererInfo rendererInfo;
SDL_GetRenderDriverInfo(i, &rendererInfo);
printf("Render driver %d: ", i );
PrintRendererInfo(rendererInfo);
}
SDL_Init(SDL_INIT_VIDEO);
cout << "SDL Init done" << endl;
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
win = SDL_CreateWindow("Test", 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN_DESKTOP);
I get this output:
4 render drivers:
Render driver 0: Renderer: opengl software=0 accelerated=1, presentvsync=1 targettexture=1
Render driver 1: Renderer: opengles2 software=0 accelerated=1, presentvsync=1 targettexture=1
Render driver 2: Renderer: opengles software=0 accelerated=1, presentvsync=1 targettexture=0
Render driver 3: Renderer: software software=1 accelerated=0, presentvsync=0 targettexture=1SDL Init done
Failed to create SDL Window
SDL Error = >
No available video device<
---
Any guidance would be appreciated.
modprobe vc4 does load some modules, but no /dev/dri is populated.
- Doesn't change the fact the application doesn't work and SDL_GetError returns No available video device.
- It seems strange to me that it is listing a video drivers.. but then doesn't work.
- I've run this code on arch linux and it works.
73