Firefly开源社区

打印 上一主题 下一主题

[Linux] RK3566-buildroot SDK-Graphics问题咨询

7

积分

0

威望

0

贡献

吃瓜的群众

积分
7

RK3566-buildroot SDK-Graphics问题咨询

发表于 2022-2-14 11:04:44      浏览:8271 | 回复:2        打印      只看该作者   [复制链接] 楼主
你好,现在我们想基于你们ROC-RK3566-PC开发板使用QT+elgfs框架开发图形界面;

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

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

麻烦帮忙看下啊!

回复

使用道具 举报

56

积分

0

威望

0

贡献

技术小白

积分
56
发表于 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 ~/[SDK]/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








回复

使用道具 举报

56

积分

0

威望

0

贡献

技术小白

积分
56
发表于 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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表