From patchwork Sat May 3 20:20:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 345358 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 11C2F140147 for ; Sun, 4 May 2014 06:21:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5CDDB89007; Sat, 3 May 2014 20:21:39 +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 wXN+xTHXXSsH; Sat, 3 May 2014 20:21:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1B02F87BB4; Sat, 3 May 2014 20:21:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 000371BF966 for ; Sat, 3 May 2014 20:21:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EFFFC8AFB8 for ; Sat, 3 May 2014 20:21:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id euO-Jt8quYYh for ; Sat, 3 May 2014 20:21:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from loknar.toptech.com.ar (loknar.toptech.com.ar [78.46.79.162]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1927E8AE29 for ; Sat, 3 May 2014 20:21:33 +0000 (UTC) Received: from asgard (host14.181-1-250.telecom.net.ar [181.1.250.14]) (authenticated bits=0) by loknar.toptech.com.ar (8.14.8/8.14.8) with ESMTP id s43KLQnn005329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 3 May 2014 20:21:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1399148491; bh=YMCVrsURoYJSscjN4pFHScZCuOpvoVUXdO3Px4Dcf9g=; h=From:To:Cc:Subject:Date; b=jDV/q3HR7L4YsX9cplf7W/aKsg96qwEyMIfD6iWVzh4dprBRL9efOJvoXfzIsV97u x0uU/RfLfrk/tGEr09ofjPtWV/WIQelZGLzedOkeeD58MU4CQ9sdw49zDBWnqOlvL9 hmL5LsOXkv+s0iQH6+A4SVQ9BLNw/w5Ab48jnEAo= Received: by asgard (sSMTP sendmail emulation); Sat, 03 May 2014 17:20:15 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Sat, 3 May 2014 17:20:13 -0300 Message-Id: <1399148415-27648-1-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.98.1 at loknar X-Virus-Status: Clean Subject: [Buildroot] [PATCH 1/3] qemu-system: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Gustavo Zacarias --- package/Config.in.host | 1 + package/qemu-system/Config.in.host | 30 ++++++++++++++++++ package/qemu-system/qemu-system.mk | 64 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 package/qemu-system/Config.in.host create mode 100644 package/qemu-system/qemu-system.mk diff --git a/package/Config.in.host b/package/Config.in.host index c6997e9..4faaf60 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -13,6 +13,7 @@ source "package/mtools/Config.in.host" source "package/omap-u-boot-utils/Config.in.host" source "package/openocd/Config.in.host" source "package/parted/Config.in.host" +source "package/qemu-system/Config.in.host" source "package/sam-ba/Config.in.host" source "package/squashfs/Config.in.host" source "package/sunxi-tools/Config.in.host" diff --git a/package/qemu-system/Config.in.host b/package/qemu-system/Config.in.host new file mode 100644 index 0000000..b451ca6 --- /dev/null +++ b/package/qemu-system/Config.in.host @@ -0,0 +1,30 @@ +config BR2_PACKAGE_HOST_QEMU_SYSTEM + bool "host qemu-system" + # Supported system target architectures + depends on BR2_arm || BR2_i386 || BR2_microblaze || BR2_mips \ + || BR2_mips64 || BR2_mips64el || BR2_mipsel || BR2_powerpc \ + || BR2_sh4 || BR2_sh4eb || BR2_sparc || BR2_x86_64 + help + QEMU is a generic and open source machine emulator and virtualizer. + + This option builds a system emulator for your selected architecture. + + http://www.qemu.org + +if BR2_PACKAGE_HOST_QEMU_SYSTEM + +config BR2_PACKAGE_HOST_QEMU_SYSTEM_VERSION + string "qemu version" + default "2.0.0" + help + QEMU version to use. + Sometimes the latest version is broken for some specific + architecture or target machine. + +config BR2_PACKAGE_HOST_QEMU_SYSTEM_ARGS + string "qemu-system command arguments" + help + Arguments to be used for your target host-qemu-system to run + via "make qemu-system-run". + +endif diff --git a/package/qemu-system/qemu-system.mk b/package/qemu-system/qemu-system.mk new file mode 100644 index 0000000..4a57c8b --- /dev/null +++ b/package/qemu-system/qemu-system.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# qemu-system +# +################################################################################ + +HOST_QEMU_SYSTEM_VERSION = $(call qstrip,$(BR2_PACKAGE_HOST_QEMU_SYSTEM_VERSION)) +HOST_QEMU_SYSTEM_SOURCE = qemu-$(HOST_QEMU_SYSTEM_VERSION).tar.bz2 +QEMU_SYSTEM_SITE = http://wiki.qemu-project.org/download +QEMU_SYSTEM_LICENSE = GPLv2 LGPLv2.1 MIT BSD-3c BSD-2c Others/BSD-1c +QEMU_SYSTEM_LICENSE_FILES = COPYING COPYING.LIB +# NOTE: there is no top-level license file for non-(L)GPL licenses; +# the non-(L)GPL license texts are specified in the affected +# individual source files. + +# host-python required to ensure we use a 2.x series since 3.x isn't supported +HOST_QEMU_SYSTEM_DEPENDENCIES = host-flex host-bison host-libglib2 \ + host-pixman host-pkgconf host-python host-zlib + +HOST_QEMU_SYSTEM_ARCH = $(ARCH) +ifeq ($(HOST_QEMU_SYSTEM_ARCH),i486) + HOST_QEMU_SYSTEM_ARCH = i386 +endif +ifeq ($(HOST_QEMU_SYSTEM_ARCH),i586) + HOST_QEMU_SYSTEM_ARCH = i386 +endif +ifeq ($(HOST_QEMU_SYSTEM_ARCH),i686) + HOST_QEMU_SYSTEM_ARCH = i386 +endif +ifeq ($(BR2_microblazeel),y) + HOST_QEMU_SYSTEM_ARCH = microblazeel +endif +ifeq ($(HOST_QEMU_SYSTEM_ARCH),powerpc) + HOST_QEMU_SYSTEM_ARCH = ppc +endif +HOST_QEMU_SYSTEM_TARGETS=$(HOST_QEMU_SYSTEM_ARCH)-softmmu + +define HOST_QEMU_SYSTEM_CONFIGURE_CMDS + (cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure \ + --target-list="$(HOST_QEMU_SYSTEM_TARGETS)" \ + --prefix="$(HOST_DIR)/usr" \ + --cc="$(HOSTCC)" \ + --host-cc="$(HOSTCC)" \ + --extra-cflags="$(HOST_CFLAGS)" \ + --extra-ldflags="$(HOST_LDFLAGS)" \ + --with-system-pixman \ + ) +endef + +define HOST_QEMU_SYSTEM_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_QEMU_SYSTEM_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +$(eval $(host-generic-package)) + +# System emulation binary used here or somewhere else +QEMU_SYSTEM = $(HOST_DIR)/usr/bin/qemu-system-$(HOST_QEMU_SYSTEM_ARCH) + +qemu-system-run: all + $(QEMU_SYSTEM) $(call qstrip,$(BR2_PACKAGE_HOST_QEMU_SYSTEM_ARGS))