[kvm-devel] [PATCH 2 of 7] Add libfdt support to qemu

2008-03-19 Thread Jerone Young
# HG changeset patch
# User Jerone Young [EMAIL PROTECTED]
# Date 1205936671 18000
# Branch merge
# Node ID 5371763b15da496413c4e818fb87a92c5e66eb56
# Parent  444d6f28441da70464ba36e9c9ffd863d1c58403
Add libfdt support to qemu

This patch libfdt support into the qemu configuation script. There is a portion 
for libfdt probing that is has some XXX. The code commented out is how to 
properly do probing for a library, the issue is that with kvm-userspace we do 
not build libfdt before configuring qemu. So to pervent this check from failing 
everytime we just do a simple test with the libfdt header. Once this can be 
resolved elgantly then we can uncomment the place commented out and remove the 
lines below them.

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=
 
 # OS specific
 targetos=`uname -s`
@@ -345,6 +346,8 @@ for opt do
   ;;
   --disable-cpu-emulation) cpu_emulation=no
   ;;
+  --disable-libfdt) device_tree_support=no
+  ;;
   *) 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=VBuild qemu for Sparc architecture v7, v8, 
v8plus, v8plusa, v9
 echo   --disable-cpu-emulation  disables use of qemu cpu emulation code
+echo   --disable-libfdt disables use of libfdt support for device 
tree
 echo 
 echo NOTE: The object files are built at the place where configure is 
launched
 exit 1
@@ -732,6 +736,31 @@ else
   binsuffix=/bin
 fi
 
+##
+# libfdt probe
+#
+if test -z $device_tree_support -a \
+   $cpu = powerpc; then 
+  device_tree_support=no
+  cat  $TMPC  EOF
+#include libfdt.h
+/* XXX uncomment later when libfdt is built before this test */ 
+//int main(void) { void *fdt; return fdt_create(fdt, 1024); }
+int main (void) {return 0;}
+EOF
+# XXX for now do not try to link to libfdt and just check for header */
+# if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC -lfdt 2 /dev/null ; then
+  if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC 2 /dev/null; then 
+   device_tree_support=yes
+  else
+echo
+echo Error: Could not find libfdt
+echo Make sure to have the libfdt libs and headers installed.
+echo
+exit 1
+  fi
+fi
+
 echo Install prefix$prefix
 echo BIOS directory$prefix$datasuffix
 echo binary directory  $prefix$binsuffix
@@ -793,6 +822,9 @@ echo kqemu support $kqemu
 echo kqemu support $kqemu
 echo kvm support   $kvm
 echo CPU emulation $cpu_emulation
+if test $cpu = powerpc; then
+echo libfdt support$device_tree_support
+fi
 echo Documentation $build_docs
 [ ! -z $uname_release ]  \
 echo uname -r  $uname_release
@@ -1186,6 +1218,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/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH 2 of 7] Add libfdt support to qemu

2008-03-19 Thread Jerone Young
# HG changeset patch
# User Jerone Young [EMAIL PROTECTED]
# Date 1205952857 18000
# Branch merge
# Node ID be1aa50ab7de0a9e0441e46769e2a40a582fc3c0
# Parent  20c62a22bfaeca9f01439b96b7159b725fff0dcd
Add libfdt support to qemu

This patch libfdt support into the qemu configuation script. There is a portion 
for libfdt probing that is has some XXX. The code commented out is how to 
properly do probing for a library, the issue is that with kvm-userspace we do 
not build libfdt before configuring qemu. So to pervent this check from failing 
everytime we just do a simple test with the libfdt header. Once this can be 
resolved elgantly then we can uncomment the place commented out and remove the 
lines below them.

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=
 
 # OS specific
 targetos=`uname -s`
@@ -345,6 +346,8 @@ for opt do
   ;;
   --disable-cpu-emulation) cpu_emulation=no
   ;;
+  --disable-libfdt) device_tree_support=no
+  ;;
   *) 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=VBuild qemu for Sparc architecture v7, v8, 
