From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4HVb-0002Xq-Ti for qemu-devel@nongnu.org; Wed, 22 Aug 2012 16:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4HVW-0004tZ-B6 for qemu-devel@nongnu.org; Wed, 22 Aug 2012 16:26:35 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:60360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4HVW-0004tM-6i for qemu-devel@nongnu.org; Wed, 22 Aug 2012 16:26:30 -0400 Received: from /spool/local by e1.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Aug 2012 16:26:27 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 465DE6E8039 for ; Wed, 22 Aug 2012 16:25:41 -0400 (EDT) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7MKPdox077704 for ; Wed, 22 Aug 2012 16:25:40 -0400 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7MKOTig024491 for ; Wed, 22 Aug 2012 14:24:29 -0600 From: Anthony Liguori Date: Wed, 22 Aug 2012 15:24:27 -0500 Message-Id: <1345667067-24298-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Markus Armbruster This allows any QEMU binary to be executed with: $QEMU_BINARY -qmp stdio Without errors from missing options that are required by various boards. This also provides a mode that we can use in the future to construct machines entirely through QMP commands. Cc: Daniel Berrange Cc: Markus Armbruster Signed-off-by: Anthony Liguori --- hw/Makefile.objs | 2 ++ hw/null-machine.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-) create mode 100644 hw/null-machine.c diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 7f57ed5..6dfebd2 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -134,6 +134,8 @@ hw-obj-$(CONFIG_DP8393X) += dp8393x.o hw-obj-$(CONFIG_DS1225Y) += ds1225y.o hw-obj-$(CONFIG_MIPSNET) += mipsnet.o +hw-obj-y += null-machine.o + # Sound sound-obj-y = sound-obj-$(CONFIG_SB16) += sb16.o diff --git a/hw/null-machine.c b/hw/null-machine.c new file mode 100644 index 0000000..69910d3 --- /dev/null +++ b/hw/null-machine.c @@ -0,0 +1,40 @@ +/* + * Empty machine + * + * Copyright IBM, Corp. 2012 + * + * Authors: + * Anthony Liguori + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu-common.h" +#include "hw/hw.h" +#include "hw/boards.h" + +static void machine_none_init(ram_addr_t ram_size, + const char *boot_device, + const char *kernel_filename, + const char *kernel_cmdline, + const char *initrd_filename, + const char *cpu_model) +{ +} + +static QEMUMachine machine_none = { + .name = "none", + .desc = "empty machine", + .init = machine_none_init, + .max_cpus = 0, +}; + +static void register_machines(void) +{ + qemu_register_machine(&machine_none); +} + +machine_init(register_machines); + -- 1.7.5.4