Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.08 KB

README.md

File metadata and controls

29 lines (21 loc) · 1.08 KB

Appending conditional kernel command line arguments in config.txt

Out of the box the Pi firmware only allows a single cmdline option. Anything within the referenced file is used as the command line argument passed to the booted Linux kernel. I needed additional conditional values, so I could do something like, for example, this:

[Pi5]
# somehow append key=value option to the cmdline value...

Thankfully my question in the Pi forum was quickly answered by PhilE: It's possible to use a custom overlay for that.

This is how it works: First copy the included append_cmdline.dtbo file to /overlays.

Within a conditional config.txt section or an included file, use the following line to append some value to the existing command line:

dtoverlay=append_cmdline,append=video=HDMI-A-1:1920x540@60

This can be repeated to append multiple values. Alternatively multiple values can be specified like this:

dtoverlay=append_cmdline
dtparam=append=video=HDMI-A-1:1920x540@60
dtparam=append=video=HDMI-A-2:1920x540@60