简体   繁体   English

在 CM4 上配置 Yocto 图像以与官方 Raspberry Pi 显示器配合使用

[英]Configure Yocto image on CM4 to work with Official Raspberry Pi Display

I've got a Raspberry Pi CM4 (with eMMC) running an image built using Yocto.我有一个 Raspberry Pi CM4(带有 eMMC)运行一个使用 Yocto 构建的图像。 The CM4 is running on the official CMIO board. CM4 在官方 CMIO 板上运行。 I want to use the official Raspberry Pi 7" Display on this, using the DSI interface, but I have trouble getting it working. The display does not turn on at all. I need help configuring my image, or my yocto build correctly to allow me to use this display.我想在上面使用官方的 Raspberry Pi 7" 显示器,使用 DSI 接口,但我无法让它工作。显示器根本打不开。我需要帮助配置我的图像,或者我的 yocto 正确构建以允许我要使用这个显示器。

What worked:什么有效:

  1. It works as expected on a Raspberry Pi 4 Mode B. I can flash my Yocto-based image to an SD card and the device boots as expected with the display working它在 Raspberry Pi 4 模式 B 上按预期工作。我可以将基于 Yocto 的图像 flash 写入 SD 卡,设备按预期启动,显示器正常工作

  2. It works on the CM4 using the official Raspberry Pi OS image, but only after I do one of the following:它使用官方 Raspberry Pi 操作系统映像在 CM4 上运行,但仅在我执行以下操作之一之后:

    a.一种。 Add the dt-blob.bin file as described in the Compute Model Documentation按照计算 Model 文档中的说明添加 dt-blob.bin 文件

    b. b. I add the following line to the config.txt file in the boot folder: dtoverlay=vc4-fkms-v3d我将以下行添加到引导文件夹中的 config.txt 文件: dtoverlay=vc4-fkms-v3d

Issue:问题:

When I flash my Yocto-based image to the Raspberry Pi, the screen does not work.当我 flash 我的基于 Yocto 的图像到 Raspberry Pi 时,屏幕不工作。 The device boots up, and I can get an output through HDMI, but not through the DSI interface.设备启动,我可以通过 HDMI 获得 output,但不能通过 DSI 接口。

What I have tried我试过的

  1. I've downloaded the dt-blob.bin file to both the /uboot/ and /boot/ folders on my device and rebooted, but it had no effect我已经将 dt-blob.bin 文件下载到我设备上的 /uboot/ 和 /boot/ 文件夹并重新启动,但它没有任何效果
  2. I added the vc4-kms-dsi-7inch dtbo to the /uboot/overlays folder and added dtoverlay=vc4-fkms-v3d to config.txt in /uboot/ and it still didn't have any effect.我将 vc4-kms-dsi-7inch dtbo 添加到 /uboot/overlays 文件夹中,并将dtoverlay=vc4-fkms-v3d到 /uboot/ 中的 config.txt 中,但仍然没有任何效果。

It feels like this is a device-tree related issue.感觉这是一个与设备树相关的问题。 And I imagine there is some difference in pin usage between the Raspberry Pi 4B and the CM4, which makes my image not work on the CM4.而且我认为 Raspberry Pi 4B 和 CM4 之间的引脚使用存在一些差异,这使得我的图像无法在 CM4 上运行。

One thing I did note, the image I'm using has dtoverlay=vc4-fkms-v3d in config.txt while the official image has dtoverlay=vc4-kms-v3d .我注意到一件事,我使用的图像在 config.txt 中有dtoverlay=vc4-fkms-v3d而官方图像有dtoverlay=vc4-kms-v3d I don't know if that makes a difference, but changing it on my image to fkms and rebooting didn't have any effect.我不知道这是否有所作为,但是将我的图像上的它更改为 fkms 并重新启动没有任何效果。

This is an extract from the local.conf file for my yocto build:这是我的 yocto 构建的 local.conf 文件的摘录:

MACHINE ?= "raspberrypi4"

ENABLE_DWC2_HOST = "1"
RPI_USE_U_BOOT = "1"
MENDER_BOOT_PART_SIZE_MB = "40"
IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES_remove += " rpi-sdimg"

MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = [censored]

This build uses the meta-raspberrypi and meta-rpi64 layers.此构建使用 meta-raspberrypi 和 meta-rpi64 层。

Any help to understand the problem and get this display working would be appreciated.任何有助于理解问题并使此显示正常工作的帮助将不胜感激。

Thanks!谢谢!

I managed to solve this issue in the end.我最终设法解决了这个问题。 The local.conf file had another conflicting MACHINE?= "raspberrypi3-cm" command. local.conf 文件有另一个冲突的MACHINE?= "raspberrypi3-cm"命令。 I removed this and created the image again.我删除了它并再次创建了图像。 Then, while still connected to the PC as a storage device, I added the dt-blob.bin file to the /boot/ drive.然后,在仍作为存储设备连接到 PC 的同时,我将dt-blob.bin 文件添加到 /boot/ 驱动器。

I then booted up the CM4, and the display worked.然后我启动了 CM4,显示开始工作了。

Next step would be to figure out how to implement that device tree overlay into the yocto build, but that's out of the scope of this question.下一步是弄清楚如何将该设备树覆盖实现到 yocto 构建中,但这超出了这个问题的 scope。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM