RK3568 编译buildroot X11桌面

    瑞芯微buildroot默认都是编译wayland桌面,需要用X11桌面需要某些版本编译好的ubuntu根文件系统,里面的XORG好像修改过某些地方视频mali驱动,如果apt update升级了xorg会导致黑屏。

   因为测试需要自己编译XORG,所以想到了SDK里面的buildroot,编译x11桌面,首先需要修改buildroot defconfig文件去掉weston.config,添加x11.config,下面是我配置好的defconfig文件:

#include "base/base.config"
#include "chips/rk3566_rk3568_aarch64.config"
#include "font/chinese.config"
#include "fs/exfat.config"
#include "fs/ntfs.config"
#include "fs/vfat.config"
#include "gpu/gpu.config"
#include "multimedia/audio.config"
#include "multimedia/camera.config"
#include "multimedia/mpp.config"
#include "wifibt/bt.config"
#include "wifibt/wireless.config"
#include "benchmark.config"
#include "chromium.config"
#include "debug.config"
#include "npu2.config"
#include "powermanager.config"
#include "test.config"
#include "x11.config"
#include "qt/qt5.config"
#include "qt/qt5webengine.config"
#include "qt/app.config"
BR2_CPAN_MIRROR="http://mirrors.nju.edu.cn/CPAN"
BR2_GNU_MIRROR="http://mirrors.nju.edu.cn/gnu/"
BR2_PACKAGE_BINUTILS=y
BR2_PACKAGE_BINUTILS_TARGET=y
# BR2_PACKAGE_CAMERA_ENGINE is reset to default
BR2_PACKAGE_DHRYSTONE=y
BR2_PACKAGE_FILE=y
BR2_PACKAGE_GLIBC_UTILS=y
BR2_PACKAGE_GZIP=y
BR2_PACKAGE_IPERF=y
BR2_PACKAGE_LIBERATION=y
BR2_PACKAGE_MEMTESTER=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_QT53D=y
BR2_PACKAGE_QT5BASE_TSLIB=y
BR2_PACKAGE_QT5BASE_USE_RGA=y
# BR2_PACKAGE_RKNPU2 is reset to default
# BR2_PACKAGE_ROCKCHIP_MALI_HAS_GBM is not set
# BR2_PACKAGE_ROCKCHIP_TEST is reset to default
BR2_PACKAGE_STRESSAPPTEST=y
BR2_PACKAGE_UNZIP=y
BR2_PACKAGE_VIM=y
# BR2_PACKAGE_WAYLAND is reset to default
BR2_PACKAGE_WGET=y
BR2_PACKAGE_WQY_ZENHEI=y
BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD=y
BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y
BR2_PACKAGE_XDRIVER_XF86_INPUT_TSLIB=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y
BR2_PACKAGE_ZIP=y
BR2_ROOTFS_OVERLAY+="board/rockchip/rk3566_rk3568/fs-overlay/"

修改完defconfig文件后还需要修改modesettings配置文件(这个文件位置package/x11r7/xserver_xorg-server/20-modesetting.conf),下面是我修改后的配置:

Section "Device"
    Identifier  "Rockchip Graphics"
    Driver      "modesetting"

### Use Rockchip RGA 2D HW accel
#    Option      "AccelMethod"    "exa"

### Use GPU HW accel
    Option      "AccelMethod"    "glamor"

    Option      "DRI"            "2"

### Set to "always" to avoid tearing, could lead to up 50% performance loss
    Option      "FlipFB"         "none"

### Limit flip rate and drop frames for "FlipFB" to reduce performance lost
#    Option      "MaxFlipRate"    "25"

    Option      "NoEDID"         "true"
    Option      "UseGammaLUT"    "true"
EndSection

Section	"Screen"
    Identifier    "DSI-1"
    Device        "Rockchip Graphics"
    Monitor       "DSI-1"
EndSection

Section	"Monitor"
    Identifier   "DSI-1"
    Option       "Rotate" "right"
    Option       "DPMS" "true"
#    Modeline    "800x1280_60.00" 85.25  800 856 936 1072  1280 1283 1293 1327 -hsync +vsync
EndSection

Section "ServerFlags"
    Option      "BlankTime" "0"
    Option      "StandbyTime" "0"
    Option      "SuspendTime" "0"
    Option      "OffTime" "0"
EndSection

Section "Module"
    Load    "glamoregl"
EndSection

修改完这些就差不多可以了,后续编译可能有报错,我编译的时候提示缺少头文件xdamage.h, 解决版本是手动编译安装xlib_libxdamage。另外x11.config默认使用openbox窗口管理器编译报错的话直接, 然后重新编译即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值