From patchwork Tue Oct 7 22:38:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 397471 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 0B9A6140120 for ; Wed, 8 Oct 2014 09:38:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CE20295A62; Tue, 7 Oct 2014 22:38:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LFfbA13Jz3UY; Tue, 7 Oct 2014 22:38:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C835795A4B; Tue, 7 Oct 2014 22:38:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C18E61C1117 for ; Tue, 7 Oct 2014 22:38:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BD4C5A2428 for ; Tue, 7 Oct 2014 22:38:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rDLgyhTZaDG5 for ; Tue, 7 Oct 2014 22:38:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 03CD6A2427 for ; Tue, 7 Oct 2014 22:38:45 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id hi2so9278763wib.15 for ; Tue, 07 Oct 2014 15:38:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=oA+Xh6DffEdsoXp5XmKr8DTgqPoo21ceBt9s4HbqpaE=; b=p2N7uuTldVabUAOEU3+b0y+IVVIDazknHeRd3Lox9Fv76dz0MHytCgmvNSZrRn3xO9 VcxWRl65AMWzHQ+eOhNY+sQQzg2D+ZuNqfOKgVQysa7jNRbzAp3jysjzsBczhQpUUkFm zz0bBta157A1dquctrQIxUapLCvIlrF5LvufNpEOOM9jAyFC1bu+QMnFic+PILA6EcKo YJnQNX3wlrLKiDVx+J9gwk1I1xF0m1uYDBfKEplpsAtyN1xpZ3gxavvUoVo4HThbKHxV INzeTgc2u4QW5U6D6xAgOPzkeQ6y8x54AV0l503u0u3g58gCvrBoXHaxyw20ZU8Qg0n/ gO/g== X-Received: by 10.181.27.132 with SMTP id jg4mr7892745wid.28.1412721524473; Tue, 07 Oct 2014 15:38:44 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id lp8sm16342311wic.17.2014.10.07.15.38.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Oct 2014 15:38:43 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Wed, 8 Oct 2014 00:38:12 +0200 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH 03/30] package/qemu: build for the target (i386 or x86_64 only) X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Untested for other architectures, so only enabled for known-working ones. We explicitly disable all features that depends on other packages, for now. Such features will be added one by one in the next patches. Features that do not rely on external packages are explicitly enabled to catch the dependencies on toolchain features early. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni --- package/Config.in | 1 + package/qemu/Config.in | 26 ++++++++++++++++++ package/qemu/qemu.mk | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 package/qemu/Config.in diff --git a/package/Config.in b/package/Config.in index 2dbe6f8..fe3e03c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -926,6 +926,7 @@ menu "Miscellaneous" source "package/haveged/Config.in" source "package/mcrypt/Config.in" source "package/mobile-broadband-provider-info/Config.in" + source "package/qemu/Config.in" source "package/shared-mime-info/Config.in" source "package/snowball-init/Config.in" source "package/sound-theme-borealis/Config.in" diff --git a/package/qemu/Config.in b/package/qemu/Config.in new file mode 100644 index 0000000..d323305 --- /dev/null +++ b/package/qemu/Config.in @@ -0,0 +1,26 @@ +comment "QEMU requires a toolchain with threads" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_QEMU + bool "QEMU" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_ZLIB + help + QEMU is a generic and open source machine emulator and virtualizer. + + When used as a machine emulator, QEMU can run OSes and programs made + for one machine (e.g. an ARM board) on a different machine (e.g. + your own PC). By using dynamic translation, it achieves very good + performance. + + When used as a virtualizer, QEMU achieves near native performances + by executing the guest code directly on the host CPU. QEMU supports + virtualization when executing under the Xen hypervisor or using the + KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, + server and embedded PowerPC, and S390 guests. + + http://qemu.org/ diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk index 0af07d9..d6ccc08 100644 --- a/package/qemu/qemu.mk +++ b/package/qemu/qemu.mk @@ -82,3 +82,75 @@ $(eval $(host-generic-package)) # variable used by other packages QEMU_USER = $(HOST_DIR)/usr/bin/qemu-$(HOST_QEMU_ARCH) + +#------------------------------------------------------------- +# Target-qemu + +QEMU_DEPENDENCIES = host-pkgconf host-python libglib2 zlib pixman + +# Need the LIBS variable because librt and libm are +# not automatically pulled. :-( +QEMU_LIBS = -lrt -lm + +QEMU_OPTS = + +QEMU_VARS = \ + LIBTOOL=$(HOST_DIR)/usr/bin/libtool \ + PYTHON=$(HOST_DIR)/usr/bin/python \ + PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages + +define QEMU_CONFIGURE_CMDS + ( cd $(@D); \ + LIBS='$(QEMU_LIBS)' \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + $(QEMU_VARS) \ + ./configure \ + --prefix=/usr \ + --cross-prefix=$(TARGET_CROSS) \ + --with-system-pixman \ + --audio-drv-list= \ + --enable-kvm \ + --enable-attr \ + --enable-vhost-net \ + --enable-system \ + --enable-linux-user \ + --disable-bsd-user \ + --disable-xen \ + --disable-slirp \ + --disable-sdl \ + --disable-vnc \ + --disable-virtfs \ + --disable-brlapi \ + --disable-curses \ + --disable-curl \ + --disable-fdt \ + --disable-bluez \ + --disable-guest-base \ + --disable-uuid \ + --disable-vde \ + --disable-linux-aio \ + --disable-cap-ng \ + --disable-docs \ + --disable-spice \ + --disable-rbd \ + --disable-libiscsi \ + --disable-usb-redir \ + --disable-smartcard-nss \ + --disable-strip \ + --disable-seccomp \ + --disable-sparse \ + --disable-tools \ + $(QEMU_OPTS) \ + ) +endef + +define QEMU_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QEMU_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(QEMU_MAKE_ENV) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package))