TOPST D3-G Yocto 환경에서 meta-qt5 빌드 하기

안녕하세요. TOPST 입니다.

D3-G Yocto 환경에서 meta-qt5 레이어를 추가해 빌드하는 방법 입니다.
(단, source poky/meta-topst/topst-build.sh - d3-g-topst-main 선택은 이미 진행한 것으로 가정)

  1. poky 디렉터리 에서 다음과 같이 meta-qt5를 clone 하세요.
git clone -b kirkstone https://github.com/meta-qt5/meta-qt5.git
  1. build/d3-g-topst-main/conf/bblayers.conf 의 BBLAYERS 하단에 다음과 같이 meta-qt5를 추가하세요.
BBLAYERS ?= " \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-poky \
  \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-arm/meta-arm-toolchain \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-openembedded/meta-oe \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-openembedded/meta-python \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-openembedded/meta-multimedia \
  \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-webkit \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-topst-bsp \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-topst \
  /home/kypark/Work/d3g-gitlab-v1.2.0/poky/meta-qt5 \
  1. build/d3-g-topst-main/conf/local.conf 하단에 다음을 추가하세요.

PREFERRED_PROVIDER_virtual/libgles2 = “powervr”
PREFERRED_PROVIDER_virtual/egl = “powervr”
PACKAGECONFIG:append:pn-qtbase = " eglfs"

  1. poky/meta-qt5/recipes-qt/qt5/qtbase_git.bb 파일에서 다음을 수정하세요.

PACKAGECONFIG_GL ?= “${@bb.utils.contains(‘DISTRO_FEATURES’, ‘opengl’, ‘gl’, ‘no-opengl’, d)}”

gl 을 gles2로 변경

PACKAGECONFIG_GL ?= “${@bb.utils.contains(‘DISTRO_FEATURES’, ‘opengl’, ‘gles2’, ‘no-opengl’, d)}”

  1. poky/meta-topst/recipes-telechips/images/telechips-topst-image.bb 에 다음과 같이 qt 패키지들을 추가해 주세요. (필요한 qt 관련 패키지가 더 있다면 추가하세요)
IMAGE_INSTALL += " \
        ${@bb.utils.contains('TOPST_FEATURES', 'multimedia', 'packagegroup-telechips-topst-multimedia', '', d)} \
        packagegroup-telechips-topst-graphics \
        ${@bb.utils.contains("DISTRO_FEATURES", 'x11', '', 'packagegroup-topst-welcome', d)} \
        android-tools \
        sqlite3 \
        tzdata \
        tzdata-posix \
        python3 \
        python3-pip \
        qtbase \
        qtbase-tools \
        qtdeclarative \
        qtquickcontrols \
        qtquickcontrols2 \
        qtwayland \
"
  1. build/d3-g-topst-main 폴더로 이동하고 bitbake telechips-topst-image 명령으로 빌드를 완료 하세요.

  2. 최상위 폴더에서 ./stitch-fai-d3.sh -f 를 실행하고, 생성된 압축파일을 사용해 D3-G fw를 업데이트 하세요.

  3. D3-G 를 부팅하고 uart console을 연결해 필요한 명령어가 수행되는지 확인하세요.

root@d3-g-topst-main:~# qmake --help
Usage: qmake [mode] [options] [files]

QMake has two modes, one mode for generating project files based on
some heuristics, and the other for generating makefiles. Normally you
shouldn't need to specify a mode, as makefile generation is the default
mode for qmake, but you may use this to test qmake on an existing project

Mode:
  -project       Put qmake into project file generation mode
                 In this mode qmake interprets [files] as files to
                 be added to the .pro file. By default, all files with
                 known source extensions are added.
                 Note: The created .pro file probably will
                 need to be edited. For example add the QT variable to
                 specify what modules are required.
  -makefile      Put qmake into makefile generation mode (default)
                 In this mode qmake interprets files as project files to
                 be processed, if skipped qmake will try to find a project
                 file in your current working directory

Warnings Options:
  -Wnone         Turn off all warnings; specific ones may be re-enabled by
                 later -W options
  -Wall          Turn on all warnings
  -Wparser       Turn on parser warnings
  -Wlogic        Turn on logic warnings (on by default)
  -Wdeprecated   Turn on deprecation warnings (on by default)

......