From 97cea51e6da5560ec1016e5259c97f010fba8fb0 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Thu, 26 Mar 2026 23:12:10 +0100 Subject: [PATCH] Simplify firmware management. Given the supported distributions, only non-free-firmware matters. --- generate-recipe.py | 21 ++++----------------- raspi_master.yaml | 9 ++++----- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/generate-recipe.py b/generate-recipe.py index 74f2098..a2e44dc 100755 --- a/generate-recipe.py +++ b/generate-recipe.py @@ -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) \ diff --git a/raspi_master.yaml b/raspi_master.yaml index d7a07bc..4b34313 100644 --- a/raspi_master.yaml +++ b/raspi_master.yaml @@ -47,15 +47,14 @@ steps: arch: __ARCH__ components: - main - - __FIRMWARE_COMPONENT__ - - __FIRMWARE_COMPONENT_OLD__ + - non-free-firmware unless: rootfs_unpacked - create-file: /etc/apt/sources.list contents: |+ - deb http://deb.debian.org/debian __RELEASE__ main __FIRMWARE_COMPONENT__ __FIRMWARE_COMPONENT_OLD__ - deb http://deb.debian.org/debian __RELEASE__-updates main __FIRMWARE_COMPONENT__ __FIRMWARE_COMPONENT_OLD__ - deb http://security.debian.org/debian-security __RELEASE__-security 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 non-free-firmware + deb http://security.debian.org/debian-security __RELEASE__-security main non-free-firmware __BACKPORTS__ unless: rootfs_unpacked