From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrghp-0007W7-CW for qemu-devel@nongnu.org; Sun, 29 Jan 2012 21:10:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrgho-00012e-1u for qemu-devel@nongnu.org; Sun, 29 Jan 2012 21:10:53 -0500 Received: from mail-yx0-f173.google.com ([209.85.213.173]:51217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrghn-00012a-Ve for qemu-devel@nongnu.org; Sun, 29 Jan 2012 21:10:52 -0500 Received: by yenl8 with SMTP id l8so1991236yen.4 for ; Sun, 29 Jan 2012 18:10:50 -0800 (PST) Message-ID: <4F25FC27.1090807@codemonkey.ws> Date: Sun, 29 Jan 2012 20:10:47 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <75020d27a76d9b884a9c40d8c6ec81b525ab96a9.1327302677.git.peter.crosthwaite@petalogix.com> <4F1E5C49.4030604@suse.de> <4F1EF705.30900@weilnetz.de> In-Reply-To: <4F1EF705.30900@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Peter Maydell , monstr@monstr.eu, duyl@xilinx.com, qemu-devel@nongnu.org, "Peter A. G. Crosthwaite" , edgar.iglesias@petalogix.com, linnj@xilinx.com, =?ISO-8859-15?Q?Andreas_F=E4rber?= , john.williams@petalogix.com On 01/24/2012 12:23 PM, Stefan Weil wrote: > Am 24.01.2012 08:22, schrieb Andreas Färber: >> Am 23.01.2012 08:20, schrieb Peter A. G. Crosthwaite: >>> Added linux specific kernel dtb option. This option can be specified to inject >>> an argument device tree blob (dtb) into linux. >>> >>> Signed-off-by: Peter A. G. Crosthwaite >>> --- >>> qemu-options.hx | 3 +++ >>> vl.c | 4 ++++ >>> 2 files changed, 7 insertions(+), 0 deletions(-) >>> >>> diff --git a/qemu-options.hx b/qemu-options.hx >>> index 6295cde..43cddff 100644 >>> --- a/qemu-options.hx >>> +++ b/qemu-options.hx >>> @@ -1931,6 +1931,9 @@ ETEXI >>> >>> DEF("kernel", HAS_ARG, QEMU_OPTION_kernel, \ >>> "-kernel bzImage use 'bzImage' as kernel image\n", QEMU_ARCH_ALL) >>> +DEF("kern-dtb", HAS_ARG, QEMU_OPTION_kerndtb, \ >>> + "-kern-dtb dtb device tree blob passed to kernel boot\n", QEMU_ARCH_ALL) >> >> We should probably call it -kernel-dtb. If there's some strncmp() from >> -kernel interfering, we should fix that instead. >> >> I don't see this variable being used anywhere in this series though. >> Would it have been in the missing zynq machine of 7/7? >> >> Andreas > > I'd prefer a different solution. As far as I have understood, > the dtb is only useful with a kernel, so it could be handled > as an optional attribute to the -kernel parameter: > > -kernel IMAGE[,dtb=DTB] If it looks like a device, acts like a device, and smells like a device... The best thing to do here is to make an arm-kernel-loader device that hangs off of sysbus and takes four string properties. I was going to do this shortly for PC anyway. BTW, for unknown command line options, we should probably assume they are -device and treat accordingly. So -arm-kernel-loader dtb=DTB,kernel=/path/to/vmlinux would Just Work. Regards, Anthony Liguori > > Of course the same applies to -append, but that's a different issue. > > Regards, > Stefan > >