diff mbox series

[v2,06/14] efi: move fdt helper library

Message ID 20170803100432.29913-7-leif.lindholm@linaro.org
State New
Headers show
Series efi: improved correctness, arm unification, and cleanup | expand

Commit Message

Leif Lindholm Aug. 3, 2017, 10:04 a.m. UTC
There is nothing ARM64 (or even ARM) specific about the efi fdt helper
library, which is used for locating or overriding a firmware-provided
devicetree in a UEFI system - so move it to loader/efi for reuse.

Move the fdtload.h include file to grub/efi and update path to
efi/fdtload.h in source code referring to it.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

---
 grub-core/Makefile.core.def           | 2 +-
 grub-core/loader/arm64/linux.c        | 2 +-
 grub-core/loader/arm64/xen_boot.c     | 2 +-
 grub-core/loader/{arm64 => efi}/fdt.c | 2 +-
 include/grub/{arm64 => efi}/fdtload.h | 0
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename grub-core/loader/{arm64 => efi}/fdt.c (99%)
 rename include/grub/{arm64 => efi}/fdtload.h (100%)

-- 
2.11.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Comments

Vladimir 'phcoder' Serbinenko Aug. 3, 2017, 3:38 p.m. UTC | #1
LGTM

Le Thu, Aug 3, 2017 à 12:10 PM, Leif Lindholm <leif.lindholm@linaro.org> a
écrit :

> There is nothing ARM64 (or even ARM) specific about the efi fdt helper

> library, which is used for locating or overriding a firmware-provided

> devicetree in a UEFI system - so move it to loader/efi for reuse.

>

> Move the fdtload.h include file to grub/efi and update path to

> efi/fdtload.h in source code referring to it.

>

> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---

>  grub-core/Makefile.core.def           | 2 +-

>  grub-core/loader/arm64/linux.c        | 2 +-

>  grub-core/loader/arm64/xen_boot.c     | 2 +-

>  grub-core/loader/{arm64 => efi}/fdt.c | 2 +-

>  include/grub/{arm64 => efi}/fdtload.h | 0

>  5 files changed, 4 insertions(+), 4 deletions(-)

>  rename grub-core/loader/{arm64 => efi}/fdt.c (99%)

>  rename include/grub/{arm64 => efi}/fdtload.h (100%)

>

> diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def

> index 1d86bd22e..a65c27f7f 100644

> --- a/grub-core/Makefile.core.def

> +++ b/grub-core/Makefile.core.def

