Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Raspbian Buster
#1
So there's a new version of Raspbian, which the Raspberry 4 needs to operate, but those of you who still have older Pi's will probably want to try it out, so here's the basics 

I set up Buster on a Pi 3B+
It's initial set up is a bit more fussy than previous versions but its all fine aside from insisting I must speak Dutch if I set my locale to Amsterdam...I wish it would understand that being in 1 part of the world does not mean you speak that language.. Fortunately there is an English only tick box.

It does seem a tiny bit clunky in use on the 3B+ maybe it expects a bit more power to run, but thats not the Raspberry way, so will see how it gets on after its finished updating and installing.

And that took a while but, yes it seems a bit smoother now.

SSH and VNC are disabled by default so you need to enable them if you are using headless systems or coding on a PC

STB and GLM need to be installed 1st and bullet physics

But...thats it... all libs are in the same places, and it builds and runs demo's fine. It still needs the _static libs of Stretch but no problems at all getting things up and running.

Interesting to note checking the libs folder there is currently no GLES3.0 folder... that maybe due to installing itself on a 3B+ I'll see if it installs the libs on a 4 when my monitor cables come.

So..all good..at least for my level of usage (ie not so much on the Pi itself). If there are issues I'm sure users will find them. But on a 3B+ at least Buster seems to work just fine.
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
making sticky
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
Now.... While the 2B, 3B and 3B+ (probably all) are quite happy to run Buster and the demo's, on the Pi 4 there is a distinct new issue.

The Pi4 does not have drivers for its openGLES2.0 <<<EDIT yes it does, but you need to be sure you set them up correctly>>>

yup, no drivers, so you can't revert to Legacy (ie correct OpenGLES2.0) drivers, you need to work with a new system for Pi 4

Which isn't actually too different from the way we produce code for mesa based Linux systems, we just have to be a little careful where we get our libs from.

1st step
install mesa libs using
sudo apt-get install libgles2-mesa-dev

this also installs GLES3.0

step 2... don't use broadcom, in fact don't treat it as a RASPBERRY at all, so remove the RASPBERRY preprocessor define.

step 3 is to use the mesa libs rather than the broadcom ones...becuase they won't work on a pi4
Now this also raises a techncial issue, if you want your code to run on both Pi4 and Pi3/2/1 it may not currently be possible, since you can't have 2 libs in place doing the same thing. For now we're going to use different builds and produce different versions for each of the 2 variants. P4's must use mesa libs which are...
EGL and GLES2, and X11 you don't need bcm_host, vchiq_arm, vcos, or khrn_static any more

Step 4.... change the include dirs to this
/usr/include
/opt/vc/include/interface/vcos/pthreads
/opt/vc/include/interface
/opt/vc/include/interface/vmcs_host/linux
/home/pi/glm Headers
.
/usr/include/bullet
/usr/include/bullet/BulletCollision/CollisionShapes

and the lib dir to
/usr/lib/arm-linux-gnueabihf

You should now be able to build all demos...but.....its a big but......they are going to run at pathetic speeds, around 4-5 fps.. ouch.... So its being emulated.... I guess we just have to wait.
I do get an odd error at eglInitialize(display, &majorVersion,&minorVersion) it returns true and fives the versions but it also spits out this error..libEGL warning: DRI2: failed to authenticate
I don't know why yet! It may be relevent


Oh and because its emulated it chokes on
EGL_SAMPLE_BUFFERS,1, // if you want anti alias at a slight fps cost
EGL_SAMPLES,4, //keep these 2lines, especially useful for lower resolution
as part of the egl config, so don't set them.

So unless I've done something wrong, it appears the Pi4 is unusable at this point as a graphics system, we will have to wait for drivers to mature.
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
OK, I HAVE NEWS

I made an error when listing what to do, becuase I had already gone into raspi-config and switched to legacy drivers... a standard fix when you can't get GLES2.0 to work, but while that works on the earlier raspberries, it does not work on the 4, leave it a the GL (Fake KMS) drivers
However that is the reason we lose acceleration, so we must not do it.

Once mesa is installed, with the GL Fake drivers in place, openGLES 2 and 3 are available, and also the EGL_SAMPLE stuff too.

It basically all works fine.
One small issue, is that on the broadcom systems I was able to easily define a seperate screen res and framebuffer. I usually set the framebuffer to half size. I've not worked out how to do that in X11 so framebuffer and screen size are the same, which means an X11 screen is a higher res, pushing 2x the pixels which has an impact on performance. I need to try to work out how to make the frame buffer smaller like broadcom allowed.

There is also another way to get an EGL surface, using something called DRM, but I really have no idea what that is.. I will investigate soon.
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: 2 Guest(s)