qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version
@ 2015-05-18 10:59 Thomas Huth
  2015-05-18 10:59 ` [Qemu-devel] [PATCH 1/2] dtc: Update dtc / libfdt submodule to version 1.4.0 Thomas Huth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2015-05-18 10:59 UTC (permalink / raw)
  To: qemu-ppc, Alexander Graf; +Cc: mdroth, aik, qemu-devel, afaerber, David Gibson

The patch "spapr_drc: initial implementation of sPAPRDRConnector device"
requires the function fdt_get_property_by_offset() from libfdt, which
is only properly exported there since version 1.4.0. So let's make
sure that we require at least version 1.4.0 of libfdt nowadays.

Thomas Huth (2):
  dtc: Update dtc / libfdt submodule to version 1.4.0
  configure: Check for libfdt version 1.4.0

 configure | 6 ++++--
 dtc       | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 1/2] dtc: Update dtc / libfdt submodule to version 1.4.0
  2015-05-18 10:59 [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Thomas Huth
@ 2015-05-18 10:59 ` Thomas Huth
  2015-05-18 10:59 ` [Qemu-devel] [PATCH 2/2] configure: Check for libfdt " Thomas Huth
  2015-05-18 13:09 ` [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2015-05-18 10:59 UTC (permalink / raw)
  To: qemu-ppc, Alexander Graf; +Cc: mdroth, aik, qemu-devel, afaerber, David Gibson

Since some recent patches require libfdt version 1.4.0,
let's update the dtc submodule to this version.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 dtc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dtc b/dtc
index bc895d6..65cc4d2 160000
--- a/dtc
+++ b/dtc
@@ -1 +1 @@
-Subproject commit bc895d6d09695d05ceb8b52486ffe861d6cfbdde
+Subproject commit 65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 2/2] configure: Check for libfdt version 1.4.0
  2015-05-18 10:59 [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Thomas Huth
  2015-05-18 10:59 ` [Qemu-devel] [PATCH 1/2] dtc: Update dtc / libfdt submodule to version 1.4.0 Thomas Huth
@ 2015-05-18 10:59 ` Thomas Huth
  2015-05-18 13:09 ` [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2015-05-18 10:59 UTC (permalink / raw)
  To: qemu-ppc, Alexander Graf; +Cc: mdroth, aik, qemu-devel, afaerber, David Gibson

Some recent patches require a function from libfdt version 1.4.0,
so we should check for this version during the configure step
already. Unfortunately, there does not seem to be a proper #define
for the version number in the libfdt headers. So alternatively,
we check for the availability of the required function
fdt_get_property_by_offset() instead instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 1f0f485..cee997f 100755
--- a/configure
+++ b/configure
@@ -3102,9 +3102,11 @@ fi
 if test "$fdt" != "no" ; then
   fdt_libs="-lfdt"
   # explicitly check for libfdt_env.h as it is missing in some stable installs
+  # and test for required functions to make sure we are on a version >= 1.4.0
   cat > $TMPC << EOF
+#include <libfdt.h>
 #include <libfdt_env.h>
-int main(void) { return 0; }
+int main(void) { fdt_get_property_by_offset(0, 0, 0); return 0; }
 EOF
   if compile_prog "" "$fdt_libs" ; then
     # system DTC is good - use it
@@ -3122,7 +3124,7 @@ EOF
     fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
   elif test "$fdt" = "yes" ; then
     # have neither and want - prompt for system/submodule install
-    error_exit "DTC (libfdt) not present. Your options:" \
+    error_exit "DTC (libfdt) version >= 1.4.0 not present. Your options:" \
         "  (1) Preferred: Install the DTC (libfdt) devel package" \
         "  (2) Fetch the DTC submodule, using:" \
         "      git submodule update --init dtc"
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version
  2015-05-18 10:59 [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Thomas Huth
  2015-05-18 10:59 ` [Qemu-devel] [PATCH 1/2] dtc: Update dtc / libfdt submodule to version 1.4.0 Thomas Huth
  2015-05-18 10:59 ` [Qemu-devel] [PATCH 2/2] configure: Check for libfdt " Thomas Huth
@ 2015-05-18 13:09 ` Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2015-05-18 13:09 UTC (permalink / raw)
  To: Thomas Huth, qemu-ppc; +Cc: mdroth, aik, qemu-devel, afaerber, David Gibson

On 05/18/2015 12:59 PM, Thomas Huth wrote:
> The patch "spapr_drc: initial implementation of sPAPRDRConnector device"
> requires the function fdt_get_property_by_offset() from libfdt, which
> is only properly exported there since version 1.4.0. So let's make
> sure that we require at least version 1.4.0 of libfdt nowadays.

Thanks, applied to ppc-next (before the spapr merge).


Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-18 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-18 10:59 [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Thomas Huth
2015-05-18 10:59 ` [Qemu-devel] [PATCH 1/2] dtc: Update dtc / libfdt submodule to version 1.4.0 Thomas Huth
2015-05-18 10:59 ` [Qemu-devel] [PATCH 2/2] configure: Check for libfdt " Thomas Huth
2015-05-18 13:09 ` [Qemu-devel] [PATCH v2 0/2] ppc: Require libfdt 1.4.0 as minimum version Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).