From: Andrew Morton <akpm@linux-foundation.org>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Cc: linux-kernel@vger.kernel.org, mcgrof@kernel.org,
russ.weight@linux.dev, dakr@kernel.org,
gregkh@linuxfoundation.org, rafael@kernel.org,
masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu,
kernel-dev@igalia.com, kernel@gpiccoli.net,
Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Subject: Re: [PATCH] scripts: Add script to extract built-in firmware blobs
Date: Fri, 24 Jan 2025 15:07:56 -0800 [thread overview]
Message-ID: <20250124150756.b8b9b9ac9aaff778a9edcbf0@linux-foundation.org> (raw)
In-Reply-To: <d2574378-9143-9819-dc1f-c5e10e789fee@igalia.com>
On Fri, 24 Jan 2025 09:31:07 -0300 "Guilherme G. Piccoli" <gpiccoli@igalia.com> wrote:
> On 24/01/2025 03:38, Andrew Morton wrote:
> > On Mon, 20 Jan 2025 16:04:26 -0300 "Guilherme G. Piccoli" <gpiccoli@igalia.com> wrote:
> >
> >> Through the options CONFIG_EXTRA_FIRMWARE{_DIR} one is able to build
> >> a kernel including firmware blobs in a built-in fashion. This is
> >> usually the case of built-in drivers that require some blobs in
> >> order to work properly, for example, like in non-initrd based systems.
> >>
> >> Add hereby a script to extract these blobs from a non-stripped vmlinux,
> >> similar to the idea of "extract-ikconfig". The firmware loader interface
> >> saves such built-in blobs as rodata entries, having a field for the FW
> >> name as "_fw_<module_name>_<firmware_name>_bin"; the tool extracts files
> >> named "<module_name>_<firmware_name>" for each rodata firmware entry
> >> detected. It makes use of awk, bash, dd and readelf, pretty standard
> >> tooling for Linux development.
> >
> > Please describe the use case(s) for this. ie, why are you suggesting
> > this be added to Linux?
> >
>
> Hi Andrew, there is currently no tool to extract a firmware blob that is
> built-in on vmlinux to the best of my knowledge. So if we have a kernel
> image containing the blobs, and we want to rebuild the kernel with some
> debug patches for example (and given that the image also has
> IKCONFIG=y), we currently can't do that for the same versions for all
> the firmware blobs, _unless_ we have exact commits of linux-firmware for
> the specific versions for each firmware included.
>
> With this tool, we can blindly extract the FWs and easily re-add them in
> the new debug kernel build, allowing a more deterministic testing
> without the burden of "hunting down" the proper version of each firmware
> binary.
>
> Makes sense to you?
OK, thanks. I (badly) pasted the above into the changelog.
prev parent reply other threads:[~2025-01-24 23:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 19:04 Guilherme G. Piccoli
2025-01-24 6:38 ` Andrew Morton
2025-01-24 12:31 ` Guilherme G. Piccoli
2025-01-24 23:07 ` Andrew Morton [this message]
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=20250124150756.b8b9b9ac9aaff778a9edcbf0@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cascardo@igalia.com \
--cc=dakr@kernel.org \
--cc=gpiccoli@igalia.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-dev@igalia.com \
--cc=kernel@gpiccoli.net \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=rafael@kernel.org \
--cc=russ.weight@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®