firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Is there a Pi400 config.txt conditional filter? I don't see it documented

Open vianpl opened this issue 4 years ago • 11 comments

I can't seem to find a Pi400 config.txt conditional filter. The documentation I refer to is https://www.raspberrypi.org/documentation/configuration/config-txt/conditional.md. If non-existent, I'd appreciate it could be introduced (and the same goes for CM4).

Thanks for everything :slightly_smiling_face:

vianpl avatar Nov 16 '20 11:11 vianpl

There isn't one, and unlikely to be one for a while - there is some technical stuff we need to figure out.

JamesH65 avatar Nov 16 '20 12:11 JamesH65

Fair enough, should I close the issue or you're OK if I keep it open as a reminder?

vianpl avatar Nov 16 '20 12:11 vianpl

Open is fine until we have a decision.

popcornmix avatar Nov 16 '20 14:11 popcornmix

Don't they respect the [pi4] filter, same as [pi1] and [pi3] include the respective compute modules due to identical SoC? Individual model differentiation of course would be nice as well, but I don't see something missing here, but instead this being an extension/addition to the current fully functional conditional filter feature.

MichaIng avatar Dec 04 '20 12:12 MichaIng

Yes - currently [pi4] is effectively [bcm2711] (which doesn't exist), so it includes CM4 and Pi 400.

pelwell avatar Dec 04 '20 16:12 pelwell

Now there are [pi400] and [cm4] conditional filters, if I interpret the latest commit correctly? https://github.com/raspberrypi/firmware/commit/919aee0ed75f7db48a38b8b96c13228a7584cfd7

firmware: config: Add cm4 and pi400 config section filters

👏

MichaIng avatar Dec 09 '20 12:12 MichaIng

Yes, that's correct. The next Pi 4 bootloader beta will also support those for advanced configuration like gpu_mem / start_file. I think that will also be the next stable bootloader release unless there are major regressions.

timg236 avatar Dec 09 '20 12:12 timg236

Note that a [pi4] is still true for Pi 400 and CM4, but [pi400] and [cm4] are only true for Pi 400 and CM4 respectively. If you want something to only apply to a Pi 4 you'll currently have to revert the settings on Pi 400/CM4.

pelwell avatar Dec 09 '20 12:12 pelwell

That is great, so one can e.g. define different overclocking for the Pi 400 that is running on higher frequency by default (1500 vs 1800 MHz) and skip configuring onboard audio on CM4 and such. Many thanks for implementing this!

MichaIng avatar Dec 09 '20 13:12 MichaIng

The next rpi-update firmware will also include a change where board-specific changes can be stored in the EEPROM config and automatically appended to config.txt at runtime.

E.g. In the PI400 EEPROM you could have something like

# Bootloader will stop here
[none]

# Start.elf will augment config.txt at runtime with this
[config.txt]
arm_freq=2000
over_voltage=4

Although, you need to be a bit careful when configuring this and have a recovery image on standby :)

timg236 avatar Dec 09 '20 13:12 timg236

You can use the board type filter to have pi400-specific conditional filter.

zyga avatar Nov 15 '21 17:11 zyga

Fixed

timg236 avatar Nov 28 '22 20:11 timg236