From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmot4-0002BF-Ok for qemu-devel@nongnu.org; Fri, 29 Jul 2011 11:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qmot3-0006gJ-HF for qemu-devel@nongnu.org; Fri, 29 Jul 2011 11:22:06 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:50161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmot3-0006g3-5v for qemu-devel@nongnu.org; Fri, 29 Jul 2011 11:22:05 -0400 Date: Fri, 29 Jul 2011 17:21:59 +0200 From: Johannes Schauer Message-ID: <20110729152159.GA9135@hoothoot> References: <1311400070-9051-1-git-send-email-josch@pyneo.org> <20110728084109.GA20285@afflict.kos.to> <20110729125250.GJ27917@talon.fglan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110729125250.GJ27917@talon.fglan> Sender: j.schauer@email.de Subject: Re: [Qemu-devel] Bug#632192: [PATCH] add QEMU_LD_PREFIX environment variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vagrant Cascadian Cc: Riku Voipio , qemu-devel@nongnu.org, 632192@bugs.debian.org On Fri, Jul 29, 2011 at 05:52:50AM -0700, Vagrant Cascadian wrote: > setting up a wrapper makes trivial cross-architecture chroots harder > as you'll have to copy two binaries into the chroot, and i'm not sure > if it would work at all, as the wrapper will need to somehow emulate > it's own interpreter... Agreed - this makes a wrapper not an option. I didnt think of that. > > Alternatively we should have a generic setup for mapping enviroment > > variables to command line options. Now we get special per-option > > code every time someone needs to setup a command line option from > > binfmt. > > this would seem a bit better alternative to me... So if we agree on using environment variables to pass options to qemu-user we next need to agree on how to name the options. The following commandline arguments exist (in order as they are checked in linux-user/main.c) and I shortly described and proposed a name for the environment variable in the same line. -d (activate log) - QEMU_LOG -D (logfile) - QEMU_LOGFILE -E (set target env variabe) - QEMU_SET_ENV -U (unset target env variabe) - QEMU_UNSET_ENV -0 (set target argv[0]) - QEMU_ARGV0 -s (stack size) - QEMU_STACK_SIZE -L (elf interpreter prefix) - QEMU_LD_PREFIX -p (page size) - QEMU_PAGESIZE -g (listen for gdb on port) - QEMU_GDB -r (uname) - QEMU_UNAME -cpu (cpu model) - QEMU_CPU -B (guest base) - QEMU_GUEST_BASE -R (reserved virtual address) - QEMU_RESERVED_VA -drop-ld-preload - QEMU_DROP_LD_PRELOAD -singlestep - QEMU_SINGLESTEP -strace - QEMU_STRACE also, there already is the QEMU_STRACE environment variable which could be incorporated into the solution? the -E and -U options can be specified several times so the environment variables should be able to receive a list - maybe in the getsubopt(3) style? So what do you think? cheers, josch