|
|
5593c8 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
5593c8 |
From: Peter Jones <pjones@redhat.com>
|
|
|
5593c8 |
Date: Thu, 11 Jul 2019 13:01:41 +0200
|
|
|
5593c8 |
Subject: [PATCH] Rework how the fdt command builds.
|
|
|
5593c8 |
|
|
|
5593c8 |
Trying to avoid all variants of:
|
|
|
5593c8 |
cat syminfo.lst | sort | gawk -f ../../grub-core/genmoddep.awk > moddep.lst || (rm -f moddep.lst; exit 1)
|
|
|
5593c8 |
grub_fdt_install in linux is not defined
|
|
|
5593c8 |
grub_fdt_load in linux is not defined
|
|
|
5593c8 |
grub_fdt_unload in linux is not defined
|
|
|
5593c8 |
grub_fdt_install in xen_boot is not defined
|
|
|
5593c8 |
grub_fdt_load in xen_boot is not defined
|
|
|
5593c8 |
grub_fdt_unload in xen_boot is not defined
|
|
|
5593c8 |
|
|
|
5593c8 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
5593c8 |
---
|
|
|
5593c8 |
grub-core/Makefile.core.def | 5 ++---
|
|
|
5593c8 |
grub-core/lib/fdt.c | 2 --
|
|
|
5593c8 |
grub-core/loader/efi/fdt.c | 2 ++
|
|
|
5593c8 |
include/grub/fdt.h | 4 ++++
|
|
|
5593c8 |
grub-core/Makefile.am | 1 +
|
|
|
5593c8 |
5 files changed, 9 insertions(+), 5 deletions(-)
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
|
|
5593c8 |
index c40170f2dd2..84a3d89de9a 100644
|
|
|
5593c8 |
--- a/grub-core/Makefile.core.def
|
|
|
5593c8 |
+++ b/grub-core/Makefile.core.def
|
|
|
5593c8 |
@@ -177,7 +177,6 @@ kernel = {
|
|
|
5593c8 |
arm_coreboot = kern/arm/coreboot/init.c;
|
|
|
5593c8 |
arm_coreboot = kern/arm/coreboot/timer.c;
|
|
|
5593c8 |
arm_coreboot = kern/arm/coreboot/coreboot.S;
|
|
|
5593c8 |
- arm_coreboot = lib/fdt.c;
|
|
|
5593c8 |
arm_coreboot = bus/fdt.c;
|
|
|
5593c8 |
arm_coreboot = term/ps2.c;
|
|
|
5593c8 |
arm_coreboot = term/arm/pl050.c;
|
|
|
5593c8 |
@@ -351,6 +350,8 @@ kernel = {
|
|
|
5593c8 |
riscv64 = kern/riscv/cache_flush.S;
|
|
|
5593c8 |
riscv64 = kern/riscv/dl.c;
|
|
|
5593c8 |
|
|
|
5593c8 |
+ fdt = lib/fdt.c;
|
|
|
5593c8 |
+
|
|
|
5593c8 |
emu = disk/host.c;
|
|
|
5593c8 |
emu = kern/emu/cache_s.S;
|
|
|
5593c8 |
emu = kern/emu/hostdisk.c;
|
|
|
5593c8 |
@@ -1825,7 +1826,6 @@ module = {
|
|
|
5593c8 |
riscv32 = loader/riscv/linux.c;
|
|
|
5593c8 |
riscv64 = loader/riscv/linux.c;
|
|
|
5593c8 |
emu = loader/emu/linux.c;
|
|
|
5593c8 |
- fdt = lib/fdt.c;
|
|
|
5593c8 |
|
|
|
5593c8 |
common = loader/linux.c;
|
|
|
5593c8 |
common = lib/cmdline.c;
|
|
|
5593c8 |
@@ -1836,7 +1836,6 @@ module = {
|
|
|
5593c8 |
module = {
|
|
|
5593c8 |
name = fdt;
|
|
|
5593c8 |
efi = loader/efi/fdt.c;
|
|
|
5593c8 |
- common = lib/fdt.c;
|
|
|
5593c8 |
enable = fdt;
|
|
|
5593c8 |
};
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c
|
|
|
5593c8 |
index 0d371c5633e..37e04bd69e7 100644
|
|
|
5593c8 |
--- a/grub-core/lib/fdt.c
|
|
|
5593c8 |
+++ b/grub-core/lib/fdt.c
|
|
|
5593c8 |
@@ -21,8 +21,6 @@
|
|
|
5593c8 |
#include <grub/mm.h>
|
|
|
5593c8 |
#include <grub/dl.h>
|
|
|
5593c8 |
|
|
|
5593c8 |
-GRUB_MOD_LICENSE ("GPLv3+");
|
|
|
5593c8 |
-
|
|
|
5593c8 |
#define FDT_SUPPORTED_VERSION 17
|
|
|
5593c8 |
|
|
|
5593c8 |
#define FDT_BEGIN_NODE 0x00000001
|
|
|
5593c8 |
diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
|
|
|
5593c8 |
index c86f283d756..c572415d38a 100644
|
|
|
5593c8 |
--- a/grub-core/loader/efi/fdt.c
|
|
|
5593c8 |
+++ b/grub-core/loader/efi/fdt.c
|
|
|
5593c8 |
@@ -27,6 +27,8 @@
|
|
|
5593c8 |
#include <grub/efi/memory.h>
|
|
|
5593c8 |
#include <grub/cpu/efi/memory.h>
|
|
|
5593c8 |
|
|
|
5593c8 |
+GRUB_MOD_LICENSE ("GPLv3+");
|
|
|
5593c8 |
+
|
|
|
5593c8 |
static void *loaded_fdt;
|
|
|
5593c8 |
static void *fdt;
|
|
|
5593c8 |
|
|
|
5593c8 |
diff --git a/include/grub/fdt.h b/include/grub/fdt.h
|
|
|
5593c8 |
index e609c7e4111..22b7c5463fc 100644
|
|
|
5593c8 |
--- a/include/grub/fdt.h
|
|
|
5593c8 |
+++ b/include/grub/fdt.h
|
|
|
5593c8 |
@@ -19,6 +19,8 @@
|
|
|
5593c8 |
#ifndef GRUB_FDT_HEADER
|
|
|
5593c8 |
#define GRUB_FDT_HEADER 1
|
|
|
5593c8 |
|
|
|
5593c8 |
+#if defined(__arm__) || defined(__aarch64__)
|
|
|
5593c8 |
+
|
|
|
5593c8 |
#include <grub/types.h>
|
|
|
5593c8 |
#include <grub/symbol.h>
|
|
|
5593c8 |
|
|
|
5593c8 |
@@ -144,4 +146,6 @@ int EXPORT_FUNC(grub_fdt_set_prop) (void *fdt, unsigned int nodeoffset, const ch
|
|
|
5593c8 |
grub_fdt_set_prop ((fdt), (nodeoffset), "reg", reg_64, 16); \
|
|
|
5593c8 |
})
|
|
|
5593c8 |
|
|
|
5593c8 |
+#endif /* defined(__arm__) || defined(__aarch64__) */
|
|
|
5593c8 |
+
|
|
|
5593c8 |
#endif /* ! GRUB_FDT_HEADER */
|
|
|
5593c8 |
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
|
|
5593c8 |
index f512573c0da..dd49939aaa9 100644
|
|
|
5593c8 |
--- a/grub-core/Makefile.am
|
|
|
5593c8 |
+++ b/grub-core/Makefile.am
|
|
|
5593c8 |
@@ -76,6 +76,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/sb.h
|
|
|
5593c8 |
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
|
|
|
5593c8 |
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
|
|
|
5593c8 |
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
|
|
|
5593c8 |
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdt.h
|
|
|
5593c8 |
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/file.h
|
|
|
5593c8 |
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fs.h
|
|
|
5593c8 |
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i18n.h
|