From patchwork Fri Sep 16 18:57:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Yoder X-Patchwork-Id: 115024 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C3434B70BF for ; Sat, 17 Sep 2011 05:05:56 +1000 (EST) Received: from localhost ([::1]:55225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4djT-0008GJ-Q8 for incoming@patchwork.ozlabs.org; Fri, 16 Sep 2011 15:05:51 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4djN-0008GB-MA for qemu-devel@nongnu.org; Fri, 16 Sep 2011 15:05:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4djM-0005Ti-Fd for qemu-devel@nongnu.org; Fri, 16 Sep 2011 15:05:45 -0400 Received: from va3ehsobe005.messaging.microsoft.com ([216.32.180.31]:45672 helo=VA3EHSOBE005.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4djM-0005TK-Cd for qemu-devel@nongnu.org; Fri, 16 Sep 2011 15:05:44 -0400 Received: from mail6-va3-R.bigfish.com (10.7.14.239) by VA3EHSOBE005.bigfish.com (10.7.40.25) with Microsoft SMTP Server id 14.1.225.22; Fri, 16 Sep 2011 19:05:42 +0000 Received: from mail6-va3 (localhost.localdomain [127.0.0.1]) by mail6-va3-R.bigfish.com (Postfix) with ESMTP id 16082658134; Fri, 16 Sep 2011 19:05:41 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h62h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail6-va3 (localhost.localdomain [127.0.0.1]) by mail6-va3 (MessageSwitch) id 131619988934725_20197; Fri, 16 Sep 2011 19:04:49 +0000 (UTC) Received: from VA3EHSMHS010.bigfish.com (unknown [10.7.14.251]) by mail6-va3.bigfish.com (Postfix) with ESMTP id 85A4096805A; Fri, 16 Sep 2011 19:04:47 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS010.bigfish.com (10.7.99.20) with Microsoft SMTP Server (TLS) id 14.1.225.22; Fri, 16 Sep 2011 19:04:29 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.323.7; Fri, 16 Sep 2011 14:04:28 -0500 Received: from localhost.am.freescale.net (udp128132uds.am.freescale.net [10.82.121.72]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p8GJ4RVW005938; Fri, 16 Sep 2011 14:04:27 -0500 (CDT) From: Stuart Yoder To: , Date: Fri, 16 Sep 2011 13:57:54 -0500 Message-ID: <1316199474-30199-1-git-send-email-stuart.yoder@freescale.com> X-Mailer: git-send-email 1.7.3.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) X-Received-From: 216.32.180.31 Cc: qemu-devel@nongnu.org, Stuart Yoder Subject: [Qemu-devel] [PATCH] support compiling and installing DTBs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Stuart Yoder also adds configure options to enable/disable installing DTBs and override location of dtc Signed-off-by: Stuart Yoder --- Makefile | 17 +++++++++++++++-- configure | 24 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7e9382f..1fe0a0a 100644 --- a/Makefile +++ b/Makefile @@ -245,7 +245,6 @@ ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \ pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \ pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ -mpc8544ds.dtb \ multiboot.bin linuxboot.bin \ s390-zipl.rom \ spapr-rtas.bin slof.bin @@ -253,6 +252,20 @@ else BLOBS= endif +ifdef INSTALL_DTBS +DTBS=$(SRC_PATH)/pc-bios/mpc8544ds.dtb + +%.dtb: %.dts + $(call quiet-command,$(DTC) -I dts -O dtb -b 0 -o $@ $<, " DTC $@") + +install-dtbs: $(DTBS) + $(INSTALL_DIR) "$(DESTDIR)$(datadir)" + set -e; for x in $(DTBS); do \ + $(INSTALL_DATA) $$x "$(DESTDIR)$(datadir)"; \ + done + +endif + install-doc: $(DOCS) $(INSTALL_DIR) "$(DESTDIR)$(docdir)" $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" @@ -267,7 +280,7 @@ install-sysconfig: $(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu" $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu" -install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig +install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig $(if $(INSTALL_DTBS),install-dtbs) $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ifneq ($(TOOLS),) $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" diff --git a/configure b/configure index 0875f95..7d9447f 100755 --- a/configure +++ b/configure @@ -182,6 +182,7 @@ usb_redir="" opengl="" zlib="yes" guest_agent="yes" +dtc=dtc # parse CC options first for opt do @@ -728,6 +729,12 @@ for opt do ;; --disable-blobs) blobs="no" ;; + --enable-dtbs) install_dtbs="yes" + ;; + --disable-dtbs) install_dtbs="no" + ;; + --with-dtc=*) dtc=$optarg + ;; --with-pkgversion=*) pkgversion=" ($optarg)" ;; --disable-docs) docs="no" @@ -771,6 +778,13 @@ for opt do esac done +# set default for $install_dtbs, may be overriden by command line +if has $dtc; then + install_dtbs="yes" +else + install_dtbs="no" +fi + # # If cpu ~= sparc and sparc_cpu hasn't been defined, plug in the right # QEMU_CFLAGS/LDFLAGS (assume sparc_v8plus for 32-bit and sparc_v9 for 64-bit) @@ -1028,6 +1042,9 @@ echo " --enable-linux-aio enable Linux AIO support" echo " --disable-attr disables attr and xattr support" echo " --enable-attr enable attr and xattr support" echo " --disable-blobs disable installing provided firmware blobs" +echo " --enable-dtbs build/install provided device trees (requires dtc)" +echo " --disable-dtbs don't build/install provided device trees" +echo " --with-dtc full path to device tree compiler (overrides default)" echo " --enable-docs enable documentation build" echo " --disable-docs disable documentation build" echo " --disable-vhost-net disable vhost-net acceleration support" @@ -2713,6 +2730,7 @@ echo "vde support $vde" echo "Linux AIO support $linux_aio" echo "ATTR/XATTR support $attr" echo "Install blobs $blobs" +echo "Install dtbs $install_dtbs" echo "KVM support $kvm" echo "fdt support $fdt" echo "preadv support $preadv" @@ -2982,6 +3000,9 @@ fi if test "$blobs" = "yes" ; then echo "INSTALL_BLOBS=yes" >> $config_host_mak fi +if test "$install_dtbs" = "yes" ; then + echo "INSTALL_DTBS=yes" >> $config_host_mak +fi if test "$iovec" = "yes" ; then echo "CONFIG_IOVEC=y" >> $config_host_mak fi @@ -3122,6 +3143,9 @@ echo "ARLIBS_END=$arlibs_end" >> $config_host_mak echo "LIBS+=$LIBS" >> $config_host_mak echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak +if test "$install_dtbs" = "yes" ; then + echo "DTC=$dtc" >> $config_host_mak +fi echo "LIBS_QGA+=$libs_qga" >> $config_host_mak # generate list of library paths for linker script