QwapelRadio / Summer Party Edition

 QwapelRadio  Kommentare deaktiviert für QwapelRadio / Summer Party Edition
Jul 142019
 

QwapelRadio als Summer Party Edition

  • Original 7″ Raspberry Touchdisplay
  • HifiBerry AMP2 (2x30W)
  • Visation FRS8 8 Ohm Lautsprecher
  • Bluetooth oder Webradio
  • 12-24V Netzteil oder Akku

Einkaufsliste:

Dateien für den 3D Druck:

Qwapelradio_Summer-Edition_stl

Cross-Compile QT 5.12.5 / Raspberry Pi 4

 QT  Kommentare deaktiviert für Cross-Compile QT 5.12.5 / Raspberry Pi 4
Jul 112019
 

Running Raspbian Buster on Raspberry Pi 4:

[on RPi] Install a bunch of development files (for simplicity we use build-dep, not everything is really needed, but it is easier this way).

Edit sources list in /etc/apt/sources.list and uncomment the deb-src line:

sudo nano /etc/apt/sources.list

Update your system and install required libraries:

sudo apt-get update
sudo apt-get build-dep qt4-x11
sudo apt-get build-dep qtbase-opensource-src
sudo apt-get install libegl1-mesa libegl1-mesa-dev libgles2-mesa libgles2-mesa-dev

Optional depending on your project:

sudo apt-get install wiringpi libnfc-bin libnfc-dev fonts-texgyre libts-dev

Optional depending if you want to use QtMultimedia:

sudo apt-get install libbluetooth-dev bluez-tools gstreamer1.0-plugins* libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libopenal-data libsndio7.0 libopenal1 libopenal-dev pulseaudio

 

[on RPi] Add pi user to render group

sudo gpasswd -a pi render

 

[on RPi] Prepare our target directory

sudo mkdir /usr/local/qt5pi
sudo chown pi:pi /usr/local/qt5pi

 

[on host] Create our working directory and get a toolchain:

mkdir ~/raspi
cd ~/raspi
git clone https://github.com/raspberrypi/tools

 

[on host] Create a sysroot. Using rsync we can properly keep things synchronized in the future as well.

mkdir sysroot sysroot/usr
rsync -avz pi@yourpi:/lib sysroot
rsync -avz pi@yourpi:/usr/include sysroot/usr
rsync -avz pi@yourpi:/usr/lib sysroot/usr

 

[on host] Adjust symlinks to be relative. Use provided script, because the old fixQualifiedLibraryPaths is not working properly:

wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
chmod +x sysroot-relativelinks.py
./sysroot-relativelinks.py sysroot

 

[on host] Get QT (start with qtbase first)

git clone git://code.qt.io/qt/qtbase.git -b 5.12.5
cd qtbase

[on host] Compile, make, make install

./configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v
make -j4
make install

If you failed build –>

git clean -dfx

 

[on host] Deploy Qt to the device. We simply sync everything from ~/raspi/qt5pi to the prefix we configured above.

rsync -avz qt5pi pi@yourpi:/usr/local

 

[on RPi] Update the device to let the linker find the Qt libs:

echo /usr/local/qt5pi/lib | sudo tee /etc/ld.so.conf.d/qt5pi.conf
sudo ldconfig

 

[on host] Build other Qt modules as desired, the steps are always the same:

git clone git://code.qt.io/qt/<qt-module>.git -b <qt-version>
cd <qt-module>

~/raspi/qt5/bin/qmake

make 
make install

My Modules:

  • qtbase
  • qtxmlpatterns
  • qtsvg
  • qtdeclarative
  • qtimageformats
  • qtgraphicaleffects
  • qtquickcontrols
  • qtquickcontrols2
  • qtvirtualkeyboard
  • qtwebsockets
  • qtwebglplugin
  • qtcharts
  • qtconnectivity
  • qtmultimedia
  • qtlocation

Then deploy new files by running:

rsync -avz qt5pi pi@yourpi:/usr/local

 

Set physical Display size in mm:

sudo nano ~/.profile
# physical display properties
export QT_QPA_EGLFS_PHYSICAL_WIDTH=211
export QT_QPA_EGLFS_PHYSICAL_HEIGHT=127
source .profile

Cross-Compile QT 5.12.3 / Raspberry Pi 3

 QT  Kommentare deaktiviert für Cross-Compile QT 5.12.3 / Raspberry Pi 3
Mrz 172019
 

Running Raspbian Stretch on Raspberry Pi 3A/B+

