Simplify firmware management.

Given the supported distributions, only non-free-firmware matters.
This commit is contained in:
Cyril Brulebois
2026-03-26 23:12:10 +01:00
parent 6aaf342c32
commit 97cea51e6d
2 changed files with 8 additions and 22 deletions

View File

@@ -36,17 +36,6 @@ elif arch == 'arm64':
linux = 'linux-image-arm64'
dtb = '/usr/lib/linux-image-*-arm64/broadcom/bcm*rpi*.dtb'
# Bookworm introduced the 'non-free-firmware' component¹; before that,
# raspi-firmware was in 'non-free'
#
# ¹ https://www.debian.org/vote/2022/vote_003
if suite != 'bullseye':
firmware_component = 'non-free-firmware'
firmware_component_old = 'non-free'
else:
firmware_component = 'non-free'
firmware_component_old = ''
# wireless/bluetooth firmware:
if arch != 'armhf':
wireless_firmware = 'firmware-brcm80211'
@@ -86,15 +75,15 @@ extra_root_shell_cmds = []
if backports_enable:
backports_stanza = """
%s
deb http://deb.debian.org/debian/ %s main %s
""" % (backports_enable, backports_suite, firmware_component)
deb http://deb.debian.org/debian/ %s main non-free-firmware
""" % (backports_enable, backports_suite)
else:
# ugh
backports_stanza = """
# Backports are _not_ enabled by default.
# Enable them by uncommenting the following line:
# deb http://deb.debian.org/debian %s main %s
""" % (backports_suite, firmware_component)
# deb http://deb.debian.org/debian %s main non-free-firmware
""" % backports_suite
gitcommit = subprocess.getoutput("git show -s --pretty='format:%C(auto)%h (%s, %ad)' --date=short ")
buildtime = subprocess.getoutput("date --utc +'%Y-%m-%d %H:%M'")
@@ -126,8 +115,6 @@ with open('raspi_master.yaml', 'r') as in_file:
out_text = in_text \
.replace('__RELEASE__', suite) \
.replace('__ARCH__', arch) \
.replace('__FIRMWARE_COMPONENT__', firmware_component) \
.replace('__FIRMWARE_COMPONENT_OLD__', firmware_component_old) \
.replace('__LINUX_IMAGE__', linux) \
.replace('__DTB__', dtb) \
.replace('__WIRELESS_FIRMWARE__', wireless_firmware) \