Difference between revisions of "Raspberry Pi"

From JogampWiki
Jump to navigation Jump to search
(Raspberry Pi troubleshooting)
(JogAmp API compatibility)
 
(32 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Raspberry Pi compatibility ==
 
== Raspberry Pi compatibility ==
JogAmp 2.4.0 contains support for rendering on Raspberry Pi using six configurations:
+
Raspberry Pi contains support for rendering on using eight configurations:
  
# armv6hf Broadcom DispmanX
+
# armv6hf Broadcom DispmanX (*)
# armv6hf Broadcom DispmanX overlay on top of X11  
+
# armv6hf Broadcom DispmanX overlay on top of X11 (+)
# armv6hf Mesa DRM/GBM
+
# armv6hf Mesa DRM/GBM using full KMS (+) ''Unstable Driver''
# armv6hf Mesa X11
+
# armv6hf Mesa DRM/GBM using fake KMS (*)
# aarch64 Mesa DRM/GBM
+
# armv6hf Mesa X11 (*)
# aarch64 Mesa X11
+
# aarch64 Mesa DRM/GBM using full KMS (+) ''Unstable Driver''
 +
# aarch64 Mesa DRM/GBM using fake KMS (*)
 +
# aarch64 Mesa X11 (*)
  
 +
''(*) full support by JogAmp WIP''
 +
 +
''(+) code available by JogAmp w/o full support''
 +
 +
''NS = Not Supported''
 +
 +
''WIP = Work in Progress''
  
 
{| class="wikitable" cellpadding="10"
 
{| class="wikitable" cellpadding="10"
|armv6hf
+
|armv6hf rasbian
|Broadcom DispmanX from console
+
| style="text-align:center;" colspan=2 | Broadcom DispmanX
|Broadcom DispmanX overlay on top of X11
+
| style="text-align:center;" colspan=2 | Mesa DRM/GBM Console
|Mesa DRM/GBM from console
+
|-
|Mesa X11
+
|
 +
|Console (*)
 +
|X11 Overlay (+)
 +
|True KMS w/o BCM (+)
 +
|Fake KMS w/ BCM (*)
 +
|Mesa X11 (*)
 
|-
 
|-
 
|Raspberry Pi 4
 
|Raspberry Pi 4
|style="background: red" |not supported by broadcom driver
+
|style="background: red" |''NS'' by BCM driver
|style="background: red" |not supported by broadcom driver
+
|style="background: red" |''NS'' by BCM driver
|style="background: orange" |default on Raspbian
+
|style="background: red" |''Unstable Driver''
|style="background: green" |default on Raspbian, well tested
+
|style="background: green" |Working
 +
|style="background: green" |Working, well tested
 
|-
 
|-
|Raspberry Pi 3a 3b 3b+ 2a 2b 2b+
+
|Raspberry Pi 3a 3b 3b+
|style="background: green" |default on Raspbian
+
|style="background: green" |Working, well tested
|style="background: green" |default on Raspbian
+
|style="background: orange" |Working
|style="background: orange" |can be enabled
+
|style="background: red" |''Unstable Driver''
|style="background: orange" |can be enabled
+
|style="background: green" |Working
 +
|style="background: green" |Working
 +
|-
 +
|Raspberry Pi 2a 2b 2b+
 +
|style="background: green" |Working, well tested
 +
|style="background: orange" |Working
 +
|style="background: red" |''Unstable Driver''
 +
|style="background: green" |Working
 +
|style="background: green" |Working
 
|-
 
|-
 
|Raspberry Pi 1 Zero W
 
|Raspberry Pi 1 Zero W
|style="background: green" |default on Raspbian
+
|style="background: green" |Working, well tested
|style="background: green" |default on Raspbian
+
|style="background: orange" |Working
|style="background: orange" |can be enabled but not recommended, heavy on CPU
+
|style="background: red" |''Unstable Driver''
|style="background: red" |can be enabled but not recommended, low RAM and heavy on CPU
+
|style="background: orange" |Available, not recommended,<br /> heavy on CPU
 +
|style="background: red" |Available, not recommended,<br /> low RAM and heavy on CPU
 +
|-
 +
|RAM usage for running TestGearsES2NEWT
 +
|42Mb
 +
|56Mb + 36Mb (xorg)
 +
|
 +
|82Mb
 +
|82Mb + 43Mb (xorg)
 
|}
 
|}
 +
  
 
{| class="wikitable" cellpadding="10"
 
{| class="wikitable" cellpadding="10"
|aarch64
+
|aarch64 debian
|Mesa DRM/GBM from console
+
| style="text-align:center;" colspan=2 | Mesa DRM/GBM Console
|Mesa X11
+
|-
 +
|
 +
|True KMS w/o BCM (+)
 +
|Fake KMS w/ BCM (*)
 +
|Mesa X11 (*)
 
|-
 
|-
 
|Raspberry Pi 4
 
|Raspberry Pi 4
|style="background: orange" |default on Debian
+
|style="background: red" |''Unstable Driver''
|style="background: green" |default on Debian, well tested
+
|style="background: green" |Working
 +
|style="background: green" |Working, well tested
 
|-
 
|-
 
|Raspberry Pi 3b 3b+
 
|Raspberry Pi 3b 3b+
|style="background: orange" |default on Debian
+
|style="background: red" |''Unstable Driver''
|style="background: green" |default on Debian, well tested
+
|style="background: green" |Working
 +
|style="background: green" |Working, well tested
 +
|}
 +
== JogAmp API compatibility ==
 +
{| class="wikitable" cellpadding="10"
 +
|
 +
| com.jogamp.graph.* (graph: shader based resolution independent curve and text rendering API)
 +
| com.jogamp.newt.opengl.GLWindow (newt)
 +
| com.jogamp.newt.javafx.NewtCanvasJFX (javafx)
 +
| com.jogamp.newt.awt.NewtCanvasAWT (awt/swing)
 +
| com.jogamp.newt.swt.NewtCanvasSWT (swt)
 +
| com.jogamp.opengl.awt.GLCanvas (awt/swing)
 +
| com.jogamp.opengl.swt.GLCanvas (swt)
 +
|-
 +
|armv6hf Broadcom DispmanX from console or X11 Overlay
 +
|style="background: red" |ES2 Driver do not support OES_standard_derivatives dFdx dFdy
 +
|style="background: green" |Working, well tested
 +
|untested
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|-
 +
|RaspberryPi 3 armv6hf/aarch64 Mesa DRM/GBM using fake KMS from console
 +
|style="background: red" |ES2 Driver do not support OES_standard_derivatives dFdx dFdy
 +
|style="background: green" |Working, well tested
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|-
 +
|RaspberryPi 4 armv6hf/aarch64 Mesa DRM/GBM using fake KMS from console
 +
|style="background: green" |Working
 +
|style="background: green" |Working, well tested
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|Incompatible
 +
|-
 +
|armv6hf/aarch64 Mesa X11
 +
|style="background: green" |GL2 driver is Working
 +
|style="background: green" |Working, well tested
 +
|Untested
 +
|style="background: green" |Working
 +
|style="background: green" |Working
 +
|style="background: green" |Working
 +
|style="background: green" |Working
 
|}
 
|}
  
== Raspberry Pi armv6hf Mesa DRM/GBM from console test setup: ==
+
== Raspberry Pi armv6hf setup: ==
 
Minimal system setup:
 
Minimal system setup:
 
# Raspbian Buster Lite
 
# Raspbian Buster Lite
#* https://www.raspberrypi.org/downloads/raspbian/
+
#* 2019-09-26-raspbian-buster-lite.img from https://www.raspberrypi.org/downloads/raspbian/
#* apt install openjdk-11-jre-headless libdrm2 libgbm1 libgles2 libgles1 libegl1 libgl1-mesa-dri libxrandr2 libxcursor1
+
# Updating Raspbian
# Enable Mesa DRM/GBM from console Raspberry Pi 3a 3b 3b+ 2a 2b 2b+ 1 Zero W
+
#* apt update
#* Edit /boot/config.txt . At the end of the file uncomment the dtoverlay=vc4-fkms-v3d line, to look like this:
+
#* apt dist-upgrade
 +
#* apt autoremove
 +
# Installing OpenJDK, OpenGL libraries etc
 +
#* apt install openjdk-11-jre-headless openjdk-11-jdk-headless ant libdrm2 libgbm1 libgles2 libgles1 libegl1 libgl1-mesa-dri libxrandr2 libxcursor1 mesa-utils-extra
 +
 
 +
Then enable ssh, rsync or any other means to transfer the JogAmp cross-build to the target platform.
 +
 
 +
=== Raspberry Pi armv6hf Mesa DRM/GBM from console test setup: ===
 +
Ready
 +
 
 +
DRM/GBM Console tests must be launched from the physical console,
 +
otherwise the software OpenGL driver will be used.
 +
We have to investigate what (environment variable) causes this.
 +
 
 +
=== Raspberry Pi armv6hf Mesa X11 test setup: ===
 +
Additional packages:
 +
# apt install xinit
 +
# startx
 +
 
 +
Ready
 +
 
 +
== Open Raspberry Pi Pullrequest ==
 +
 
 +
== Raspberry Pi troubleshooting ==
 +
=== Enable Mesa DRM/GBM from console or Mesa X11 for: Raspberry Pi 3a 3b 3b+ 2a 2b 2b+ ===
 +
* Edit /boot/config.txt . At the end of the file uncomment the dtoverlay=vc4-fkms-v3d line, to look like this:
 
<pre>
 
<pre>
 
[all]
 
[all]
 
dtoverlay=vc4-fkms-v3d
 
dtoverlay=vc4-fkms-v3d
 
</pre>
 
</pre>
 
+
=== Enable Mesa DRM/GBM from console or Mesa X11 for: Raspberry Pi 1 Zero W ===
== Raspberry Pi troubleshooting ==
+
* Edit /boot/config.txt . At the end of the file add dtoverlay=vc4-kms-v3d,cma-128 line, to look like this:
 +
<pre>
 +
[all]
 +
dtoverlay=vc4-kms-v3d,cma-128
 +
</pre>
 
=== System freeze during bootup ===
 
=== System freeze during bootup ===
 
JogAmp have noticed that some microsd cards can cause the Raspberry Pi system to suddenly stop, especially during bootup, when the Pi is switching the sdcard transfer mode from PIO to DMA. An effective workaround for stability is to instruct the Raspberry Pi system to stay in PIO mode by adding the following lines to /boot/config.txt
 
JogAmp have noticed that some microsd cards can cause the Raspberry Pi system to suddenly stop, especially during bootup, when the Pi is switching the sdcard transfer mode from PIO to DMA. An effective workaround for stability is to instruct the Raspberry Pi system to stay in PIO mode by adding the following lines to /boot/config.txt
Line 71: Line 185:
 
</pre>
 
</pre>
 
=== Raspberry Pi 1 Zero W: Server VM is only supported on ARMv7+ VFP ===
 
=== Raspberry Pi 1 Zero W: Server VM is only supported on ARMv7+ VFP ===
Raspbian OpenJDK 11 only support Raspberry Pi 2 and later CPU's, however you can still use openjdk-8 that support the Pi 1 Zero W CPU:
+
Raspbian OpenJDK 11 only supports Raspberry Pi 2 and later CPUs. However, you can still use openjdk-8 that supports the Pi 1 Zero W CPU:
 
<pre>apt install openjdk-8-jre-headless
 
<pre>apt install openjdk-8-jre-headless
 
/usr/lib/jvm/java-8-openjdk-armhf/bin/java -version
 
/usr/lib/jvm/java-8-openjdk-armhf/bin/java -version

Latest revision as of 13:50, 6 December 2019

Raspberry Pi compatibility

Raspberry Pi contains support for rendering on using eight configurations:

  1. armv6hf Broadcom DispmanX (*)
  2. armv6hf Broadcom DispmanX overlay on top of X11 (+)
  3. armv6hf Mesa DRM/GBM using full KMS (+) Unstable Driver
  4. armv6hf Mesa DRM/GBM using fake KMS (*)
  5. armv6hf Mesa X11 (*)
  6. aarch64 Mesa DRM/GBM using full KMS (+) Unstable Driver
  7. aarch64 Mesa DRM/GBM using fake KMS (*)
  8. aarch64 Mesa X11 (*)

(*) full support by JogAmp WIP

(+) code available by JogAmp w/o full support

NS = Not Supported

WIP = Work in Progress

armv6hf rasbian Broadcom DispmanX Mesa DRM/GBM Console
Console (*) X11 Overlay (+) True KMS w/o BCM (+) Fake KMS w/ BCM (*) Mesa X11 (*)
Raspberry Pi 4 NS by BCM driver NS by BCM driver Unstable Driver Working Working, well tested
Raspberry Pi 3a 3b 3b+ Working, well tested Working Unstable Driver Working Working
Raspberry Pi 2a 2b 2b+ Working, well tested Working Unstable Driver Working Working
Raspberry Pi 1 Zero W Working, well tested Working Unstable Driver Available, not recommended,
heavy on CPU
Available, not recommended,
low RAM and heavy on CPU
RAM usage for running TestGearsES2NEWT 42Mb 56Mb + 36Mb (xorg) 82Mb 82Mb + 43Mb (xorg)


aarch64 debian Mesa DRM/GBM Console
True KMS w/o BCM (+) Fake KMS w/ BCM (*) Mesa X11 (*)
Raspberry Pi 4 Unstable Driver Working Working, well tested
Raspberry Pi 3b 3b+ Unstable Driver Working Working, well tested

JogAmp API compatibility

com.jogamp.graph.* (graph: shader based resolution independent curve and text rendering API) com.jogamp.newt.opengl.GLWindow (newt) com.jogamp.newt.javafx.NewtCanvasJFX (javafx) com.jogamp.newt.awt.NewtCanvasAWT (awt/swing) com.jogamp.newt.swt.NewtCanvasSWT (swt) com.jogamp.opengl.awt.GLCanvas (awt/swing) com.jogamp.opengl.swt.GLCanvas (swt)
armv6hf Broadcom DispmanX from console or X11 Overlay ES2 Driver do not support OES_standard_derivatives dFdx dFdy Working, well tested untested Incompatible Incompatible Incompatible Incompatible
RaspberryPi 3 armv6hf/aarch64 Mesa DRM/GBM using fake KMS from console ES2 Driver do not support OES_standard_derivatives dFdx dFdy Working, well tested Incompatible Incompatible Incompatible Incompatible Incompatible
RaspberryPi 4 armv6hf/aarch64 Mesa DRM/GBM using fake KMS from console Working Working, well tested Incompatible Incompatible Incompatible Incompatible Incompatible
armv6hf/aarch64 Mesa X11 GL2 driver is Working Working, well tested Untested Working Working Working Working

Raspberry Pi armv6hf setup:

Minimal system setup:

  1. Raspbian Buster Lite
  2. Updating Raspbian
    • apt update
    • apt dist-upgrade
    • apt autoremove
  3. Installing OpenJDK, OpenGL libraries etc
    • apt install openjdk-11-jre-headless openjdk-11-jdk-headless ant libdrm2 libgbm1 libgles2 libgles1 libegl1 libgl1-mesa-dri libxrandr2 libxcursor1 mesa-utils-extra

Then enable ssh, rsync or any other means to transfer the JogAmp cross-build to the target platform.

Raspberry Pi armv6hf Mesa DRM/GBM from console test setup:

Ready

DRM/GBM Console tests must be launched from the physical console, otherwise the software OpenGL driver will be used. We have to investigate what (environment variable) causes this.

Raspberry Pi armv6hf Mesa X11 test setup:

Additional packages:

  1. apt install xinit
  2. startx

Ready

Open Raspberry Pi Pullrequest

Raspberry Pi troubleshooting

Enable Mesa DRM/GBM from console or Mesa X11 for: Raspberry Pi 3a 3b 3b+ 2a 2b 2b+

  • Edit /boot/config.txt . At the end of the file uncomment the dtoverlay=vc4-fkms-v3d line, to look like this:
[all]
dtoverlay=vc4-fkms-v3d

Enable Mesa DRM/GBM from console or Mesa X11 for: Raspberry Pi 1 Zero W

  • Edit /boot/config.txt . At the end of the file add dtoverlay=vc4-kms-v3d,cma-128 line, to look like this:
[all]
dtoverlay=vc4-kms-v3d,cma-128

System freeze during bootup

JogAmp have noticed that some microsd cards can cause the Raspberry Pi system to suddenly stop, especially during bootup, when the Pi is switching the sdcard transfer mode from PIO to DMA. An effective workaround for stability is to instruct the Raspberry Pi system to stay in PIO mode by adding the following lines to /boot/config.txt

# Tunes the bcm2835-sdhost SD/MMC driver
dtoverlay=sdtweak,force_pio=1
dtparam=sd_force_pio=on

Raspberry Pi 1 Zero W: Server VM is only supported on ARMv7+ VFP

Raspbian OpenJDK 11 only supports Raspberry Pi 2 and later CPUs. However, you can still use openjdk-8 that supports the Pi 1 Zero W CPU:

apt install openjdk-8-jre-headless
/usr/lib/jvm/java-8-openjdk-armhf/bin/java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01)
OpenJDK Client VM (build 25.212-b01, mixed mode)