首页 > 解决方案 > 未能添加服务 - 已在使用错误

问题描述

我使用本教程https://github.com/oomek/sfml-pi在 Raspbian 上编译了 SFML 库和我的应用程序。在此之后,我将共享对象和应用程序移至 Raspberry Pi 4 的 buildroot 系统。我选择DISPMANX了版本,我的目标是在没有 X 服务器的情况下运行应用程序。

当我尝试运行应用程序时,出现错误failed to add service - already in use?。我知道有很多类似的主题,我尝试了这个解决方案:

  1. 注释-> 我的配置dtoverlay=vc4-kms-v3dconfig.txt不存在此行。
  2. 更改gpu_mem128-> 任何改进

我的config.txt

# Please note that this is only a sample, we recommend you to change it to fit
# your needs.
# You should override this file using a post-build script.
# See http://buildroot.org/manual.html#rootfs-custom
# and http://elinux.org/RPiconfig for a description of config.txt syntax

# We always use the same names, the real used variant is selected by
# BR2_PACKAGE_RPI_FIRMWARE_{DEFAULT,X,CD} choice
start_file=start.elf
fixup_file=fixup.dat

kernel=zImage

# To use an external initramfs file
#initramfs rootfs.cpio.gz

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
disable_overscan=1

# How much memory in MB to assign to the GPU on Pi models having
# 256, 512 or 1024 MB total memory
gpu_mem_256=128
gpu_mem_512=128
gpu_mem_1024=128
gpu_mem_1024=192
gpu_mem=128

# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
dtoverlay=miniuart-bt

在 buildroot上,我opengl使用、和. 我没有设置。gst1-plugins-basedispmanxgles2eglwaylandmesa-3d

知道如何使我的应用程序正常工作吗?我应该添加一些东西config.txt吗?

标签: opengl-esembedded-linuxsfml

解决方案


推荐阅读