All of lore.kernel.org
 help / color / mirror / Atom feed
From: Azamat Hackimov <azamat.hackimov@gmail.com>
To: linux-firmware@kernel.org
Subject: Feature request: Adding tools to be able to split the linux-firmware package into separate components
Date: Wed, 19 Oct 2022 19:15:30 +0300	[thread overview]
Message-ID: <CAFqVybqsda75NPUAYX47FCQp0OAkRWOUw7K9UbPawbNo=Th2bQ@mail.gmail.com> (raw)

The size of linux-firmware already reaches over 1 GB. Linux
distributions typically do not split the linux-firmware package into
components, which results in the user's installation storing files
that are never used by the system and take up unnecessary space. This
problem is especially acute for embedded systems or systems running in
containers.

There has been a request among some distributions to separate
linux-firmware into components in order to make it easier for the user
to install and use firmware. Among them are Arch Linux[1], Fedora[2],
Alpine[3], however, separation on the side of the maintainers of the
distribution is fraught with difficulties associated with the
inability to reliably separate the individual components of the
linux-firmware package by driver or even by category.

I propose to provide a similar mechanism for filtering prerequisites
on the side of the linux-firmware package. To do this, I propose to
transform the WHENCE file into a structured file that can be processed
by an additional tool that can filter the necessary components by
driver, category, manufacturer or license.

Suggested structured file format is YAML (although other formats are
possible), example entry (actual existing entry from WHENCE):

```
drivers:
  - driver: emi62
    description: EMI 6|2m USB Audio interface
    category:
      - drivers/usb/misc
    vendor: Emagic
    license: Unknown
    info: |
      Converted from Intel HEX files, used in our binary representation of ihex.
    files:
      - name: emi62/bitstream.fw
        version: 1.0.0.191
        info: DATE=2002oct28
      - name: emi62/loader.fw
        version: 1.0.2.002
        info: DATE=10.01.2002
      - name: emi62/midi.fw
        version: 1.04.062
        info: DATE=16.10.2002
      - name: emi62/spdif.fw
        version: 1.04.062
        info: DATE=16.10.2002
```

The firmware-install utility to query and filter a structured file
should parse the following options:

firmware-install list [--category <LIST>] [--driver <LIST>] [--license
<LIST>] [--vendor <LIST>]
  List drivers and firmwares that applies to filter

firmware-install show <DRIVER>
  Show information about driver

firmware-install install <DESTINATION> [--category <LIST>] [--driver
<LIST>] [--license <LIST>] [--vendor <LIST>]
  Install firmwares that applies to filter

firmware-install check
  Check format and content of structured file (like check_whence.py does)

After the implementation of such a utility, maintainers of Linux
distributions will have a convenient tool that will allow them to
create sets of linux-firmware-* packages with content separation
instead of a monolithic installation of all firmware.

[1] https://bugs.archlinux.org/task/72559
[2] https://fedoraproject.org/wiki/Changes/Linux_Firmware_Minimization
[3] https://lists.alpinelinux.org/~alpine/devel/%3C4d19a51c-3eba-9775-0208-4d87da66effc%40bitmessage.ch%3E

             reply	other threads:[~2022-10-19 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 16:15 Azamat Hackimov [this message]
2022-10-24 16:18 ` Feature request: Adding tools to be able to split the linux-firmware package into separate components Josh Boyer
2022-11-06 17:53   ` Azamat Hackimov
2022-12-26 10:02     ` Azamat Hackimov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFqVybqsda75NPUAYX47FCQp0OAkRWOUw7K9UbPawbNo=Th2bQ@mail.gmail.com' \
    --to=azamat.hackimov@gmail.com \
    --cc=linux-firmware@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.