Rework images, grouping by architectures.

Building images for Pi 3 and Pi 4 families didn't make much sense since
the same image can run on both (modulo possible CMA tweaks for the
Compute Module 4). The same is almost true for the Pi 5 (given a
sufficiently high kernel version).

Let's build:
 - for armhf (Pi 2);
 - for arm64 (Pi 3, Pi 4, Pi 5).

Let's forget about armel, it's no longer supported in Debian anyway.

Link: https://salsa.debian.org/raspi-team/image-specs/-/issues/75
This commit is contained in:
Cyril Brulebois
2026-03-26 22:44:44 +01:00
parent f15fe61586
commit 0d208d2f4d
2 changed files with 20 additions and 40 deletions

View File

@@ -13,42 +13,26 @@ if len(sys.argv) != 3:
print("E: need 2 arguments", file=sys.stderr)
sys.exit(1)
version = sys.argv[1]
if version not in ["1", "2", "3", "4"]:
print("E: unsupported version %s" % version, file=sys.stderr)
arch = sys.argv[1]
if arch not in ['armhf', 'arm64']:
print("E: unsupported arch %s" % arch, file=sys.stderr)
sys.exit(1)
suite = sys.argv[2]
if suite not in ['bullseye', 'bookworm', 'trixie', 'forky']:
if suite not in ['bookworm', 'trixie', 'forky']:
print("E: unsupported suite %s" % suite, file=sys.stderr)
sys.exit(1)
target_yaml = 'raspi_%s_%s.yaml' % (version, suite)
### Detect unsupported combinations
#
# Some version/suite combinations are no longer supported (e.g. the architecture
# got removed from the archive), in which case generate an empty file and let
# the Makefile pick it up from there.
if version == '1' and suite in ['forky']:
print(f'W: generating an empty recipe for unsupported combination ({version}×{suite})')
Path(target_yaml).write_text('')
sys.exit(0)
target_yaml = 'raspi_%s_%s.yaml' % (arch, suite)
### Setting variables based on suite and version starts here
# Arch, kernel, DTB:
if version == '1':
arch = 'armel'
linux = 'linux-image-rpi'
dtb = '/usr/lib/linux-image-*-rpi/bcm*rpi-*.dtb'
elif version == '2':
if arch == 'armhf':
arch = 'armhf'
linux = 'linux-image-armmp'
dtb = '/usr/lib/linux-image-*-armmp/bcm*rpi*.dtb'
elif version in ['3', '4']:
arch = 'arm64'
elif arch == 'arm64':
linux = 'linux-image-arm64'
dtb = '/usr/lib/linux-image-*-arm64/broadcom/bcm*rpi*.dtb'
@@ -63,16 +47,12 @@ else:
firmware_component = 'non-free'
firmware_component_old = ''
# wireless firmware:
if version != '2':
# wireless/bluetooth firmware:
if arch != 'armhf':
wireless_firmware = 'firmware-brcm80211'
else:
wireless_firmware = ''
# bluetooth firmware:
if version != '2':
bluetooth_firmware = 'bluez-firmware'
else:
wireless_firmware = ''
bluetooth_firmware = ''
# Pi 4 on buster required some backports. Let's keep variables around, ready to
@@ -81,20 +61,20 @@ backports_enable = False
backports_suite = '%s-backports' % suite
# Serial console:
if version in ['1', '2']:
if arch == 'armhf':
serial = 'ttyAMA0,115200'
elif version in ['3', '4']:
elif arch == 'arm64':
serial = 'ttyS1,115200'
# CMA fixup:
extra_chroot_shell_cmds = []
if version == '4':
if arch == 'arm64':
extra_chroot_shell_cmds = [
"sed -i 's/cma=64M //' /boot/firmware/cmdline.txt",
]
# Hostname:
hostname = 'rpi_%s' % version
hostname = 'rpi-%s' % arch
# Nothing yet!
extra_root_shell_cmds = []