Commit Graph

18 Commits

Author SHA1 Message Date
Steve McIntyre 4f8c844f81 Look for firmware in /usr/lib/firmware as well as /lib/firmware
Closes: #1059858
2024-01-02 15:55:46 +00:00
Steve McIntyre 25e6430341 *really* make runs of generate_firmware_task quieter 2023-07-06 16:06:47 +01:00
Steve McIntyre b4265d6078 Tweak ordering of firmware package checks
Let's minimise repeat logging of ignores
2023-07-04 18:11:38 +01:00
Steve McIntyre 1824a66933 Add a way to exclude named firmware packages from media
So we can control which packages are included - see
tasks/$codename/firmware-exclude
2023-07-04 17:14:00 +01:00
Cyril Brulebois 2e61e76d86 generate_firmware_task: prettify output
Use a format string to align both columns (Package and Filename fields).
2023-01-27 07:38:40 +01:00
Cyril Brulebois 95df8ab524 make-firmware-image: implement firmware/dep11 generation for bookworm and above
Mimic what make_disc_trees.pl does, making it possible for hw-detect to
spot not only the /firmware/dep11 directory in netinst images, but also
on installation images with firmware added manually.

Rename pseudo-option to clarify it returns filenames and indices.

Keep generation disabled for bullseye (as an extra safeguard, even if we
have separate, per-release branches anyway): That's helpful information
but bullseye is a stable release, and changing even unofficial material
might not be the best idea. Be cautious by default, it's easy enough to
enable if desired.
2023-01-26 23:22:40 +01:00
Cyril Brulebois 45db7e1582 generate_firmware_task: build lists of Packages files and iterate on them
The next step for make-firmware-image is to use generate_firmware_patterns
for each firmware package that was detected. That command requires DEP-11
metadata, so needs to know which Packages file each firmware package comes
from.

Instead of building long $pkgfiles and $bp_pkgfiles strings, and passing
them to catz, build lists instead and iterate over them. This means a few
more catz calls, but that also means being able to derive the DEP-11
directory from Packages paths.

There should be no functional changes.
2023-01-26 23:22:40 +01:00
Cyril Brulebois bd13392570 generate_firmware_task: implement support for --list-filenames
Treat the output file argument specifically when it's “--list-filenames”:
instead of actually generating a task file with a list of packages (and a
few comments), output the Filename field for each firmware package
matching our criteria.

Move some status messages to STDERR accordingly.

This makes the “find suitable firmware packages” reusable, e.g. by
make-firmware-image.
2023-01-26 23:22:40 +01:00
Cyril Brulebois 90739b8cde generate_firmware_task: move code around
This is a preparatory step for the following commit, there should be no
functional changes.
2023-01-26 23:22:40 +01:00
Cyril Brulebois 14d2664459 generate_firmware_task: pick and choose components
We have a few fully-free firmware packages in main, and a few downloaders
(e.g. b43-installer and b43legacy-installer) in contrib; the latter might
not be really interesting without an alternative connectivity during the
installation process.

Regarding non-free vs. non-free-firmware, we started moving packages[1] from
the former to the latter so that we could build official installation images
based on main and non-free-firmware only.

 1. https://lists.debian.org/debian-boot/2023/01/msg00150.html

At the moment, NON_FREE_COMPONENTS still lists both, but the plan is to move
to non-free-firmware only once all the packages we want are available there.

The relevant variables regarding components include:
 - CONTRIB
 - NONFREE
 - EXTRANONFREE
 - FORCE_FIRMWARE

This commit implements:
 - using main all the time;
 - using contrib if CONTRIB=1;
 - using NONFREE_COMPONENTS if NONFREE=1 or EXTRANONFREE=1 or FORCE_FIRMWARE=1.

At the moment it seems the only existing caller is the top-level Makefile,
only when FORCE_FIRMWARE is set. But it seems to make sense to match what
tools/apt-selection does, to avoid any surprises.
2023-01-26 23:22:40 +01:00
Steve McIntyre 5710321f9e Add proper backports support in generate_firmware_task
When BACKPORTS is defined, look for firmware in $codename-backports
first, then in $codename
2018-08-13 14:36:36 +01:00
Steve McIntyre a55bc64a77 Add support for archives without Packages.gz and Sources.gz
Try .xz files too
2016-11-15 09:06:41 +00:00
Steve McIntyre 9131b33b53 fix silly syntax error 2012-03-05 22:42:30 +00:00
Steve McIntyre 55f8fdac36 tools/generate_firmware_task: silly fixes 2012-03-05 16:13:17 +00:00
Steve McIntyre 4a852eaac6 tools/generate_firmware_task: Add LOCALDEBS support 2012-03-05 13:42:19 +00:00
Steve McIntyre 9f52089e74 tools/generate_firmware_task: Add LOCALDEBS support 2012-03-05 13:41:01 +00:00
Steve McIntyre 37e69e2d27 Remove dead commented code 2011-06-10 16:29:40 +00:00
Steve McIntyre d872cea0c1 Remove the checked-in firmware task altogether, as it's not
useful. Generate it when needed using the new script
tools/generate_firmware_task.
2011-06-10 16:21:32 +00:00