v8plus, v8plusa, v9
 echo   --disable-cpu-emulation  disables use of qemu cpu emulation code
+echo   --disable-libfdt disables use of libfdt support for device 
tree
 echo 
 echo NOTE: The object files are built at the place where configure is 
launched
 exit 1
@@ -732,6 +736,31 @@ else
   binsuffix=/bin
 fi
 
+##
+# libfdt probe
+#
+if test -z $device_tree_support -a \
+   $cpu = powerpc; then 
+  device_tree_support=no
+  cat  $TMPC  EOF
+#include libfdt.h
+/* XXX uncomment later when libfdt is built before this test */ 
+//int main(void) { void *fdt; return fdt_create(fdt, 1024); }
+int main (void) {return 0;}
+EOF
+# XXX for now do not try to link to libfdt and just check for header */
+# if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC -lfdt 2 /dev/null ; then
+  if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC 2 /dev/null; then 
+   device_tree_support=yes
+  else
+echo
+echo Error: Could not find libfdt
+echo Make sure to have the libfdt libs and headers installed.
+echo
+exit 1
+  fi
+fi
+
 echo Install prefix$prefix
 echo BIOS directory$prefix$datasuffix
 echo binary directory  $prefix$binsuffix
@@ -793,6 +822,9 @@ echo kqemu support $kqemu
 echo kqemu support $kqemu
 echo kvm support   $kvm
 echo CPU emulation $cpu_emulation
+if test $cpu = powerpc; then
+echo libfdt support$device_tree_support
+fi
 echo Documentation $build_docs
 [ ! -z $uname_release ]  \
 echo uname -r  $uname_release
@@ -1186,6 +1218,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/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH 2 of 7] Add libfdt support to qemu

2008-03-19 Thread Jerone Young
# HG changeset patch
# User Jerone Young [EMAIL PROTECTED]
# Date 1205956788 18000
# Branch merge
# Node ID cd9ca907432cd14522809f098cc64d5a2b88705b
# Parent  af2d7781613d1bde6d0d48cf400b8b18ded19009
Add libfdt support to qemu

This patch libfdt support into the qemu configuation script. There is a portion 
for libfdt probing that is has some XXX. The code commented out is how to 
properly do probing for a library, the issue is that with kvm-userspace we do 
not build libfdt before configuring qemu. So to pervent this check from failing 
everytime we just do a simple test with the libfdt header. Once this can be 
resolved elgantly then we can uncomment the place commented out and remove the 
lines below them.

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=
 
 # OS specific
 targetos=`uname -s`
@@ -345,6 +346,8 @@ for opt do
   ;;
   --disable-cpu-emulation) cpu_emulation=no
   ;;
+  --disable-libfdt) device_tree_support=no
+  ;;
   *) 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=VBuild qemu for Sparc architecture v7, v8, 
v8plus, v8plusa, v9
 echo   --disable-cpu-emulation  disables use of qemu cpu emulation code
+echo   --disable-libfdt disables use of libfdt support for device 
tree
 echo 
 echo NOTE: The object files are built at the place where configure is 
launched
 exit 1
@@ -732,6 +736,31 @@ else
   binsuffix=/bin
 fi
 
+##
+# libfdt probe
+#
+if test -z $device_tree_support -a \
+   $cpu = powerpc; then 
+  device_tree_support=no
+  cat  $TMPC  EOF
+#include libfdt.h
+/* XXX uncomment later when libfdt is built before this test */ 
+//int main(void) { void *fdt; return fdt_create(fdt, 1024); }
+int main (void) {return 0;}
+EOF
+# XXX for now do not try to link to libfdt and just check for header */
+# if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC -lfdt 2 /dev/null ; then
+  if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC 2 /dev/null; then 
+   device_tree_support=yes
+  else
+echo
+echo Error: Could not find libfdt
+echo Make sure to have the libfdt libs and headers installed.
+echo
+exit 1
+  fi
+fi
+
 echo Install prefix$prefix
 echo BIOS directory$prefix$datasuffix
 echo binary directory  $prefix$binsuffix
