From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 2 of 7] Add libfdt support to qemu Date: Sun, 16 Mar 2008 00:37:13 -0500 Message-ID: <47DCB209.10505@codemonkey.ws> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, kvm-ppc-devel@lists.sourceforge.net To: Jerone Young Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org 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 > # 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 > > 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 > ------------------------------------------------------------------------- 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/