Re: [PATCH] firmware_loader: move firmware/ to drivers/base/firmware_loader/builtin/

From: Masahiro Yamada
Date: Fri Jan 11 2019 - 05:21:23 EST


On Fri, Jan 11, 2019 at 6:59 PM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Jan 11, 2019 at 06:52:00PM +0900, Masahiro Yamada wrote:
> > Currently, the 'firmware' directory only contains a single Makefile
> > to embed extra firmware into the kernel.
> >
> > Move it to the more relevant place.
>
> So this moves any "build in" firmware to need to be placed in
> drivers/base/firmare_loader/builtin/ instead of firmware/builtin/ ?

Nope.

The build system searches extra firmware in the directory specified
by CONFIG_EXTRA_FIRMWARE_DIR. (default is /lib/firmware)


See drivers/base/firmware_loader/Kconfig:

config EXTRA_FIRMWARE_DIR
string "Firmware blobs root directory"
depends on EXTRA_FIRMWARE != ""
default "/lib/firmware"
help
This option controls the directory in which the kernel build system
looks for the firmware files listed in the EXTRA_FIRMWARE option.



> If
> so, why? That seems like a lot of extra work for people now. And
> burrying it down in the drivers/base/ directory is not obvious at all.


The firmware search path is a different thing.


I am just moving the Makefile
because all the other stuff (C files, Kconfig)
has been moved into drivers/base/firmware_loader/.

And, this is the last piece work in order to
make drivers/base/firmware_loader self-contained.



Just a reminder of previous commits you applied:


commit 06bfd3c8ab1dbf0031022d056a90ace682f6a94c
Author: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
Date: Thu May 10 13:08:43 2018 -0700

firmware_loader: move kconfig FW_LOADER entries to its own file

This will make it easier to track and easier to understand
what components and features are part of the FW_LOADER. There
are some components related to firmware which have *nothing* to
do with the FW_LOADER, souch as PREVENT_FIRMWARE_BUILD.

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>


commit 5d6d1ddd27301dc85b13b794262c8bcececf88f1
Author: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
Date: Sat Mar 10 06:14:50 2018 -0800

firmware: move firmware loader into its own directory

This will make it much easier to manage as we manage to
keep trimming componnents down into their own files to more
easily manage and maintain this codebase.

Suggested-by: Kees Cook <keescook@xxxxxxxxxxxx>
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>



--
Best Regards
Masahiro Yamada