[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH V1 11/14] vl.c: Added hw_dtb/kern_dtb command li
From: |
Peter A. G. Crosthwaite |
Subject: |
[Qemu-devel] [RFC PATCH V1 11/14] vl.c: Added hw_dtb/kern_dtb command line opts |
Date: |
Thu, 25 Aug 2011 16:41:17 +1000 |
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 <address@hidden>
---
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
address@hidden @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
address@hidden -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
address@hidden -kern-dtb @var{kern-dtb}
+use @var{kern-dtb} as flat device tree passed to kernel boot
+ETEXI
+
+STEXI
address@hidden table
+ETEXI
+
+
+HXCOMM AXIS device specific commandline options
+DEFHEADING()
+DEFHEADING(AXIS device options:)
+STEXI
address@hidden @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
address@hidden -bootsel @var{bootsel}
+use @var{bootsel} as the reset value for the bootsel register.
+ETEXI
+
+STEXI
address@hidden 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);
--
1.7.3.2
- [Qemu-devel] [RFC PATCH V1 13/14] microblaze: Add an MSR_PVR constant and use it., (continued)
- [Qemu-devel] [RFC PATCH V1 09/14] xilinx_intc: Added fdt generic platform support, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 10/14] xilinx_ethlite: Added fdt generic platform support, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 08/14] xilinx_timer: Added fdt_generic platform support, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 11/14] vl.c: Added hw_dtb/kern_dtb command line opts,
Peter A. G. Crosthwaite <=
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Anthony Liguori, 2011/08/25
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Peter Crosthwaite, 2011/08/25
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Paolo Bonzini, 2011/08/25
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Anthony Liguori, 2011/08/25
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Edgar E. Iglesias, 2011/08/25
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Anthony Liguori, 2011/08/25
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Edgar E. Iglesias, 2011/08/25
- Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Anthony Liguori, 2011/08/25