Re: [PATCH] scripts: Add script to extract built-in firmware blobs
From: Andrew Morton
Date: Fri Jan 24 2025 - 01:38:26 EST
On Mon, 20 Jan 2025 16:04:26 -0300 "Guilherme G. Piccoli" <gpiccoli@xxxxxxxxxx> 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?