From patchwork Thu Aug 25 06:41:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peter A. G. Crosthwaite" X-Patchwork-Id: 111480 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 D97CCB6EE8 for ; Thu, 25 Aug 2011 17:11:36 +1000 (EST) Received: from localhost ([::1]:60619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwU6A-0004cW-BI for incoming@patchwork.ozlabs.org; Thu, 25 Aug 2011 03:11:34 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwTfj-0002Sd-SO for qemu-devel@nongnu.org; Thu, 25 Aug 2011 02:44:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwTfh-00043y-Ub for qemu-devel@nongnu.org; Thu, 25 Aug 2011 02:44:15 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:43091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwTfh-00040Q-Pi for qemu-devel@nongnu.org; Thu, 25 Aug 2011 02:44:13 -0400 Received: by mail-gx0-f173.google.com with SMTP id 26so1693111gxk.4 for ; Wed, 24 Aug 2011 23:44:13 -0700 (PDT) Received: by 10.236.77.202 with SMTP id d50mr14150954yhe.120.1314254653466; Wed, 24 Aug 2011 23:44:13 -0700 (PDT) Received: from localhost ([124.148.20.9]) by mx.google.com with ESMTPS id j45sm477113yhe.22.2011.08.24.23.44.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Aug 2011 23:44:12 -0700 (PDT) From: "Peter A. G. Crosthwaite" To: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com, edgar.iglesias@gmail.com, john.williams@petalogix.com, michal.simek@petalogix.com Date: Thu, 25 Aug 2011 16:41:17 +1000 Message-Id: <1314254480-22438-12-git-send-email-peter.crosthwaite@petalogix.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1314254480-22438-1-git-send-email-peter.crosthwaite@petalogix.com> References: <1314254480-22438-1-git-send-email-peter.crosthwaite@petalogix.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.173 Cc: "Peter A. G. Crosthwaite" Subject: [Qemu-devel] [RFC PATCH V1 11/14] vl.c: Added hw_dtb/kern_dtb command line opts 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 Added command line options to specify device-tree-blobs for fdt generic platforms. Different dtbs can be used for software and harware by using both options concurrently Signed-off-by: Peter A. G. Crosthwaite --- qemu-options.hx | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sysemu.h | 4 ++++ vl.c | 19 +++++++++++++++++++ 3 files changed, 70 insertions(+), 0 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index d86815d..b778471 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2444,6 +2444,53 @@ Specify a trace file to log output traces to. ETEXI #endif +HXCOMM Flat device-tree commandline options +DEFHEADING() +DEFHEADING(Flat device-tree options:) +STEXI +@table @option +ETEXI + +DEF("hw-dtb", HAS_ARG, QEMU_OPTION_hwdtb, \ + "-hw-dtb dtb flat device tree describing hardware system\n", + QEMU_ARCH_MICROBLAZE | QEMU_ARCH_PPC) +STEXI +@item -hw-dtb @var{hw-dtb} +use @var{hw-dtb} as flat device tree describing hardware system +ETEXI + +DEF("kern-dtb", HAS_ARG, QEMU_OPTION_kerndtb, \ + "-kern-dtb dtb flat device tree passed to kernel boot\n", + QEMU_ARCH_MICROBLAZE | QEMU_ARCH_PPC) +STEXI +@item -kern-dtb @var{kern-dtb} +use @var{kern-dtb} as flat device tree passed to kernel boot +ETEXI + +STEXI +@end table +ETEXI + + +HXCOMM AXIS device specific commandline options +DEFHEADING() +DEFHEADING(AXIS device options:) +STEXI +@table @option +ETEXI + +DEF("bootsel", HAS_ARG, QEMU_OPTION_bootsel, \ + "-bootsel Reset value of boot select register\n", + QEMU_ARCH_CRIS | QEMU_ARCH_MIPS | QEMU_ARCH_ARM) +STEXI +@item -bootsel @var{bootsel} +use @var{bootsel} as the reset value for the bootsel register. +ETEXI + +STEXI +@end table +ETEXI + HXCOMM This is the last statement. Insert new options before this line! STEXI @end table diff --git a/sysemu.h b/sysemu.h index 9090457..2108a67 100644 --- a/sysemu.h +++ b/sysemu.h @@ -122,6 +122,10 @@ extern int no_quit; extern int no_shutdown; extern int semihosting_enabled; extern int old_param; + +extern const char *qemu_hwdtb; +extern const char *qemu_kerndtb; + extern int boot_menu; extern uint8_t *boot_splash_filedata; extern int boot_splash_filedata_size; diff --git a/vl.c b/vl.c index 9cd67a3..38cc153 100644 --- a/vl.c +++ b/vl.c @@ -227,6 +227,10 @@ int alt_grab = 0; int ctrl_grab = 0; unsigned int nb_prom_envs = 0; const char *prom_envs[MAX_PROM_ENVS]; +#ifdef CONFIG_FDT +const char *qemu_hwdtb = NULL; +const char *qemu_kerndtb = NULL; +#endif int boot_menu; uint8_t *boot_splash_filedata; int boot_splash_filedata_size; @@ -2928,6 +2932,21 @@ int main(int argc, char **argv, char **envp) } xen_mode = XEN_ATTACH; break; +#ifdef CONFIG_FDT + case QEMU_OPTION_hwdtb: + qemu_hwdtb = optarg; + break; + case QEMU_OPTION_kerndtb: + qemu_kerndtb = optarg; + break; +#else + case QEMU_OPTION_hwdtb: + case QEMU_OPTION_kerndtb: + printf("Option %s not supported by this qemu build" + " (libfdt missing).\n", popt->name); + exit(1); + break; +#endif #ifdef CONFIG_SIMPLE_TRACE case QEMU_OPTION_trace: opts = qemu_opts_parse(qemu_find_opts("trace"), optarg, 0);