win 发表于 2022-2-14 11:04:44

RK3566-buildroot SDK-Graphics问题咨询

你好,现在我们想基于你们ROC-RK3566-PC开发板使用QT+elgfs框架开发图形界面;

在buildroot的make menuconfig的配置:
Target packages-->Rockchip BSP packages-->rockchip libmali-->display platform
Target packages-->Rockchip BSP packages-->rockchip libmali-->OpenGL EGL
Target packages-->Rockchip BSP packages-->rockchip libmali-->OpenGL ES
Target packages-->Rockchip BSP packages-->rockchip libmali-->OpenCL
Target packages-->Rockchip BSP packages-->Minigui use software scale
Target packages-->Compressors and decompressors-->gzip
Target packages-->Graphic libraries and applications-->weston
Target packages-->Graphic libraries and applications-->xkeyboard-config
Target packages-->Graphic libraries and applications-->QT5-->eglfs support
Target packages-->Graphic libraries and applications-->QT5
-->Pixel format of linuxfb drm screen
Target packages-->Graphic libraries and applications-->QT5-->qt5wayland
Target packages-->Libraries-->Graphics-->wayland

现在update开发板的固件运行后发现,在串口连接板子的情况下,开机首次运行qplayer或其他qt应用是可以运行的,但是运行完毕再次运行后就提示什么gbm busy;而在ssh连接板子的情况下,即使第一次开机运行qt应用程序,会直接提示找不到EGL display!

麻烦帮忙看下啊!

padmafeel 发表于 2022-10-23 09:55:43

本帖最后由 padmafeel 于 2022-10-23 17:56 编辑

refer to:
https://www.cnblogs.com/loongson-artc-lyc/p/16149936.html
https://wiki.t-firefly.com/zh_CN/Firefly-Linux-Guide/manual_ubuntu_software.html
http://android1.norco.com.cn:7070/index.php/Buildroot_%E7%B3%BB%E7%BB%9F%E4%BD%BF%E7%94%A8
https://blog.csdn.net/pengjiaqi1028/article/details/111476742

S50launcher must close first then run your app

gedit rockchip_rk3566_defconfig
###start no weston and wayland by stone###
BR2_PACKAGE_DEVICEIO_RELEASE=y
BR2_PACKAGE_MTDEV=y
BR2_PACKAGE_LIBEVDEV=y
BR2_PACKAGE_LIBINPUT=y
BR2_PACKAGE_FONTCONFIG=y
BR2_PACKAGE_FREETYPE=y
#BR2_PACKAGE_QLAUNCHER=y
###end no weston and wayland by stone###

gedit qt_app.config

#BR2_PACKAGE_RKAIQ_TOOL_SERVER=y #put in first line will failed
###start move to rockchip_rk3566_defconfig because not stable here stone###
#BR2_PACKAGE_QSETTING=y #for widgets position load/save, when qpa=eglfs is no need
#BR2_PACKAGE_QLAUNCHER=y
###end move to rockchip_rk3566_defconfig because not stable here stone###
BR2_PACKAGE_RKAIQ_TOOL_SERVER=y

gedit ~//buildroot/package/qt5/qt5base/Config.in
###start add by stone
config BR2_PACKAGE_SUNXI_MALI_MAINLINE
      bool "Compile QT with -eglfs_mali"
      
      config BR2_PACKAGE_GBM_MALI_MAINLINE
      bool "Compile QT with -eglfs_gbm"
###end add by stone      

gedit sdk/buildroot/package/rockchip/minigui/Config.in
config BR2_PACKAGE_MINIGUI_SOFTWARE_SCALE
      bool "Minigui use software scale"
      depends on BR2_PACKAGE_LIBDRM
      select BR2_PACKAGE_PIXMAN
      #default y ###by stone

////////////////////////////////////
qt.config
BR2_PACKAGE_QT5=y
#BR2_PACKAGE_QT5CONNECTIVITY=y            ###no network by stone
#BR2_PACKAGE_QT5MULTIMEDIA=y               ###no play video by stone
#BR2_PACKAGE_QT5QUICKCONTROLS=y      ###no wayland window by stone
#BR2_PACKAGE_QT5WAYLAND=y                     ###no wayland window by stone
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
#BR2_PACKAGE_QT5SVG=y                                 ###no SVG window by stone
#BR2_PACKAGE_QT5VIRTUALKEYBOARD=y   ###no VIRTUALKEYBOARD window by stone

BR2_PACKAGE_QT5BASE_GUI=y
BR2_PACKAGE_QT5BASE_OPENGL=y
BR2_PACKAGE_QT5BASE_OPENGL_ES2=y
BR2_PACKAGE_QT5BASE_LINUXFB=y
BR2_PACKAGE_QT5BASE_LINUXFB_ARGB32=y

BR2_PACKAGE_QT5BASE_EGLFS=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
BR2_PACKAGE_QT5BASE_EXAMPLES=y

BR2_PACKAGE_FONTCONFIG=y
BR2_PACKAGE_FREETYPE=y

BR2_PACKAGE_SUNXI_MALI_MAINLINE=y      ###enable EGLFS_DEVICE_INTEGRATION = eglfs_mali
#BR2_PACKAGE_GBM_MALI_MAINLINE=y    ###enable EGLFS_DEVICE_INTEGRATION = eglfs_gbm

//////////////////////////
gedit weston.config

###start no weston and wayland by stone###
#BR2_PACKAGE_WAYLAND=y
#BR2_PACKAGE_WESTON=y
#BR2_PACKAGE_WESTON_DRM=y
###end no weston and wayland by stone###

///////////////////////////////
gedit qt5base.mk

ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
# use vivante backend
QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_viv
else ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE),y)
# use mali backend
QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_mali
else ifeq ($(BR2_PACKAGE_GBM_MALI_MAINLINE),y) ###by stone
QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_gbm
endif

###start fbdev_window.h for eglfs by stone###
define QT5BASE_CONFIGURE_EGLFS
      wget --continue https://raw.githubusercontent.co ... /EGL/fbdev_window.h
      mkdir -p ./output/rockchip_rk3566/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL
      cp -f ./fbdev_window.h ./output/rockchip_rk3566/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL
endef
###end fbdev_window.h for eglfs by stone###

define QT5BASE_CONFIGURE_CMDS
      $(QT5BASE_CONFIGURE_EGLFS)

/////////////////////////////////////////
gedit brmake
###start compile verbose by stone###
      #( exec 2>&1; unbuffer make "${@}"; ) \
    #> >( while read line; do
    #         printf "%(%Y-%m-%dT%H:%M:%S)T %s\n" -1 "${line}"
    #   done \
    #   |tee -a br.log \
    #   |grep --colour=never -E '>>>'
    #   )
      ( exec 2>&1; unbuffer make "${@}"; )
      ###end compile verbose by stone###

when build compile will see log
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ yes
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... yes
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ no
LinuxFB ................................ yes
VNC .................................... yes








padmafeel 发表于 2022-10-25 12:08:07

本帖最后由 padmafeel 于 2022-10-25 12:10 编辑

here are 3 files can be refered
~/SDK/buildroot/output/rockchip_rk3566/build/qt5base-5.15.2/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp

~/SDK/buildroot/output/rockchip_rk3566/build/qt5base-5.15.2/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp

https://github.com/LongChair/LibreELEC.tv/blob/4622c5fdb30a9639e6f76973af5398308bf5ec74/packages/plex/multimedia/qt5/patches/qt5-017-eglfs_kms-make-framebuffer-transparent.patch
页: [1]
查看完整版本: RK3566-buildroot SDK-Graphics问题咨询