原文:
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1920
framebuffer_height=1080
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=31
hdmi_ignore_edit=0xa5000080
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on,i2c_arm_baudrate=400000
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio :loads snd_bcm2835)
dtparam=audio=on
# Automatically load overlays for detected cameras
start_x=1
# Automatically load overlays for detected DSI displays
display_auto_detect=1
# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
max_framebuffers=2
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
[pi4]
dtoverlay=vc4-fkms-v3d
dtoverlay=ov5647
# Run as fast as firmware / board allows
arm_boost=1
[all]
enable_uart=1
gpu_mem=128
生效内容解释:
framebuffer_width=1920
framebuffer_height=1080
framebuffer_width、framebuffer_height:这些设置指定帧缓冲区的宽度和高度,帧缓冲区是Raspberry Pi使用的虚拟屏幕。1920和1080的值表示1920x1080像素的分辨率。
hdmi_force_hotplug=1
hdmi_force_hotplug:启用此设置可确保始终检测到hdmi显示器,即使它在启动时最初未连接。
hdmi_group=1
hdmi_mode=31
hdmi_ignore_edit=0xa5000080
hdmi_group和hdmi_mode:这些设置允许您强制使用特定的hdmi模式。在这种情况下,启用hdmi_group=1和hdmi_mode=31,这对应于60Hz下分辨率为1920x1080的DMT(计算机监视器)模式。
dtparam=i2c_arm=on,i2c_arm_baudrate=400000
dtparam=i2c_arm=on,i2c_arm_baudrate=400000:这将启用i2c接口并将波特率设置为400kHz。
dtparam=spi=on
dtparam=spi=on:这将启用spi接口。
dtparam=audio=on
启用此选项可使Raspberry Pi利用其内置的音频功能。启用音频后,如果Raspberry Pi连接到具有内置扬声器或音频输出支持的显示器,您应该能够通过3.5毫米音频插孔或HDMI播放音频。
默认情况下,“snd_bcm2835”模块处理Raspberry Pi上的音频输出,当在配置文件中设置dtparam=audio=on时,应自动加载该模块。
start_x=1
start_x=1:此设置允许加载检测到的摄像头的覆盖,允许Raspberry Pi自动配置和使用连接的摄像头。
display_auto_detect=1
display_auto_detect=1:此设置允许加载检测到的DSI显示器的覆盖,允许Raspberry Pi自动配置和使用连接的DSI显示器。
max_framebuffers=2
max_framebuffers=2:此参数指定可以创建的最大帧缓冲区数。帧缓冲区用于存储屏幕图像的内容。在这种情况下,它被设置为2,表示Raspberry Pi最多可以创建两个帧缓冲区。
arm_64bit=1
arm_64bit=1:此设置使Raspberry Pi能够在64位模式下运行,如果您使用兼容版本的操作系统,则可以充分利用64位arm架构。
disable_overscan=1
disable_overscan=1:启用此选项将禁用已启用过扫描的显示器的过扫描补偿。过扫描补偿调整显示区域,以确保整个图像在屏幕上可见。通过将其设置为1,过扫描补偿被关闭。
otg_mode=1
此部分包含仅适用于Raspberry Pi计算模块4的特定设置或配置。otg_mode=1表示启用主机模式,允许USB端口充当主机,这意味着您可以将键盘、鼠标和其他外围设备等USB设备连接到Raspberry Pi计算模块4。
dtoverlay=vc4-fkms-v3d
dtoverlay=ov5647
# Run as fast as firmware / board allows
arm_boost=1
此部分包含仅适用于Raspberry Pi 4的特定设置或配置。
dtoverlay=vc4-fkms-v3d:这一行启用了用于Raspberry Pi 4图形渲染的vc4 fkms v3d驱动程序。
dtoverlay=ov5647:此行加载ov5647相机模块的覆盖,指示其存在或使用。
arm_boost=1:启用此设置可以使Raspberry Pi以固件和主板允许的速度运行,从而提高性能。
enable_uart=1
gpu_mem=128
enable_uart=1:此设置启用uart(通用异步收发器)接口,该接口通常用于串行通信。
gpu_mem=128:此设置为gpu使用分配128MB的系统内存。根据您对GPU密集型应用程序的特定需求和要求,调整此值可能很有用。
本文详细解析了RaspberryPi的配置文件,包括设置帧缓冲区分辨率、强制HDMI检测、启用I2C和SPI接口、音频支持、摄像头和DSI显示器的自动检测,以及调整为64位模式和优化性能的参数。此外,还涵盖了特定于RaspberryPi4和计算模块4的设置,如OTG模式、VC4图形驱动和UART接口的启用。
880

被折叠的 条评论
为什么被折叠?