@@ -793,6 +822,9 @@ echo kqemu support $kqemu
 echo kqemu support $kqemu
 echo kvm support   $kvm
 echo CPU emulation $cpu_emulation
+if test $cpu = powerpc; then
+echo libfdt support$device_tree_support
+fi
 echo Documentation $build_docs
 [ ! -z $uname_release ]  \
 echo uname -r  $uname_release
@@ -1186,6 +1218,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/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH 2 of 7] Add libfdt support to qemu

2008-03-18 Thread Jerone Young
# HG changeset patch
# User Jerone Young [EMAIL PROTECTED]
# Date 1205870472 18000
# Branch merge
# Node ID aa10b5ca2f11cd571ae8a06c1e92425b7f7407ca
# Parent  499d36637c8b4fcc0cd0008186d7974bb28369ab
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=
 
 # OS specific
 targetos=`uname -s`
@@ -345,6 +346,8 @@ for opt do
   ;;
   --disable-cpu-emulation) cpu_emulation=no
   ;;
+  --disable-libfdt) device_tree_support=no
+  ;;
   *) 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=VBuild qemu for Sparc architecture v7, v8, 
v8plus, v8plusa, v9
 echo   --disable-cpu-emulation  disables use of qemu cpu emulation code
+echo   --disable-libfdt disables use of libfdt support for device 
tree
 echo 
 echo NOTE: The object files are built at the place where configure is 
launched
 exit 1
@@ -732,6 +736,31 @@ else
   binsuffix=/bin
 fi
 
+##
+# libfdt probe
+#
+if test -z $device_tree_support -a \
+   $cpu = powerpc; then 
+  device_tree_support=no
+  cat  $TMPC  EOF
+#include libfdt.h
+/* XXX uncomment later when libfdt is built before this test */ 
+//int main(void) { void *fdt; return fdt_create(fdt, 1024); }
+int main (void) {return 0;}
+EOF
+# XXX for now do not try to link to libfdt and just check for header */
+# if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC -lfdt 2 /dev/null ; then
+  if $cc $ARCH_CFLAGS $CFLAGS $LDFLAGS -o $TMPE $TMPC 2 /dev/null; then 
+   device_tree_support=yes
+  else
+echo
+echo Error: Could not find libfdt
+echo Make sure to have the libfdt libs and headers installed.
+echo
+exit 1
+  fi
+fi
+
 echo Install prefix$prefix
 echo BIOS directory$prefix$datasuffix
 echo binary directory  $prefix$binsuffix
@@ -793,6 +822,9 @@ echo kqemu support $kqemu
 echo kqemu support $kqemu
 echo kvm support   $kvm
 echo CPU emulation $cpu_emulation
+if test $cpu = powerpc; then
+echo libfdt support$device_tree_support
+fi
 echo Documentation $build_docs
 [ ! -z $uname_release ]  \
 echo uname -r  $uname_release
@@ -1186,6 +1218,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/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 2 of 7] Add libfdt support to qemu

2008-03-15 Thread Anthony Liguori
Instead of having an explicit --enable-libfdt, it would be nicer to 
compile probe for it and then provide a --disable-libfdt option.  Then 
it Just Works without a special configure flag.

Regards,

Anthony Liguori

Jerone Young wrote:
 # 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=VBuild 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/vse012070mrt/direct/01/
 ___
 kvm-devel mailing list
 kvm-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/kvm-devel
   


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


[kvm-devel] [PATCH 2 of 7] Add libfdt support to qemu

2008-03-14 Thread Jerone Young
# 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=VBuild 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/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH 2 of 7] Add libfdt support to qemu

2008-03-11 Thread Jerone Young
# HG changeset patch
# User Jerone Young [EMAIL PROTECTED]
# Date 1205296680 18000
# Branch merge
# Node ID 36d2646a3c3d42021425febf3d14f0500ebbaace
# Parent  cb3ca3805e7735fffcf42032b917cc761b145fb3
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=VBuild 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/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel