Skip to content

Commit

Permalink
Use custom config.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
mlainez committed Oct 28, 2024
1 parent 8f847f8 commit a610e3e
Show file tree
Hide file tree
Showing 3 changed files with 493 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ config :nerves_hub_link,
host: "https://your-nerves-hub-server.com",
configurator: NervesHubLink.Configurator.SharedSecret

config :nerves, :firmware,
fwup_conf: "config/fwup.conf"

if Mix.target() == :host do
import_config "host.exs"
else
Expand Down
72 changes: 72 additions & 0 deletions config/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Default Nerves RPi 4 config.txt
#
# It's possible to override this file by using a custom fwup.conf
# configuration to pull in a replacement.
#
# Useful links:
# http://rpf.io/configtxt
# https://www.raspberrypi.org/documentation/configuration/device-tree.md
# https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md
# https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README

# Enable 64-bit support
arm_64bit=1

# We always use the same names. The variant is selected in fwup.conf.
start_file=start4.elf
fixup_file=fixup4.dat

# Disable the boot rainbow
disable_splash=1

# This, along with the Raspberry Pi "x" firmware is needed for the camera
# to work. The Raspberry Pi "x" firmware is selected via the Buildroot
# configuration. See Target packages->Hardware handling->Firmware.
gpu_mem=192

# Enable I2C and SPI
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=i2c_arm_baudrate=400000

# Enable audio (loads snd_bcm3825)
dtparam=audio=on

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Disable compensation for displays with overscan
disable_overscan=1

# Comment this in or modify to enable OneWire
# NOTE: check that the overlay that you specify is in the boot partition or
# this won't work.
#dtoverlay=w1-gpio-pullup,gpiopin=4

# Support USB gadget mode on the USB-C port
dtoverlay=dwc2

# The ramoops overlay works with the pstore driver to preserve crash
# information across reboots in DRAM
dtoverlay=ramoops

# Enable the UART (/dev/ttyS0)
enable_uart=1

[cm4]
# Raspberry Pi CM4-only settings

# For the CM4 I/O board, USB is disabled by default. This enables it.
dtoverlay=dwc2,dr_mode=host

Loading

0 comments on commit a610e3e

Please sign in to comment.