티스토리 뷰

반응형

참고 사이트 : https://wiki.qt.io/RaspberryPi2EGLFS 

 

RaspberryPi2EGLFS - Qt Wiki

A modern guide for cross-compiling Qt for HW accelerated OpenGL with eglfs on Raspbian and setting up Qt Creator Initial notes This is not intended for running desktop-style, windowed Qt apps under X11, but rather for the real embedded/device creation use

wiki.qt.io

(1) 개발환경 운영체제 - Ubuntu 16.04 LTS 64bit 

다운받아서 VirtualBox로 설치하고 게스트 확장 CD를 설치하고 재부팅 후 메뉴의 장치 - 클립보드를 양방향으로 변경하여 글자들이 복사하여 붙혀넣기가 되게 한다.

 

(2) Qt 5.12.3으로 오프라인 설치파일 .run 다운로드 받아서 더블 클릭하여 설치 

(3) Qt Creator 한글 입력
- 입력 창 한글
# cd (/home/user/Qt)/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts
# ln -s /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
- 실행파일 한글
# cd (/home/user/Qt)/(5.12.3)/gcc_64/plugins/platforminputcontexts
# ln -s /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

(4) 크로스 컴파일 툴 다운로드
# mkdir ~/raspi
# cd ~/raspi
# sudo apt-get install git <-- git 설치   
# git clone https://github.com/raspberrypi/tools

(5) sysroot로 타켓보드의 관련 파일 가져오기  
# mkdir sysroot sysroot/usr sysroot/opt
# rsync -avz pi@192.168.1.62:/lib sysroot <-- 타겟보드에 따라 IP주소 변경 
# rsync -avz pi@192.168.1.62:/usr/include sysroot/usr
# rsync -avz pi@192.168.1.62:/usr/lib sysroot/usr
# rsync -avz pi@192.168.1.62:/opt/vc sysroot/opt

(6) 심볼릭 링크 수정
# wget https://raw.githubusercontent.com/Kukkimonsuta/rpi-buildqt/master/scripts/utils/sysroot-relativelinks.py
# chmod +x sysroot-relativelinks.py
# ./sysroot-relativelinks.py sysroot

(7) ccache 설치
# sudo apt-get install ccache 

(8) Qt configure 세팅 및 컴파일 
# cd /home/chip/Qt5.12.3/5.12.3/Src/qtbase
# ./configure -release -no-opengl -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE="ccache /home/chip/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-" -sysroot /home/chip/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/chip/raspi/qt5pi -hostprefix /home/chip/raspi/qt5 -nomake examples -nomake tests -qt-libpng -qt-libjpeg -qt-zlib -qt-xcb
# make
# make install 

 

(9) 생성된 파일 타켓보드로 넘기기 
# ~/raspi/qt5pi
# cd ..
# rsync -avz qt5pi pi@192.168.1.62:/usr/local

 

반응형
댓글
반응형
최근에 올라온 글
Total
Today
Yesterday