Here is a URL for the official Raspberry Pi documentation on the config.txt, and here is a URL for clockworkpi’s provided config.txt for the CM4.
Raspberry Pis use the file config.txt, located in the boot partition (mounted by Raspberry Pi OS at /boot/firmware/, and prior to RPiOS Bookworm, /boot/) to change firmware options on boot.
For additional information, this is a quote from Perplexity.ai, so take it as it is:
…While there is no explicit quote [in official documentation] saying “later entries take precedence,” it is an understood and documented behavior consistent with how the config file and includes work on Raspberry Pi.
Given that there are only a handful of Compute Modules useable on the uConsole, and that the uConsole on its own is 1 hardware configuration, is it possible for there to be a “best” config.txt? I think it’s possible. If we all get together and share our hardware configurations and config texts, perhaps we can at least make a well-documented config.txt that would act as a better start point for new uConsole owners.
Here is my full /boot/config.txt, which I have commented thoroughly and honestly. I can’t pretend to be an expert in the matter.
# Raspberry Pi config.txt
# Use under the license of your choice, of: Public Domain, MIT, UNLICENSE.
# Compatibility
#
# Name | Should work | Tested?
# CM3 | Yes | Not yet
# CM3+ | Yes | Not yet
# CM4S | No | Not yet
# CM4 | Yes | Yes
# CM5 | Yes | Not yet
# Tested on a CM4 Lite 4GB, with the HackerGadgets SDR board.
# Raspberry Pi OS default. Using a kernel named "kernel8.img" sets this
# implicitly. There are no (known) 32 bit kernels useable on the uConsole.
arm_64bit=1
# Raspberry Pi OS default. Increases the default turbo-mode frequency from
# 1.5GHz to 1.8GHz on certain 4Bs and all 400s. Does this apply to the CM4?
arm_boost=1
# Prevents the firmware from picking a video mode, leaving it to Linux.
# TODO: is this useful?
disable_fw_kms_setup=1
# clockworkpi default.
# TODO: is this necessary?
disable_overscan=1
# clockworkpi default. Remaps the audio output to GPIO pins 12 and 13, used by
# the mainboard (visible on the schematic).
dtoverlay=audremap,pins_12_13
# clockworkpi default. Enables the USB controller on the mainboard (presumably)
# and sets it to USB host mode.
dtoverlay=dwc2,dr_mode=host
# This enables use of the PCF85063A RTC over I2C, for the HackerGadgets SDR
# board. If not using that expansion, leaves a complaint in your logs.
#dtoverlay=i2c-rtc,pcf85063a
# On the DevTerm, this enables the built-in printer. If using the HackerGadgets
# SDR board, enables the expansion's LoRa transceiver. See:
# <https://hackergadgets.com/pages/hackergadgets-uconsole-rtl-sdr-lora-gps-rtc-
# usb-hub-all-in-one-extension-board-setup-guide>.
#dtoverlay=spi1-1cs
# This is used to use the mainboard's WLAN antenna connector rather than the
# one on the Compute Module.
#dtparam=ant2
# clockworkpi default. Enables on-board audio.
dtparam=audio=on
# This is a clockworkpi default that enables SPI. On the CM3 or CM4 it doesn't
# do any harm to leave it on even when not using it.
dtparam=spi=on
# Enables the serial console on GPIOs 14 and 15, used by the HackerGadgets SDR
# expansion for communication with the GPS. Does nothing otherwise.
enable_uart=1
# clockworkpi default. Configures GPIO 10 as an input; it is used by the
# mainboard for audio jack detection (visible on the schematic as HP_DET).
gpio=10=ip,np
# clockworkpi default. Prevents autodetection of the Raspberry Pi Touch Display
# (which is certainly not present) on the I2C bus - not strictly necessary, but
# saves time.
ignore_lcd=1
# Compute Module 3, Compute Module 3+
[pi3]
dtoverlay=clockworkpi-uconsole-cm3
# Loads the full KMS driver for the Pi 3's VC4 graphics system.
dtoverlay=vc4-kms-v3d
# Uses the mainboard WLAN.
dtoverlay=spi-gpio35-39
# Configures GPIO 11 as an output, driven high; this is to enable the speakers
# on the mainboard (visible on the schematic as PA_EN). On the CM4 and CM5,
# this causes the speaker be enabled even when headphones are connected.
# TODO: is this necessary on the CM4S?
gpio=11=op,dh
# Compute Module 4S
[cm4s]
# I have not tried this configuration.
# Compute Module 4
[cm4]
dtoverlay=clockworkpi-uconsole
# Loads the full KMS driver for the Pi 4's VC4 graphics system.
dtoverlay=vc4-kms-v3d-pi4
# This is part of the configuration for the HackerGadgets SDR expansion.
#dtparam=i2c_arm=on
# Compute Module 5
[cm5]
dtoverlay=clockworkpi-uconsole-cm5
# This enables use of the PCF85063A RTC over I2C, for the HackerGadgets SDR
# board, in situations where the prior i2c-rtc,pcf85063a line doesn't work.
# This line has a different meaning on prior Compute Modules. See
# <https://forum.clockworkpi.com/t/hackergadgets-aio-board-package/17875/286>.
# TODO: is this a problem specific to the CM5, or to certain SDR boards?
#dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi0
# Loads the full KMS driver for the Pi 5's VC4 graphics system.
dtoverlay=vc4-kms-v3d-pi5
# On the CM5, using SPI causes the backlight to be disabled (TODO: why?),
# requiring the operating system to re-enable it. This is necessary if using
# other things on the SPI bus, such as the HackerGadgets SDR board. Comment
# this line out to re-enable it.
dtparam=spi=off
# Disables the unused PCIe lane.
dtparam=pciex1=off
# This is part of the configuration for the HackerGadgets SDR expansion.
#dtparam=rtc=off
# Enables the serial console on GPIOs 14 and 15, used by the HackerGadgets SDR
# expansion for communication with the GPS. Does nothing otherwise.
dtparam=uart0
# On the CM5 this is unnecessary.
enable_uart=0
[all]
# The kernel and initramfs lines are dictated by what operating system is in
# use. For examples:
#kernel=vmlinuz-linux-uconsole-rpi64
#initramfs initramfs-linux-uconsole-rpi64.img followkernel
#kernel=vmlinuz-linux-clockworkpi-git
#initramfs initramfs-linux-rpi-clockwork.img followkernel
I’ll be editing this top message as the thread goes on, with my current tested configuration, to ensure it stays up to date and in the same place.