Adjust support for CM3/CM4 devices.

See raspi-firmware's README.Debian for details but basically: both CM3
and CM4 in mainline have a DTB filename that's not expected by the
bootloader, so we need to tell the bootloader about the appropriate DTB
filename for those models specifically.

Do that via /etc/default/raspi-firmware-custom, adding a model filter
for some families:
 - [cm3] for raspi_3_* builds;
 - [cm4] for raspi_4_* builds.

Hint users of regular Pi devices into getting rid of those lines if they
notice them.
This commit is contained in:
Cyril Brulebois
2021-11-20 14:29:12 +01:00
parent 500ffff06c
commit c7f08c54cb
2 changed files with 27 additions and 1 deletions

View File

@@ -169,3 +169,18 @@ steps:
shell: |
rm -f /etc/machine-id /var/lib/dbus/machine-id
__TOUCH_MACHINE_ID__
# Insert a model filter for some families, to make sure users of Compute
# Module devices have a chance to boot our image without manual config:
- chroot: /
shell: |
if [ -n "__CM_DEV__" ] && [ -n "__CM_DTB__" ]; then
cat >> /etc/default/raspi-firmware-custom <<EOF
# The following makes sure a Pi CM__VERSION__ device can be booted without any
# extra configuration (see raspi-firmware's README.debian for details). If
# you're using a regular Pi __VERSION__ device, you can safely remove the following
# two lines:
[__CM_DEV__]
device_tree=__CM_DTB__
EOF
fi