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' linux = 'linux-image-arm64'
dtb = '/usr/lib/linux-image-*-arm64/broadcom/bcm*rpi*.dtb' 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: # wireless/bluetooth firmware:
if arch != 'armhf': if arch != 'armhf':
wireless_firmware = 'firmware-brcm80211' wireless_firmware = 'firmware-brcm80211'
@@ -86,15 +75,15 @@ extra_root_shell_cmds = []
if backports_enable: if backports_enable:
backports_stanza = """ backports_stanza = """
%s %s
deb http://deb.debian.org/debian/ %s main %s deb http://deb.debian.org/debian/ %s main non-free-firmware
""" % (backports_enable, backports_suite, firmware_component) """ % (backports_enable, backports_suite)
else: else:
# ugh # ugh
backports_stanza = """ backports_stanza = """
# Backports are _not_ enabled by default. # Backports are _not_ enabled by default.
# Enable them by uncommenting the following line: # Enable them by uncommenting the following line:
# deb http://deb.debian.org/debian %s main %s # deb http://deb.debian.org/debian %s main non-free-firmware
""" % (backports_suite, firmware_component) """ % backports_suite
gitcommit = subprocess.getoutput("git show -s --pretty='format:%C(auto)%h (%s, %ad)' --date=short ") 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'") 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 \ out_text = in_text \
.replace('__RELEASE__', suite) \ .replace('__RELEASE__', suite) \
.replace('__ARCH__', arch) \ .replace('__ARCH__', arch) \
.replace('__FIRMWARE_COMPONENT__', firmware_component) \
.replace('__FIRMWARE_COMPONENT_OLD__', firmware_component_old) \
.replace('__LINUX_IMAGE__', linux) \ .replace('__LINUX_IMAGE__', linux) \
.replace('__DTB__', dtb) \ .replace('__DTB__', dtb) \
.replace('__WIRELESS_FIRMWARE__', wireless_firmware) \ .replace('__WIRELESS_FIRMWARE__', wireless_firmware) \

View File

@@ -47,15 +47,14 @@ steps:
arch: __ARCH__ arch: __ARCH__
components: components:
- main - main
- __FIRMWARE_COMPONENT__ - non-free-firmware
- __FIRMWARE_COMPONENT_OLD__
unless: rootfs_unpacked unless: rootfs_unpacked
- create-file: /etc/apt/sources.list - create-file: /etc/apt/sources.list
contents: |+ contents: |+
deb http://deb.debian.org/debian __RELEASE__ main __FIRMWARE_COMPONENT__ __FIRMWARE_COMPONENT_OLD__ deb http://deb.debian.org/debian __RELEASE__ main non-free-firmware
deb http://deb.debian.org/debian __RELEASE__-updates main __FIRMWARE_COMPONENT__ __FIRMWARE_COMPONENT_OLD__ deb http://deb.debian.org/debian __RELEASE__-updates main non-free-firmware
deb http://security.debian.org/debian-security __RELEASE__-security main __FIRMWARE_COMPONENT__ __FIRMWARE_COMPONENT_OLD__ deb http://security.debian.org/debian-security __RELEASE__-security main non-free-firmware
__BACKPORTS__ __BACKPORTS__
unless: rootfs_unpacked unless: rootfs_unpacked