Board index FlightGear Support Compiling

Download_and_compile.sh & Raspberry Pi4  Topic is solved

Building FlightGear from source, and in the need for help?

Re: Download_and_compile.sh & Raspberry Pi4  

Postby enrogue » Tue Feb 18, 2020 12:15 am

I'll just post this here now, I have a successful compile on Debian 10 armhf (via an LXD container on a RK3399 powered Rock960 which runs ubuntu 64bit), and on an RPi3B

The method:

Code: Select all

mkdir work

cd work/

git clone https://git.code.sf.net/p/flightgear/fgmeta

mkdir next

cd next

../fgmeta/download_and_compile.sh -j2

*wait a bit..., it will fail on in simgear*

*may as well grab fgdata (depth=1 to keep the download small)*

 cd install/flightgear

git clone --depth=1 git://git.code.sf.net/p/flightgear/fgdata

cd ../..

../fgmeta/download_and_compile.sh -j2 OSG

*it will fail*

*grab the patch*
wget -c https://sources.debian.org/data/main/o/openscenegraph-3.4/3.4.1+dfsg1-5/debian/patches/0007-Explicit-signed-char-type-for-portability-base64.patch

cd openscenegraph/

*patch it*
patch -p1 < ../0007-Explicit-signed-char-type-for-portability-base64.patch

cd ..

*you may have done these configs already*
git config --global user.email "you@example.com"

git config --global user.name "Your Name"

*build OSG*
../fgmeta/download_and_compile.sh -pn -j4 OSG

*build the rest - it will pick up your compiled OSG now*
../fgmeta/download_and_compile.sh -pn -j4



the above is from my bash history - I may have mis-transcribed somwhere

UPDATE: and the build does actually load (Qt gui), and start, but I'm not able to run fully as I can only test on a RPi3 which doesn't have enough ram to run it - I'll have to reinstall raspbian on my Rpi4 & see how it goes
User avatar
enrogue
 
Posts: 269
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: Ubuntu, macOS

Re: Download_and_compile.sh & Raspberry Pi4

Postby enrogue » Tue Feb 18, 2020 10:20 am

I can verify that the build works on the RPi4B 4GB running raspbian & uses just over 1G ram while running - so you *might* be able to squeeze into a 2G Rpi4, but I'm not sure - you probably would have issues doing a -j4 compile on a 2GB one as a couple of the compiles use over 600M per process

framerate is dependant on window size - I get 25-30fps on the ground at EGOY with the ufo at 1280x800 (default renderer)

It has the same issue with transparency in textures that the debian package does, so propeller blurs are visible, the sun texture is black & trees are blocks

I would definitely do the compile on an external USB drive

I'll see if I can get some screenshots in a bit
User avatar
enrogue
 
Posts: 269
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: Ubuntu, macOS

Re: Download_and_compile.sh & Raspberry Pi4

Postby enrogue » Tue Feb 18, 2020 12:05 pm

A screenshot for now:

Image

It runs quite well if the desktop is set to 1280x720 & FG set to fullscreen. Only the default renderer is useable & not just on lowest shader settings either

Some odd things:

- Canvas images/huds don't seem to work (black patches)
- Sun is a black circle in a square
- propeller blurs are not transparent but black where the texture is
- trees are blocks
- 3d clouds work fine though!
- some external model shaders look odd, so things look better turned off
- screen resolution seems to have a greater effect on frame rate than poly count (not sure)
User avatar
enrogue
 
Posts: 269
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: Ubuntu, macOS

Re: Download_and_compile.sh & Raspberry Pi4

Postby Puffergas » Tue Feb 18, 2020 6:11 pm

Nice ! ! !

I'm working on simple stuff like the joystick Wiki. Typing it up locally then will past it into the Wiki. I want to do this stuff first, before I get back into compiling.

I have also been using full screen set at 1280 x 720. I think that is what is native to FG.
Puffergas
 
Posts: 55
Joined: Thu Jan 02, 2020 1:09 am

Re: Download_and_compile.sh & Raspberry Pi4

Postby Hooray » Tue Feb 18, 2020 6:45 pm

Regarding the canvas issue, it would be interesting if the Intel-GMA related patches work and/or if the default osg off-screen examples work correctly or not.
Either way, it should be pretty straightforward to fix the Canvas FBO creation accordingly - for instance, if hard-coded OD-gauges work properly, the Canvas can also be made to work correctly.
I think that *should* also apply to the osgtext animation (?)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Download_and_compile.sh & Raspberry Pi4

