Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bullseye on Rpi2/3
#1
Hi all
Well we've reached a point sadly where the rpi3 code is not going to work any more using Bullseye. all the old Broadcom vc4 drivers have been depricated and are no longer part of the bullseye install, so the code will no longer build or run as it stands.

Generally this isn't a massive issue, as once we have the graphic systems set up we can ignore the OS, but in the case of the Rp1-3 the broadcom DispmanX system was used to make the graphics framebuffers. Without them the code isn't going work

But in theory installing the mesa libs which now have VC4 support you can get things up and running, the set up is similar to how we do the Pi4 code, and we now use X11 to send our graphics to the screen.

But there's a small problem at the moment with the EGL drivers not initialising, I am looking into it, when I work it out, I'll post a new hello triangle project set up for you here to allow you to progress if you are using a Pi1-3

Im working on the issue and will try to get the fix to you soon, I've also asked the Pi forums if theres a way to install the depricated system.. I suspect not but who knows.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#2
I've stumbled on a fix that might be better than trying to revamp all the code, basically reinstalling all the old drivers, which will still work just fine, I found this solution at
https://githubhot.com/repo/homeworkc/laz...issues/100
It seems solid and restores the old VC drivers the book code expects.

you will need to install cmake before you clone the dir
open a terminal and enter
sudo apt-get install cmake -y

then enter
git clone https://github.com/raspberrypi/userland.git

then enter
cd userland
then enter
./buildme

this will take a few minutes to work, but it will rebuild and restore all the drivers we need for the code to work

Of course this only applies to Rpi1-3 this solution will not work on Rpi4 which needs different X11 graphic setups.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#3
BTW a special thank you to new member ckm who brought this recent and upsetting development to my attention.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#4
Nice catch. However, moving forward, wouldn't it be better to not use the deprecated drivers since they will not be updated and just go with the X11 solution like on the RP4 or what is used in the Blue and Gold books?

This would make the code more portable as well.
Reply
#5
yes, I know but... on Rpi3 the Mesa EGL ins't working correctly, not quite sure why, or if this is going to be fixed. Most new users now are indeed going to use the Rpi4 so the new setup systems listed elsewhere are the best way to go. but we need to assume there's still going to be people who use/buy/are given a Rpi3 and start with that so they need a system we know works.

The book generally moves away from the graphics setup early on, so once thats done its going to be ok to continue. I am working on a new updated and greatly expanded book for Rpi4 which will cater to that, but I guess for now the best solution for Rpi3 owners is to install the old drivers...learn the main content of the book and feel comfortable to upgrade to a RPi4 with a different setup.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#6
What specifically is the issue?

I'm able to build in CodeBlocks and run say the MagPi Lesson3 HelloTriangle code on a RasPi 3 B+ running Bullseye and kernel 5.10.
I just made the X11 changes I made for the Rpi4 and Tinkerboard and it seems to work. The only difference it seems was having to add "-lGL" to the Linker options on the RasPi 3 B+ which I did not have to do on the Tinkerboard.

The Gold and Blue book code compiles and works as well on the RasPi 3 B+ with Bullseye.
Reply
#7
I get a failed to init DI2 (or DR2, can't recall) which prevents the OGL code working
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#8
Yeah, I get the following but it still runs:

libEGL warning: DRI2: failed to authenticate

This has been pretty consistent with running OpenGL-ES on the RasPi for me if I run with the GL Legacy GL Driver setting but it has not seem to cause anything to not run. If I set it to GL2 GL Full KMS I do not see this message with OpenGL-ES 2 but the OpenGL-ES 3 examples do not run.

I've built and run glmark2-es on the RasPi 3+ with Bullseye and it is working although has a low score from a Remote Desktop session.
Reply
#9
it might be nice to find out why and what its impact is, but....Pi3 is so last year Big Grin
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)