# HG changeset patch
# User Jerone Young <[EMAIL PROTECTED]>
# Date 1205507804 18000
# Branch merge
# Node ID d96091321011ee86681f00bbaf72337ebc937791
# Parent  b573d2790e7813337bf26c76a5c773a59592da5d
Add libfdt support to qemu

This patch adds needed configuration options to compile in libfdt support
into qemu.

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>

diff --git a/qemu/Makefile.target b/qemu/Makefile.target
--- a/qemu/Makefile.target
+++ b/qemu/Makefile.target
@@ -555,6 +555,11 @@ ifdef CONFIG_VNC_TLS
 ifdef CONFIG_VNC_TLS
 CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
 LIBS += $(CONFIG_VNC_TLS_LIBS)
+endif
+
+ifdef CONFIG_LIBFDT
+LIBS += -lfdt
+DEPLIBS += libfdt.a
 endif
 
 # SCSI layer
diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -112,6 +112,7 @@ uname_release=""
 uname_release=""
 curses="yes"
 cpu_emulation="yes"
+device_tree_support="no"
 
 # OS specific
 targetos=`uname -s`
@@ -345,6 +346,8 @@ for opt do
   ;;
   --disable-cpu-emulation) cpu_emulation="no"
   ;;
+  --enable-libfdt) device_tree_support="yes"
+  ;;
   *) echo "ERROR: unknown option $opt"; exit 1
   ;;
   esac
@@ -449,6 +452,7 @@ echo "  --enable-uname-release=R Return 
 echo "  --enable-uname-release=R Return R for uname -r in usermode emulation"
 echo "  --sparc_cpu=V            Build qemu for Sparc architecture v7, v8, 
v8plus, v8plusa, v9"
 echo "  --disable-cpu-emulation  disables use of qemu cpu emulation code"
+echo "  --enable-libfdt         enable libfdt support for device tree support"
 echo ""
 echo "NOTE: The object files are built at the place where configure is 
launched"
 exit 1
@@ -1186,6 +1190,10 @@ elif test "$target_cpu" = "ppcemb" ; the
   echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
   echo "#define TARGET_PPC 1" >> $config_h
   echo "#define TARGET_PPCEMB 1" >> $config_h
+  if test "$device_tree_support" = "yes" ; then
+      echo "#define CONFIG_LIBFDT 1" >> $config_h
+      echo "CONFIG_LIBFDT=1" >> $config_mak
+  fi
   configure_kvm
 elif test "$target_cpu" = "ppc64" ; then
   echo "TARGET_ARCH=ppc64" >> $config_mak

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to