Postby enrogue » Wed Feb 19, 2020 9:19 am

Hooray - I had a search but I couldn't find the Intel GMA patches, sorry

I'll post some more screenshots later today to show what the visual artifacts look like
User avatar
enrogue
 
Posts: 269
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: Ubuntu, macOS

Re: Download_and_compile.sh & Raspberry Pi4

Postby Hooray » Thu Feb 20, 2020 10:59 am

For the issue where offscreen texturing doesn't work correctly, it would indeed be good to know whether hard-coded glass displays work properly or not, i.e. the legacy NavDisplay, the WXRADAR or groundradar.

In addition, it may be helpful to confirm whether the off-screen rendering examples from OSG are working at all.

If that's the case, it should be pretty simple to fix up the way FlightGear Canvas texture are allocated.

If in doubt, you could also check the osg archives to see if RPI requires any particular settings/flags.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Download_and_compile.sh & Raspberry Pi4

Postby enrogue » Thu Feb 20, 2020 4:28 pm

OK, lots more screenshots on different aircraft

As far as I can tell canvas instruments are working - it just appears to be some transparent textures that cause issues

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image
User avatar
enrogue
 
Posts: 269
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: Ubuntu, macOS

Re: Download_and_compile.sh & Raspberry Pi4

Postby Hooray » Thu Feb 20, 2020 4:55 pm

right, good news then - those are indeed canvas-based instruments (the tooltip, too) - so it seems there is only a minor issue then.
Thanks for reporting back here.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Download_and_compile.sh & Raspberry Pi4

Postby V12 » Fri Feb 21, 2020 7:23 pm

Problems with transparent textures should be graphics driver related. Do You use DDS texture caching ? If yes, try it to turn off.
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 2119
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Download_and_compile.sh & Raspberry Pi4

Postby enrogue » Fri Feb 21, 2020 11:44 pm

I'm not using the dds texture caching

I'm aware that the V3D driver is probably at fault - I've been trying to track down the exact type of texture that it's having issues with as not all are failing - it would be good to find a small test case & file a bug report
User avatar
enrogue
 
Posts: 269
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: Ubuntu, macOS

Re: Download_and_compile.sh & Raspberry Pi4

Postby V12 » Sat Feb 22, 2020 5:09 am

I had problem with grayscale encoded .png textures...
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 2119
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Download_and_compile.sh & Raspberry Pi4

Postby Hooray » Sat Feb 22, 2020 10:18 am

enrogue wrote in Fri Feb 21, 2020 11:44 pm:I'm aware that the V3D driver is probably at fault - I've been trying to track down the exact type of texture that it's having issues with as not all are failing - it would be good to find a small test case & file a bug report


you could try the osg examples in combination with glxinfo
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: Download_and_compile.sh & Raspberry Pi4

Postby enrogue » Sun Feb 23, 2020 2:24 pm

OK, so a workaround for the transparent textures issue on RPi4 is actually to use the DDS texture cache (without NVTT compression)

A few screenshots:

Image

Image

Image

Image

Image

Image

Image

This is what happens when you compile in NVTT compression:

Image

Image

Image

It is also possible to run FG on a PaspberryPi 3B! Although you'll have issues with memory, so you have to increase the swap size & GPU memory

Here is how to increase the built in swap file: https://wpitchoune.net/tricks/raspberry ... _size.html

You can also use zwap (compressed ram as swap) by installing the zram-tools package & editing /etc/default/zramswap - I used a combination of both to give me 1GB swap & set the GPU to 256M VRAM - you have to do this as the older VC4 GPU has no memory management unit of it's own, so textures have to sit in the GPU assigned ram (which is fixed on bootup)

Some screenshots from the RPi3B:

Image

Image

As you can see it doesn't handle the 3d cloud texture properly so it's best to turn off 3d clouds in fact its better to turn everything down to minimum - I managed to get it to start at PHTO & take off so I could get some views - but the last shot locked the gpu due to memory allocation (it helps to have sshed into the rpi from another machine for testing!)

Image

Image
User avatar
enrogue
 
Posts: 269
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: Ubuntu, macOS

Re: Download_and_compile.sh & Raspberry Pi4

Postby wkitty42 » Sun Feb 23, 2020 7:12 pm

enrogue wrote in Sun Feb 23, 2020 2:24 pm:As you can see it doesn't handle the 3d cloud texture properly so it's best to turn off 3d clouds [...]

FWIW: if you have active weather (aka AW) enabled, 3D clouds are forced on...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6837
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

PreviousNext

Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest