Raspbian Buster is out. It seems it updated gcc from version 6.3.0 (used for Stretch) to gcc version 8.3.0. This is not always needed, but I had a lot of problems in the past related to using an outdated crosscompiler, or the one provided in the raspberry repo: https://github.com/raspberrypi/tools. I therefore built my own toolchain for Stretch, which I provided here, both for Linux and Mac OS.
I did the same for Buster: I built my own toolchain and I built many projects with it, like Qt, ffmpeg etc... Just place the toolchain in /opt/rpi (probably position independent) and you should be done. This toolchain should be 100% compatible with gcc provided by Buster.
Download cross toolchain GCC 6.3.0 for Stretch here.
Download Linux x64 cross toolchain GCC 8.3.0 here.
Download Mac OS cross toolchain GCC 8.3.0 here.
Bye ;-)
Showing posts with label raspbian. Show all posts
Showing posts with label raspbian. Show all posts
Monday, September 9, 2019
Friday, November 24, 2017
Raspbian Stretch and Cross Toolchain for Linux and Mac OS
Raspbian Stretch is out for Raspberry Pi. I needed a cross toolchain with the same exact version used to build the system so I built my own. As I had my script ready, I also tried to build one for Mac OS and it seems to work for the moment. I tested these cross toolchains for my projects and seemed to be able to build everything that I tried: Qt libs, apps, omxplayer, ffmpeg etc...
Download Linux x64 cross toolchain GCC 6.3.0 for Stretch here.
Download Mac OS cross toolchain GCC 6.3.0 for Stretch here.
NOTE: The Mac OS version requires some packages to be installed from macports.
NOTE: The toolchain is built to crossbuild for armv7-a. I could also build for armv8 but not sure if it also works for armv6.
Have fun! Bye! ;-)
Download Linux x64 cross toolchain GCC 6.3.0 for Stretch here.
Download Mac OS cross toolchain GCC 6.3.0 for Stretch here.
NOTE: The Mac OS version requires some packages to be installed from macports.
NOTE: The toolchain is built to crossbuild for armv7-a. I could also build for armv8 but not sure if it also works for armv6.
Have fun! Bye! ;-)
Labels:
C/C++,
cross-build,
gcc,
Linux,
Mac OS,
Raspberry Pi,
raspbian
Sunday, March 19, 2017
Experimenting with Pi3 optimisations - POT 5.6.0-beta1 with Qt 5.8.0 built for armv8 with GCC 4.9.4
At the moment I still don't want to test custom firmwares or 64 bit arch builds, but I started to test a couple of new features: a new compiler from Linaro (the one provided by the foundation keeps giving me headaches), version 4.9.4 instead of 4.8, and optimised compiler flags for the Rapsberry Pi 3, which is an armv8.
In this build, Qt, ffmpeg and POT are all built with 4.9.4 Linaro toolchain and optimised compiler flags for Pi3. This will only work on Pi3.
You won't probably see much difference in GPU intensive apps, but it is a step on the road of optimisation!
Have fun! Bye! ;-)
Download the toolchain here.
Download POT 5.6.0-beta1 for Raspbian Jessie Lite Pi3 here (md5: 0eec41ef02e9369fc7e569030b8ff868).
In this build, Qt, ffmpeg and POT are all built with 4.9.4 Linaro toolchain and optimised compiler flags for Pi3. This will only work on Pi3.
You won't probably see much difference in GPU intensive apps, but it is a step on the road of optimisation!
Have fun! Bye! ;-)
Download the toolchain here.
Download POT 5.6.0-beta1 for Raspbian Jessie Lite Pi3 here (md5: 0eec41ef02e9369fc7e569030b8ff868).
Tuesday, December 27, 2016
Binaries for POT 5.5.0-beta1 on Qt 5.8.0-rc1 and Experimental Accelerated QtWebKit
A new version of Qt is out and some interesting changes are being developed. Interesting work was done on WebEngine. This package contains an experimental build of Qt 5.8.0-rc1 with the POT driver to provide hardware acceleration to video decoding and rendering. POT was updated to build on the new plugin architecture of Qt and includes ffmpeg 3.2.2. For info on the content of the package refer to this article. The youtube player still runs on WebKit 1 and so is still hardly useful.
Please report issues on github. Have fun ;-)
Download POT 5.5.0-beta1 for Raspbian Jessie Lite Pi2 (also tested on Pi3) here (md5: 7ca1b961ab8c70176f6aeb13d0bc4f9a).
Please report issues on github. Have fun ;-)
Download POT 5.5.0-beta1 for Raspbian Jessie Lite Pi2 (also tested on Pi3) here (md5: 7ca1b961ab8c70176f6aeb13d0bc4f9a).
Sunday, June 12, 2016
Binaries for POT 5.3.0-beta1 on Qt 5.6.0 and Experimental Accelerated QtWebKit
This is an experimental version of POT that includes a few new features. The driver now includes an experimental version of playback of remote content including proper buffering of the media and the QtWebKit library is able to play videos using proper hardware acceleration.
This new feature allowed me to also implement a new player in QtWebKit using the POT driver to stream content to the regular Qt QWebView. Unfortunately I could only find the time to implement this in the WebKit 1 branch, not in WebKit 2 which requires more work. This makes the implementation hardly useful, but it is a start. If anyone wanted to contribute this is where to start. This video shows the new implementation in action:
Features
The driver can now be used through the regular Qt/QML interface to play content over protocols different from file://. I only tested HTTP but others should be available.This new feature allowed me to also implement a new player in QtWebKit using the POT driver to stream content to the regular Qt QWebView. Unfortunately I could only find the time to implement this in the WebKit 1 branch, not in WebKit 2 which requires more work. This makes the implementation hardly useful, but it is a start. If anyone wanted to contribute this is where to start. This video shows the new implementation in action:
As QtWebKit now uses the GPU properly, I could also implement a YouTube player app using the same QWebView with just a few lines of code of regular Qt code:
In the video you can also see an application I wrote to implement a YouTube fullscreen player using the YouTube iframe API. Such a sample app is also included in the package.
Of course the real target would be to implement this in QtWebEngine. I was never able to find a version of QtWebEngine with video acceleration for Pi. Anyone who knows one?
Package
The package now includes:- build_valgrind.tar: a build of valgrind to analyse your code;
- libpiomxtextures_qmlutils.so: QML plugin to provide a video probe in QML;
- piomxtextures_browser_we: an application that tests the QtWebEngine module (run passing a URL, ./piomxtextures_browser_we http://www.youtube.com);
- piomxtextures_browser_wk: an application that tests the QtWebKit module:
- you can run on WebKit 1 like ./piomxtextures_browser_wk http://www.youtube.com;
- or you can run on WebKit 2 like ./piomxtextures_browser_wk --wk2 http://www.youtube.com;
- piomxtextures_pocplayer: a sample QML player;
- piomxtextures_pocplayer_yt: a youtube sample player (run passing a video ID like ./piomxtextures_pocplayer_yt 71UvXMzVgx4);
- qtdeps.tar: the usual libs needed by Qt and POT;
- Qt-rasp2-5.6.0.tar: a build of Qt 5.6.0 stable including:
- regular Qt 5.6.0 modules;
- untested bluetooth module including BLE support;
- untested MySQL plugin;
- untested QtFtp module;
- untested Qt hat tools module;
- QtWebEngine;
- QtWebKit.
Please report any bug you find on github. Don't use in production. Sources will be available shortly. Have fun! ;-)
Download POT 5.3.0-beta1 for Raspbian Jessie Lite Pi2 (also tested on Pi3) here (md5: edbe0ad2a552a5c8280e3876d16b237d).
Saturday, March 12, 2016
Fully Optimised Raspbian Jessie Lite with Accelerated Qt Multimedia Backend (Pi2)
This is a follow-up to the image provided in this article. The concept is identical, but in this case this firmware is smaller, it is based on Raspbian Jessie Lite and includes updated software. The firmware was 1.9GB while now is 759MB. This is the current setup (but I encourage to update to the latest possible firmware):
pi@raspberrypi:~ $ vcgencmd version
Feb 25 2016 14:25:47
Copyright (c) 2012 Broadcom
version dea971b793dd6cf89133ede5a8362eb77e4f4ade (clean) (release)
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux
Download the image here (torrent) (md5: 06d75d03f63674350be6cb807850bf09).
(Please be patient while downloading and decompressing)
The image includes:
pi@raspberrypi:~ $ vcgencmd version
Feb 25 2016 14:25:47
Copyright (c) 2012 Broadcom
version dea971b793dd6cf89133ede5a8362eb77e4f4ade (clean) (release)
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux
Download the image here (torrent) (md5: 06d75d03f63674350be6cb807850bf09).
(Please be patient while downloading and decompressing)
The image includes:
- Qt 5.6.0-rc1: built for armv7 with neon optimisations, including support for touch screens, gstreamer, libinput, tslib, and Bluetooth/Bluetooth BLE using bluez (complete configuration below).
- QtWebKit 5.6.0: includes WebKit 1 and WebKit 2.
- QtWebEngine 5.6.0-rc1: multimedia only based on ffmpeg.
- Dependant libs: evdev, icu (not the one provided by raspbian), mtdev, libts.
- Samples: samples from the repo to test POT.
- POT: POT version 5.2.1 including ffmpeg 2.8.6.
Samples
To have a quick look at multimedia in Qt/QML test with this commands:
- /usr/local/Qt-rasp2-5.6.0-rc1/bin/qmlscene "some_video_file" samples/video_simple.qml
- /usr/local/Qt-rasp2-5.6.0-rc1/bin/qmlscene "some_url" samples/webkit_simple.qml
- /usr/local/Qt-rasp2-5.6.0-rc1/bin/qmlscene "some_url" samples/webengine_simple.qml
- /home/pi/piomxtextures_pocplayer --multipleanimtest "720p_video_1" "720p_video_2"
Please let me know if you find something wrong and file a bugreport on https://github.com/carlonluca/pi.
Have fun! ;-)
Sunday, December 13, 2015
Playing YouTube Videos on Raspberry Pi 2 Using POT and QtWebKit
This is the first attempt at playing YouTube videos using POT and QtWebKit on Raspberry Pi 2 (Raspbian Jessie). I tried two ways: one is from the YouTube website and one is using the iframe YouTube API. What you'll see in the video is done using the old WebKit 1 in QtWebKit with the OpenGL paint engine. This is good if you need to place a YouTube video in your application. Unfortunately this is still very experimental and cannot be placed in QML applications. Much more work is needed for that.
Unfortunately what you'll see in the demo is just HD quality (720p). YouTube doesn't seem to be willing to let my Pi have the 1080p version for some reason.
Have fun! ;-)
Unfortunately what you'll see in the demo is just HD quality (720p). YouTube doesn't seem to be willing to let my Pi have the 1080p version for some reason.
Have fun! ;-)
Monday, November 16, 2015
Bluetooth (BLE) Support with Qt on Raspberry Pi
There are many ways to access Bluetooth capabilities on Raspberry Pi. Qt has its own API to use Bluetooth and to implement a BLE central device. The last build I provided a few days ago didn't support Bluetooth: this package should support it. I tested the low energy scanner example and it worked properly.
Have fun! Bye ;-)
Download POT 5.1.0 with Qt 5.5.1 for Pi2 Raspbian Jessie here (extraction code: 96aa).
Have fun! Bye ;-)
Download POT 5.1.0 with Qt 5.5.1 for Pi2 Raspbian Jessie here (extraction code: 96aa).
Fully Optimised Raspbian Jessie with Accelerated Qt Multimedia Backend (Pi2)
This is an image of Raspbian Jessie ready to test (and use) the Qt Multimedia Backend POT. This image is optimised for maximum performance (see the demos below). This is the current setup:
pi@raspberrypi ~ $ sudo /opt/vc/bin/vcgencmd version
Nov 11 2015 21:31:07
Copyright (c) 2012 Broadcom
version 54011a8ad59a9ae1c40bd07cddd9bcf90e779b66 (clean) (release)
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux
pi@raspberrypi ~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
Download image here.
The image includes:
pi@raspberrypi ~ $ sudo /opt/vc/bin/vcgencmd version
Nov 11 2015 21:31:07
Copyright (c) 2012 Broadcom
version 54011a8ad59a9ae1c40bd07cddd9bcf90e779b66 (clean) (release)
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux
pi@raspberrypi ~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
Download image here.
The image includes:
- Qt 5.5.1 built for armv7 with neon optimisations, including support for touch screens, gstreamer, libinput, X11 (no multimedia), tslib, and Bluetooth/Bluetooth BLE using bluez (complete configuration below). Modules provided include QtWebKit (no multimedia support).
- Dependant libs: evdev, icu (not the one provided by raspbian), mtdev, libts.
- POCPlayer and QML samples to show the performance of the backend and test bugs.
- POT library including ffmpeg 2.7.2.
Everything is built for armv7 including neon optimisations. To quickly test the performance there are a few things you can launch:
/home/pi/piomxtextures_pocplayer --multipleanimtest /home/pi/sintel_trailer_720p.mp4 /home/pi/big_buck_bunny_720p_h264.mov
This is the result you should expect with a proper overclocking:
It will show you a continuous animation while running two 720p videos concurrently. To improve the frame rate of the animations you can also overclock your Pi2 (see below).
Other samples to test the features of the plugin are stored in /home/pi/samples:
/usr/local/Qt-rasp2-5.5.1/bin/qmlscene /home/pi/samples/video_simple.qml file:///home/pi/big_buck_bunny_1080p_h264.mov
/usr/local/Qt-rasp2-5.5.1/bin/qmlscene /home/pi/samples/video_simple.qml file:///home/pi/big_buck_bunny_1080p_h264.mov
Another interesting test is running qmlvideofx example included in the Qt sources. This will show you the perfomance of the effects applied on the video using shaders. You can find an executable in /usr/local/Qt-rasp2-5.5.1/examples/multimedia/video/qmlvideofx/qmlvideofx. This shows approximately what you should expect (the video shows the result on Pi1, Pi2 is just a little better):
Overclocking
The Pi can be overclocked by tuning parameters in /boot/config.txt. I provided a configuration that I find useful:
#force_turbo=1 # Voids Warranty!
#boot_delay=1 # Helps to avoid sdcard corruption when force_turbo is enabled.
#arm_freq=1100
#sdram_freq=450
#core_freq=550
#over_voltage=4
#temp_limit=80 # Will throttle to default clock speed if hit.
In the image this is all disabled. If you intent to enable please keep in mind I don't take responsibility for any consequence. Please refer to the documentation for this procedure.
Have fun! Bye ;-)
Have fun! Bye ;-)
Qt Configuration
Configure summary
Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for: devices/linux-rasp-pi2-g++ (arm, CPU features: neon)
Platform notes:
- Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
qmake vars .......... styles += mac fusion windows QT_CFLAGS_GLIB = -pthread -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include QT_LIBS_GLIB = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lgthread-2.0 -pthread -lglib-2.0 QT_CFLAGS_PULSEAUDIO = -D_REENTRANT -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include QT_LIBS_PULSEAUDIO = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lpulse-mainloop-glib -lpulse -lglib-2.0 QMAKE_CFLAGS_FONTCONFIG = -I/opt/rpi/sysroot/usr/include/freetype2 QMAKE_LIBS_FONTCONFIG = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lfontconfig -lfreetype QMAKE_INCDIR_LIBUDEV = QMAKE_LIBS_LIBUDEV = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -ludev QMAKE_LIBINPUT_VERSION_MAJOR = 1 QMAKE_LIBINPUT_VERSION_MINOR = 0 QMAKE_INCDIR_LIBINPUT = /opt/rpi/sysroot/home/pi/qtdeps/include QMAKE_LIBS_LIBINPUT = -L/opt/rpi/sysroot/home/pi/qtdeps/lib -linput QMAKE_LIBXI_VERSION_MAJOR = 1 QMAKE_LIBXI_VERSION_MINOR = 7 QMAKE_LIBXI_VERSION_PATCH = 4 QMAKE_X11_PREFIX = /usr QMAKE_XKB_CONFIG_ROOT = /usr/share/X11/xkb QMAKE_CFLAGS_XCB = QMAKE_LIBS_XCB = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lxcb-sync -lxcb-xfixes -lxcb-render -lxcb-randr -lxcb-image -lxcb-shm -lxcb-keysyms -lxcb-icccm -lxcb-shape -lxcb INCLUDEPATH += "/opt/rpi/sysroot/home/pi/qtdeps/include" LIBS += -L"/opt/rpi/sysroot/home/pi/qtdeps/lib" sql-drivers = sql-plugins = sqlite qmake switches .........
Build options:
Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile cups dbus egl eglfs eglfs_brcm enable_new_dtags evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib gstreamer-1.0 harfbuzz iconv icu inotify ipv6ifname large-config largefile libinput libproxy libudev linuxfb medium-config minimal-config mremap mtdev neon nis opengl opengles2 openssl pcre png posix_fallocate pulseaudio qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib tslib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-xlib xinput2 xkbcommon-qt xlib xrender
Build parts ............ libs examples
Mode ................... release
Using sanitizer(s)...... none
Using C++11 ............ yes
Using gold linker....... yes
Using new DTAGS ........ yes
Using PCH .............. no
Target compiler supports:
Neon ................. yes
Qt modules and options:
Qt D-Bus ............... yes (loading dbus-1 at runtime)
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... yes
Use system proxies ..... no
Support enabled for:
Accessibility .......... yes
ALSA ................... yes
CUPS ................... yes
Evdev .................. yes
FontConfig ............. yes
FreeType ............... yes (system library)
Glib ................... yes
GStreamer .............. yes (1.0)
GTK theme .............. no
HarfBuzz ............... yes (bundled copy)
Iconv .................. yes
ICU .................... yes
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using system library)
PNG .................. yes (in QtGui, using system library)
journald ............... no
libinput................ yes
mtdev .................. yes (system library)
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. yes
OpenSSL .............. yes (loading libraries at run-time)
NIS .................... yes
OpenGL / OpenVG:
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. yes
QPA backends:
DirectFB ............. no
EGLFS ................ yes
EGLFS i.MX6....... . no
EGLFS KMS .......... no
EGLFS Mali ......... no
EGLFS Raspberry Pi . yes
EGLFS X11 .......... no
LinuxFB .............. yes
XCB .................. yes (system library)
EGL on X ........... no
GLX ................ yes
MIT-SHM ............ yes
Xcb-Xlib ........... yes
Xcursor ............ yes (loaded at runtime)
Xfixes ............. yes (loaded at runtime)
Xi ................. no
Xi2 ................ yes
Xinerama ........... yes (loaded at runtime)
Xrandr ............. yes (loaded at runtime)
Xrender ............ yes
XKB ................ yes
XShape ............. yes
XSync .............. yes
XVideo ............. yes
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... yes (plugin, using bundled copy)
TDS .................. no
tslib .................. yes
udev ................... yes
xkbcommon-x11........... yes (bundled copy, XKB config root: /usr/share/X11/xkb)
xkbcommon-evdev......... no
zlib ................... yes (system library)
Labels:
Multimedia,
OpenGL,
OpenMAX,
PiOmxTextures,
QML,
Qt,
Raspberry Pi,
raspbian
Subscribe to:
Posts (Atom)