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 » Mon Feb 17, 2020 3:01 pm

I've managed to build OpenSceneGraph with one of the debian patches, and currently SimGear is building using the built OSG - it's gotten past the last error, will have to see if it completes or if I need another fix - will update when it's done (compiling on RPi3 with Raspbian, so not quick)
User avatar
enrogue
 
Posts: 246
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: Download_and_compile.sh & Raspberry Pi4

Postby Puffergas » Mon Feb 17, 2020 5:57 pm

Opps, I forgot; using stock 32 bit Raspian.

Below is a few ideas for the title of the Wiki page:

Raspberry Pi4
Raspberry Pi4 Manual
Raspberry Pi4 Flight Manual
Raspberry Pi4 How To

I was thinking to keep all the notes under one of the above (or what ever name) titles. Some subjects below.

Joysticks
Compiling
Performance settings
Interfacing

I never wrote a Wiki page before, hope there isn't a steep learning curve... :)
Puffergas
 
Posts: 49
Joined: Thu Jan 02, 2020 1:09 am

Re: Download_and_compile.sh & Raspberry Pi4

Postby Puffergas » Mon Feb 17, 2020 6:11 pm

My wild guess is that you used the OSG patch "arm, powerpc and s390 platforms have default unsigned chars, so that
code failed when a literal "-1" was found."

If I am starting to understand this, it looks like 3 files were patched. the "+" symbol are insertions and the "-" are deletions within the edited files.

https://sources.debian.org/patches/open ... 1+dfsg1-5/

As a side note, I just learned that a browser tab can be clicked and dragged over to the second monitor ! !
Puffergas
 
Posts: 49
Joined: Thu Jan 02, 2020 1:09 am

Re: Download_and_compile.sh & Raspberry Pi4

Postby enrogue » Mon Feb 17, 2020 6:25 pm

Yes, thats the patch - I'll post the instructions here when it's finished - recompiling OSG on an external drive at the moment as for some reason it missed a dependancy that I think it needs (libjpeg-dev)
User avatar
enrogue
 
Posts: 246
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: Download_and_compile.sh & Raspberry Pi4

Postby Hooray » Mon Feb 17, 2020 7:24 pm

I've added the basic structure that you suggested above to the wiki page, see: http://wiki.flightgear.org/Raspberry_Pi4_How_To


Also see: http://wiki.flightgear.org/Portal:Embedded
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: 11835
Joined: Tue Mar 25, 2008 8:40 am

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: 246
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

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: 246
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

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: 246
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

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: 49
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: 11835
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: 246
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

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: 11835
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: 246
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

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: 11835
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: 1816
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

PreviousNext

Return to Compiling

Who is online

Users browsing this forum: No registered users and 2 guests