[on RPi] Install a bunch of development files (for simplicity we use build-dep, not everything is really needed, but it is easier this way).

Edit sources list in /etc/apt/sources.list and uncomment the deb-src line:

sudo nano /etc/apt/sources.list

Update your system and install required libraries:

sudo apt-get update
sudo apt-get build-dep qt4-x11
sudo apt-get build-dep libqt5gui5
sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0

Optional depending on your project:

sudo apt-get install wiringpi libnfc-bin libnfc-dev fonts-texgyre

Optional depending if you want to use QtMultimedia:

sudo apt-get install gstreamer1.0-plugins* libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libopenal-data libsndio6.1 libopenal1 libopenal-dev pulseaudio

 

[on RPi] Prepare our target directory

sudo mkdir /usr/local/qt5pi
sudo chown pi:pi /usr/local/qt5pi

 

[onRPi] Correct links to EGL and GLES Drivers

sudo rm /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0
sudo rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
sudo ln -s /opt/vc/lib/libbrcmEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0
sudo ln -s /opt/vc/lib/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0

 

[on host] Create our working directory and get a toolchain:

mkdir ~/raspi
cd ~/raspi
git clone https://github.com/raspberrypi/tools

 

[on host] Create a sysroot. Using rsync we can properly keep things synchronized in the future as well.

mkdir sysroot sysroot/usr sysroot/opt
rsync -avz pi@yourpi:/lib sysroot
rsync -avz pi@yourpi:/usr/include sysroot/usr
rsync -avz pi@yourpi:/usr/lib sysroot/usr
rsync -avz pi@yourpi:/opt/vc sysroot/opt

 

[on host] Adjust symlinks to be relative. Use provided script, because the old fixQualifiedLibraryPaths is not working properly:

wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
chmod +x sysroot-relativelinks.py
./sysroot-relativelinks.py sysroot

 

[on host] Get QT (start with qtbase first)

git clone git://code.qt.io/qt/qtbase.git -b 5.12.3
cd qtbase

 

[on host] Modify the qmake.conf  –> mkspecs/devices/linux-rasp-pi3-g++/qmake.conf

nano ~/raspi/qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf
VC_LIBRARY_PATH = $$[QT_SYSROOT]/opt/vc/lib
VC_INCLUDE_PATH = $$[QT_SYSROOT]/opt/vc/include

VC_LINK_LINE = -L$${VC_LIBRARY_PATH}

QMAKE_LIBDIR_OPENGL_ES2 = $${VC_LIBRARY_PATH}
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_LIBDIR_OPENVG = $$QMAKE_LIBDIR_OPENGL_ES2

 

[on host] Compile, make, make install

./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm
make -j4
make install

If you failed build –>

git clean -dfx

 

[on host] Deploy Qt to the device. We simply sync everything from ~/raspi/qt5pi to the prefix we configured above.

rsync -avz qt5pi pi@yourpi:/usr/local

 

[on RPi] Update the device to let the linker find the Qt libs:

echo /usr/local/qt5pi/lib | sudo tee /etc/ld.so.conf.d/qt5pi.conf
sudo ldconfig

 

[on host] Build other Qt modules as desired, the steps are always the same:

git clone git://code.qt.io/qt/<qt-module>.git -b <qt-version>
cd <qt-module>

~/raspi/qt5/bin/qmake

make 
make install

My Modules:

  • qtbase
  • qtxmlpatterns
  • qtsvg
  • qtdeclarative
  • qtimageformats
  • qtgraphicaleffects
  • qtquickcontrols
  • qtquickcontrols2
  • qtvirtualkeyboard
  • qtwebsockets
  • qtwebglplugin
  • qtcharts
  • qtconnectivity
  • qtmultimedia
  • qtlocation

Then deploy new files by running:

rsync -avz qt5pi pi@yourpi:/usr/local

 

Set physical Display size in mm:

sudo nano ~/.profile
# physical display properties
export QT_QPA_EGLFS_PHYSICAL_WIDTH=211
export QT_QPA_EGLFS_PHYSICAL_HEIGHT=127
source .profile

QwapelRadio

 QwapelRadio  Kommentare deaktiviert für QwapelRadio
Jan 272019
 

Maker Projekt: Raspberry PI – Web-Radio-Wecker