> @@ -1707,7 +1707,7 @@ module = {

>

>  module = {

>    name = fdt;

> -  arm64 = loader/arm64/fdt.c;

> +  arm64 = loader/efi/fdt.c;

>    common = lib/fdt.c;

>    enable = fdt;

>  };

> diff --git a/grub-core/loader/arm64/linux.c

> b/grub-core/loader/arm64/linux.c

> index 1960d18b5..cac94d53d 100644

> --- a/grub-core/loader/arm64/linux.c

> +++ b/grub-core/loader/arm64/linux.c

> @@ -26,8 +26,8 @@

>  #include <grub/mm.h>

>  #include <grub/types.h>

>  #include <grub/cpu/linux.h>

> -#include <grub/cpu/fdtload.h>

>  #include <grub/efi/efi.h>

> +#include <grub/efi/fdtload.h>

>  #include <grub/efi/memory.h>

>  #include <grub/efi/pe32.h>

>  #include <grub/i18n.h>

> diff --git a/grub-core/loader/arm64/xen_boot.c

> b/grub-core/loader/arm64/xen_boot.c

> index b7a5b17c9..d092a53ed 100644

> --- a/grub-core/loader/arm64/xen_boot.c

> +++ b/grub-core/loader/arm64/xen_boot.c

> @@ -27,9 +27,9 @@

>  #include <grub/misc.h>

>  #include <grub/mm.h>

>  #include <grub/types.h>

> -#include <grub/cpu/fdtload.h>

>  #include <grub/cpu/linux.h>

>  #include <grub/efi/efi.h>

> +#include <grub/efi/fdtload.h>

>  #include <grub/efi/memory.h>

>  #include <grub/efi/pe32.h>     /* required by struct

> xen_hypervisor_header */

>  #include <grub/i18n.h>

> diff --git a/grub-core/loader/arm64/fdt.c b/grub-core/loader/efi/fdt.c

> similarity index 99%

> rename from grub-core/loader/arm64/fdt.c

> rename to grub-core/loader/efi/fdt.c

> index bdc3a0c1f..9715afee0 100644

> --- a/grub-core/loader/arm64/fdt.c

> +++ b/grub-core/loader/efi/fdt.c

> @@ -18,12 +18,12 @@

>

>  #include <grub/fdt.h>

>  #include <grub/mm.h>

> -#include <grub/cpu/fdtload.h>

>  #include <grub/err.h>

>  #include <grub/dl.h>

>  #include <grub/command.h>

>  #include <grub/file.h>

>  #include <grub/efi/efi.h>

> +#include <grub/efi/fdtload.h>

>  #include <grub/efi/memory.h>

>

>  static void *loaded_fdt;

> diff --git a/include/grub/arm64/fdtload.h b/include/grub/efi/fdtload.h

> similarity index 100%

> rename from include/grub/arm64/fdtload.h

> rename to include/grub/efi/fdtload.h

> --

> 2.11.0

>

>

> _______________________________________________

> Grub-devel mailing list

> Grub-devel@gnu.org

> https://lists.gnu.org/mailman/listinfo/grub-devel

>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
diff mbox series

Patch

diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 1d86bd22e..a65c27f7f 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1707,7 +1707,7 @@  module = {
 
 module = {
   name = fdt;
-  arm64 = loader/arm64/fdt.c;
+  arm64 = loader/efi/fdt.c;
   common = lib/fdt.c;
   enable = fdt;
 };
diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
index 1960d18b5..cac94d53d 100644
--- a/grub-core/loader/arm64/linux.c
+++ b/grub-core/loader/arm64/linux.c
@@ -26,8 +26,8 @@ 
 #include <grub/mm.h>
 #include <grub/types.h>
 #include <grub/cpu/linux.h>
-#include <grub/cpu/fdtload.h>
 #include <grub/efi/efi.h>
+#include <grub/efi/fdtload.h>
 #include <grub/efi/memory.h>
 #include <grub/efi/pe32.h>
 #include <grub/i18n.h>
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index b7a5b17c9..d092a53ed 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -27,9 +27,9 @@ 
 #include <grub/misc.h>
 #include <grub/mm.h>
 #include <grub/types.h>
-#include <grub/cpu/fdtload.h>
 #include <grub/cpu/linux.h>
 #include <grub/efi/efi.h>
+#include <grub/efi/fdtload.h>
 #include <grub/efi/memory.h>
 #include <grub/efi/pe32.h>	/* required by struct xen_hypervisor_header */
 #include <grub/i18n.h>
diff --git a/grub-core/loader/arm64/fdt.c b/grub-core/loader/efi/fdt.c
similarity index 99%
rename from grub-core/loader/arm64/fdt.c
rename to grub-core/loader/efi/fdt.c
index bdc3a0c1f..9715afee0 100644
--- a/grub-core/loader/arm64/fdt.c
+++ b/grub-core/loader/efi/fdt.c
@@ -18,12 +18,12 @@ 
 
 #include <grub/fdt.h>
 #include <grub/mm.h>
-#include <grub/cpu/fdtload.h>
 #include <grub/err.h>
 #include <grub/dl.h>
 #include <grub/command.h>
 #include <grub/file.h>
 #include <grub/efi/efi.h>
+#include <grub/efi/fdtload.h>
 #include <grub/efi/memory.h>
 
 static void *loaded_fdt;
diff --git a/include/grub/arm64/fdtload.h b/include/grub/efi/fdtload.h
similarity index 100%
rename from include/grub/arm64/fdtload.h
rename to include/grub/efi/fdtload.h