diff mbox series

firmware_loader: move firmware/ to drivers/base/firmware_loader/builtin/

Message ID 1547200321-17120-1-git-send-email-yamada.masahiro@socionext.com (mailing list archive)
State New, archived
Headers show
Series firmware_loader: move firmware/ to drivers/base/firmware_loader/builtin/ | expand

Commit Message

Masahiro Yamada Jan. 11, 2019, 9:52 a.m. UTC
Currently, the 'firmware' directory only contains a single Makefile
to embed extra firmware into the kernel.

Move it to the more relevant place.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 Makefile                                                      | 2 +-
 drivers/base/firmware_loader/Makefile                         | 2 ++
 {firmware => drivers/base/firmware_loader/builtin}/.gitignore | 0
 {firmware => drivers/base/firmware_loader/builtin}/Makefile   | 0
 4 files changed, 3 insertions(+), 1 deletion(-)
 rename {firmware => drivers/base/firmware_loader/builtin}/.gitignore (100%)
 rename {firmware => drivers/base/firmware_loader/builtin}/Makefile (100%)

Comments

Greg KH Jan. 11, 2019, 9:59 a.m. UTC | #1
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/ ?  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.

thanks,

greg k-h
Masahiro Yamada Jan. 11, 2019, 10:20 a.m. UTC | #2
On Fri, Jan 11, 2019 at 6:59 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> 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@kernel.org>
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@chromium.org>
    Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


commit 5d6d1ddd27301dc85b13b794262c8bcececf88f1
Author: Luis R. Rodriguez <mcgrof@kernel.org>
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@chromium.org>
    Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 8c55b64..1625c99 100644
--- a/Makefile
+++ b/Makefile
@@ -583,7 +583,7 @@  export KBUILD_MODULES KBUILD_BUILTIN
 ifeq ($(KBUILD_EXTMOD),)
 # Objects we will link into vmlinux / subdirs we need to visit
 init-y		:= init/
-drivers-y	:= drivers/ sound/ firmware/
+drivers-y	:= drivers/ sound/
 net-y		:= net/
 libs-y		:= lib/
 core-y		:= usr/
diff --git a/drivers/base/firmware_loader/Makefile b/drivers/base/firmware_loader/Makefile
index 5c7f422..0b2dfa6 100644
--- a/drivers/base/firmware_loader/Makefile
+++ b/drivers/base/firmware_loader/Makefile
@@ -5,3 +5,5 @@  obj-$(CONFIG_FW_LOADER_USER_HELPER) += fallback_table.o
 obj-$(CONFIG_FW_LOADER)	+= firmware_class.o
 firmware_class-objs := main.o
 firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += fallback.o
+
+obj-y += builtin/
diff --git a/firmware/.gitignore b/drivers/base/firmware_loader/builtin/.gitignore
similarity index 100%
rename from firmware/.gitignore
rename to drivers/base/firmware_loader/builtin/.gitignore
diff --git a/firmware/Makefile b/drivers/base/firmware_loader/builtin/Makefile
similarity index 100%
rename from firmware/Makefile
rename to drivers/base/firmware_loader/builtin/Makefile