[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [PATCH 40/40] mini-os: compile the dtc submodule for arm64



Hi Shijie,

On 07/11/17 08:36, Huang Shijie wrote:
On Mon, Nov 06, 2017 at 06:11:45PM +0000, Julien Grall wrote:
On 03/11/17 03:12, Huang Shijie wrote:
This patch changes the makefile, make it to compile the
DTC submodule for arm64 code.

This patch also creates .gitmodules for "dtc".

Mini-OS community does not control the DTC git repository. This means that a
patch can be added in dtc introducing a breakage and will appear in released
Mini-OS because master is cloned.

To prevent that we at least need to give a commit/tag to use for stable
release.
okay, I will drop this patch...

[...]


Change-Id: Iea6c98194529bac7af44184fa3fedfef24a12474
Jira: ENTOS-247
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
   .gitmodules |  3 +++
   Makefile    | 15 +++++++++++++++
   2 files changed, 18 insertions(+)
   create mode 100644 .gitmodules

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..2d9e0ac
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "dtc"]
+       path = dtc
+       url = git://git.kernel.org/pub/scm/utils/dtc/dtc.git
diff --git a/Makefile b/Makefile
index a03621e..afa14a8 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,13 @@ include Config.mk
   # Symlinks and headers that must be created before building the C files
   GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os 
include/$(TARGET_ARCH_FAM)/mini-os
+ifeq ($(TARGET_ARCH_FAM),arm)
+GENERATED_HEADERS += include/fdt.h include/libfdt.h
+
+include/%.h: dtc/libfdt/%.h
+       ln -s ../$^ $@
+endif
+
   EXTRA_DEPS += $(GENERATED_HEADERS)
   # Include common mini-os makerules.
@@ -36,6 +43,14 @@ TARGET := mini-os
   # Subdirectories common to mini-os
   SUBDIRS := lib xenbus console
+ifeq ($(TARGET_ARCH_FAM),arm)
+SUBDIRS += dtc/libfdt
+# Device tree support
+FDT_SRC := dtc/libfdt/fdt.c dtc/libfdt/fdt_ro.c dtc/libfdt/fdt_strerror.c

I don't see any reason to only include a couple of files from libfdt. libfdt
We use some FDT functions, how can we get them if we do not include
them?

I haven't asked to not use libfdt but building it differently. There are many way to do it nicely avoiding such hack.

developpers have been clever and provide a partial Makefile to add every
files.
Could you give more detail about this? I will try it.

Look at Makefile.libfdt.

Cheers,

--
Julien Grall

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.