fixed configure cmd
This commit is contained in:
parent
d15e8991a2
commit
7030372ac7
26
README.md
26
README.md
|
@ -24,6 +24,7 @@ apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-x
|
|||
Default Qt installation path is: "/usr/local/RaspberryQt"
|
||||
|
||||
```
|
||||
mkdir /usr/local/RaspberryQt
|
||||
chown -R pi:pi /usr/local/RaspberryQt
|
||||
ln -s /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0
|
||||
ln -s /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
|
||||
|
@ -40,10 +41,13 @@ Create new SSH-Key for passwordless remote login
|
|||
ssh-keygen -t rsa -C root@192.168.0.40 -P "" -f ~/.ssh/rpi_root_id_rsa
|
||||
cat ~/.ssh/rpi_root_id_rsa.pub | ssh root@192.168.0.40 'cat >> .ssh/authorized_keys && chmod 640 .ssh/authorized_keys'
|
||||
```
|
||||
run script to resolve requirements
|
||||
|
||||
create folders
|
||||
```
|
||||
bash install_host.sh
|
||||
mkdir build
|
||||
mkdir sysroot sysroot/usr sysroot/opt
|
||||
```
|
||||
|
||||
copy sysroot to host
|
||||
```
|
||||
rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@192.168.0.40:/lib sysroot
|
||||
|
@ -51,30 +55,20 @@ rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@192.168.0.40:/usr/includ
|
|||
rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@192.168.0.40:/usr/lib sysroot/usr
|
||||
rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@192.168.0.40:/opt/vc sysroot/opt
|
||||
```
|
||||
Fix symbolic links
|
||||
|
||||
run script to resolve requirements and build Qt
|
||||
```
|
||||
python sysroot-relativelinks.py sysroot
|
||||
```
|
||||
Build Qt
|
||||
|
||||
```
|
||||
cd build
|
||||
../qt_src/configure -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ../sysroot -prefix /usr/local/RaspberryQt -opensource -confirm-license -no-gbm -skip qtscript -nomake tests -nomake examples -make libs -pkg-config -no-use-gold-linker -v
|
||||
|
||||
make -j12
|
||||
make install
|
||||
cd ..
|
||||
bash install_host.sh
|
||||
```
|
||||
copy Qt to Raspberry Pi
|
||||
```
|
||||
rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" sysroot/usr/local/RaspberryQt root@192.168.0.40:/usr/local
|
||||
```
|
||||
Fix fonts
|
||||
Fix fonts (on Raspberry)
|
||||
```
|
||||
mkdir /usr/local/RaspberryQt/lib/fonts
|
||||
cp /usr/share/fonts/truetype/dejavu/* /usr/local/RaspberryQt/lib/fonts
|
||||
```
|
||||
|
||||
## Demo
|
||||
|
||||
open demo/untitled/untitled.pro with Qt Creator on host
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<width>1039</width>
|
||||
<height>614</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -17,8 +17,8 @@
|
|||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>250</y>
|
||||
<x>230</x>
|
||||
<y>270</y>
|
||||
<width>541</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
|
@ -29,14 +29,14 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hello World on a RasperryPi without Xserver!</string>
|
||||
<string>Hello World from a RasperryPi without Xserver! </string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLCDNumber" name="lcdNumber">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>30</y>
|
||||
<x>190</x>
|
||||
<y>70</y>
|
||||
<width>301</width>
|
||||
<height>161</height>
|
||||
</rect>
|
||||
|
@ -48,14 +48,14 @@
|
|||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>140</y>
|
||||
<x>540</x>
|
||||
<y>170</y>
|
||||
<width>141</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Push ME!!</string>
|
||||
<string>Push me!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<width>1039</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
@ -2,17 +2,32 @@
|
|||
|
||||
echo "installing host environment"
|
||||
|
||||
mkdir build
|
||||
mkdir sysroot sysroot/usr sysroot/opt
|
||||
|
||||
git clone https://github.com/raspberrypi/tools
|
||||
wget https://download.qt.io/archive/qt/5.12/5.12.8/single/qt-everywhere-src-5.12.8.tar.xz
|
||||
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
|
||||
|
||||
tar xf qt-everywhere-src-5.12.8.tar.xz
|
||||
rm qt-everywhere-src-5.12.8.tar.xz
|
||||
cp -R qt-everywhere-src-5.12.8/qtbase/mkspecs/linux-arm-gnueabi-g++ qt-everywhere-src-5.10.1/qtbase/mkspecs/linux-arm-gnueabihf-g++
|
||||
sed -i -e 's/arm-linux-gnueabi-/arm-linux-gnueabihf-/g' qt-everywhere-src-5.12.8/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
|
||||
|
||||
mv qt-everywhere-src-5.12.8 qt_src
|
||||
|
||||
cp -R qt_src/qtbase/mkspecs/linux-arm-gnueabi-g++ qt_src/qtbase/mkspecs/linux-arm-gnueabihf-g++
|
||||
|
||||
sed -i -e 's/arm-linux-gnueabi-/arm-linux-gnueabihf-/g' qt_src/qtbase/mkspecs/linux-arm-gnueabihf-g++/qmake.conf
|
||||
|
||||
python sysroot-relativelinks.py sysroot
|
||||
|
||||
TOOLCHAIN_PATH=${PWD}
|
||||
|
||||
cd build
|
||||
|
||||
../qt_src/configure -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=${TOOLCHAIN_PATH}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ${TOOLCHAIN_PATH}/sysroot -prefix /usr/local/RaspberryQt -opensource -confirm-license -no-gbm -skip qtscript -nomake tests -nomake examples -make libs -pkg-config -no-use-gold-linker -v
|
||||
|
||||
|
||||
#../qt_src/configure -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/hendrik/git/Qt_Raspberry_Toolchain/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/hendrik/git/Qt_Raspberry_Toolchain/sysroot -prefix /usr/local/RaspberryQt -opensource -confirm-license -no-gbm -skip qtscript -nomake tests -nomake examples -make libs -pkg-config -no-use-gold-linker -v
|
||||
|
||||
|
||||
make -j12
|
||||
make install
|
||||
cd ..
|
||||
|
||||
|
|
Loading…
Reference in New Issue