Funktionen:

  • Genaue Uhrzeit über das Internet mit automatischer Sommer- / Winterzeit
  • Sekundenanzeige abschaltbar
  • Datum mit Wochentag
  • 5″ Touch-Display
  • Bildschirmschoner Ein/Aus (wenn das helle Backlight stört)
  • Auswahl zwischen verschiedenen Anzeige Designs
  • Zwei programmierbare Weckalarme mit Uhrzeit und Wochentagen
  • Snooze-Taste mit einstellbarer Snooze-Zeit+5, 10,15 oder 20 Minuten
  • Auto Alarm Off nach 59 Minuten
  • Webradio mit diversen Radiosendern über Streaming
  • Musik mit Bluetooth Verbindung vom Smartphone abspielen
  • 2x 3W Lautsprecher im Gehäuse
  • Wetter für mehrere Orte – Aktuelles Wetter und Vorhersage für weitere 4 Tage mit OpenweatherMap
  • Persönliche Einstellungen und programmierte Alarme auch nach Stromausfall wieder aktiv
  • Schnellabschaltung des Radios oder des Alarms durch 2 Sekunden gedrückt halten des Touch-Display
  • Gehäuse aus dem 3D Drucker
  • Software Qt5 qml/c++ auf Raspbian Stretch

Einkaufsliste:

Dateien für den 3D Druck:

QwapelRadio_stl.zip

 

Designs:

Cross-Compile QT 5.11.3 / Raspberry Pi 3

 QT  Kommentare deaktiviert für Cross-Compile QT 5.11.3 / Raspberry Pi 3
Dez 232018
 

Running Raspbian Stretch on Raspberry Pi 3A/B+

[on RPi] Install a bunch of development files (for simplicity we use build-dep, not everything is really needed, but it is easier this way).

Edit sources list in /etc/apt/sources.list and uncomment the deb-src line:

sudo nano /etc/apt/sources.list

Update your system and install required libraries:

sudo apt-get update
sudo apt-get build-dep qt4-x11
sudo apt-get build-dep libqt5gui5
sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0

Optional depending on your project:

sudo apt-get install wiringpi libnfc-bin libnfc-dev fonts-texgyre

Optional depending if you want to use QtMultimedia:

sudo apt-get install gstreamer1.0-omx libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libopenal-data libsndio6.1 libopenal1 libopenal-dev

 

[on RPi] Prepare our target directory

sudo mkdir /usr/local/qt5pi
sudo chown pi:pi /usr/local/qt5pi

 

[on host] Create our working directory and get a toolchain:

mkdir ~/raspi
cd ~/raspi
git clone https://github.com/raspberrypi/tools

 

[on host] Create a sysroot. Using rsync we can properly keep things synchronized in the future as well.

mkdir sysroot sysroot/usr sysroot/opt
rsync -avz pi@yourpi:/lib sysroot
rsync -avz pi@yourpi:/usr/include sysroot/usr
rsync -avz pi@yourpi:/usr/lib sysroot/usr
rsync -avz pi@yourpi:/opt/vc sysroot/opt

 

[on host] Adjust symlinks to be relative. Use provided script, because the old fixQualifiedLibraryPaths is not working properly:

wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
chmod +x sysroot-relativelinks.py
./sysroot-relativelinks.py sysroot

 

[on host] Get QT (start with qtbase first)

git clone git://code.qt.io/qt/qtbase.git -b 5.11.3
cd qtbase

 

[on host] Compile, make, make install

./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker -no-kms
make -j4
make install

If you failed build –>

git clean -dfx

 

[on host] Deploy Qt to the device. We simply sync everything from ~/raspi/qt5pi to the prefix we configured above.

rsync -avz qt5pi pi@yourpi:/usr/local

 

[on RPi] Update the device to let the linker find the Qt libs:

echo /usr/local/qt5pi/lib | sudo tee /etc/ld.so.conf.d/qt5pi.conf
sudo ldconfig

 

[on host] Build other Qt modules as desired, the steps are always the same:

git clone git://code.qt.io/qt/<qt-module>.git -b <qt-version>
cd <qt-module>

~/raspi/qt5/bin/qmake (for QtMultimedia --> ~/raspi/qt5/bin/qmake -r GST_VERSION=1.0)

make 
make install

My Modules:

  • qtbase
  • qtxmlpatterns
  • qtsvg
  • qtdeclarative
  • qtimageformats
  • qtgraphicaleffects
  • qtquickcontrols
  • qtquickcontrols2
  • qtvirtualkeyboard
  • qtwebsockets
  • qtwebglplugin
  • qtcharts
  • qtconnectivity
  • qtmultimedia

Then deploy new files by running:

rsync -avz qt5pi pi@yourpi:/usr/local