Re: [Qemu-devel] [PATCH] Use a Linux-style MAINTAINERS file
On Thu, Sep 9, 2010 at 5:18 PM, Anthony Liguori aligu...@us.ibm.com wrote: +M86K Machines +- +mcf5208 +M: Paul Brook p...@codesourcery.com +S: Maintained +F: hw/mcf5208.c Just wondering... Is there a M86K or is it a typo from M68K (warning: I know nothing of this machine). Regards, -- Anderson Lizardo
Re: [Qemu-devel] [PATCH] -chroot and -su options.
Hi, On Mon, Mar 3, 2008 at 8:28 PM, Rob Landley [EMAIL PROTECTED] wrote: Quick and dirty patch to teach qemu application emulation how to chroot (and drop privs), so you don't have to pollute a target filesystem with host code, and/or figure out how to build qemu static in order to run a dynamic binary. I tested your patch, but it doesn't seem to work when the application forks a new process (the new process is attempted to run as a native host executable, instead of with qemu). Is that expected? I tried enabling binfmt for it, but then qemu needs to be static, defeating the purpose of this option. Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia Manaus - Brazil
[Qemu-devel] QEMU static build failing with recent toolchain
Hi, QEMU static build (both 0.8.2 and CVS) is failing using a recent toolchain with this message: gcc-3.4 -g -static -Wl,-T,/tmp/qemu-cvs-20061029/i386.ld -o qemu-arm main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o elfload.o linuxload.o flatload.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o libqemu.a gdbstub.o -lm /usr/bin/ld: BFD 2.17 Debian GNU/Linux assertion fail ../../binutils-2.17/bfd/elf.c:3878 /usr/bin/ld: qemu-arm: Not enough room for program headers (allocated 5, need 6) Section to Segment mapping: Segment Sections... 00: LOAD: .note.ABI-tag .init .text __libc_freeres_fn .fini .rodata .rodata.cst4 .eh_frame .rodata.str1.1 .rodata.str1.4 .rodata.str4.4 .gcc_except_table __libc_subfreeres __libc_atexit .rodata.str1.32 01: LOAD: .data .jcr .data.rel.ro .tdata .ctors .dtors .got .bss 02: LOAD: .tbss __libc_freeres_ptrs 03: NOTE: .note.ABI-tag 04:TLS: .tdata .ctors 05: STACK: /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make: *** [qemu-arm] Error 1 make: Leaving directory `/tmp/qemu-cvs-20061029/arm-user' I've tested removing the linker script option -Wl,-T,src_dir/i386.ld and it compiled fine. Maybe this script is broken or is not necessary for recent binutils versions? Information about my system: - x86 host - gcc-3.4 (GCC) 3.4.6 (Ubuntu 3.4.6-3ubuntu1) - glibc 2.4 - binutils 2.17 Regards, -- Anderson Lizardo ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] fix for qemu-* looping forever on symlinks (patch attached)
On 7/13/06, Paul Brook [EMAIL PROTECTED] wrote: The whole point of the -L option is so that it picks up target shared libraries, eg. in lib and usr/lib. By my reading your patch makes the -L option do absolutely nothing, which can't be right. The proper fix is to do the lookups when a file is accesses (possibly with caching) not pre-scan the whole tree. Is it possible to use the same cache format as ld.so (/etc/ld.so.cache)? So a command like qemu-arm -L /target program would make qemu look for /target/etc/ld.so.cache as its cache, and a command like: qemu-arm -L /target /target/sbin/ldconfig would update this cache. Unless the cache you are proposing has different purposes than ld.so's cache? Regards, -- Anderson Lizardo ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] qemu configure
On 3/19/06, Paul Brook [EMAIL PROTECTED] wrote: CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Paul Brook [EMAIL PROTECTED]06/03/19 14:54:16 Modified files: . : configure Log message: Configure options to enable/disable all softmmu/user targets. In the configure help text, you have put --enable/disable-system. I suppose you meant --enable/disable-softmmu ? Regards, -- Anderson Lizardo Embedded Linux Lab - 10LE Nokia Institute of Technology - INdT Manaus - Brazil ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] [PATCH] reduce magic numbers length to 16 bytes (qemu-binfmt-conf.sh)
On 3/11/06, Andreas Schwab [EMAIL PROTECTED] wrote: Anderson Lizardo [EMAIL PROTECTED] writes: Any reason why the magic numbers from qemu-binfmt-conf.sh are not just 16 bytes long as those reported by readelf --file-header? For example: $ readelf --file-header /bin/true | grep Magic: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Using only the first 16 bytes avoids the need to have separate entries for i386 and i486, given that they are emulated by the same program (qemu-i386). How would you distinguish it from an arm or mipsel binary? Now I realize my mistake, sorry for the noise :/ To not make this thread completely useless: I find /usr/share/misc/file/magic very useful to get machine patterns (as detected by file). Search there for magic for ELF executables and you will find a fairly complete list of machine magic numbers. Regards, -- Anderson Lizardo Embedded Linux Lab - 10LE Nokia Institute of Technology - INdT Manaus - Brazil ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [PATCH] Add support for compiling outside the source tree
Hi, The attached patch adds (or, strictly speaking, fixes, as the source tree had already initial support for this) support for compiling QEMU outside the source tree (or in a subdir). As a side effect, it also removes the requirement to call configure with an absolute path. The changes are fairly small and don't affect the normal build. -- Anderson Lizardo Embedded Linux Lab - 10LE Nokia Institute of Technology - INdT Manaus - Brazil Index: Makefile === RCS file: /sources/qemu/qemu/Makefile,v retrieving revision 1.93 diff -u -r1.93 Makefile --- Makefile 11 Mar 2006 14:51:13 - 1.93 +++ Makefile 11 Mar 2006 19:50:52 - @@ -1,6 +1,6 @@ -include config-host.mak -CFLAGS=-Wall -O2 -g -fno-strict-aliasing +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I. ifdef CONFIG_DARWIN CFLAGS+= -mdynamic-no-pic endif @@ -18,10 +18,10 @@ $(MAKE) -C $$d $@ || exit 1 ; \ done -qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c +qemu-img$(EXESUF): $(addprefix $(SRC_PATH)/,qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c) $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) -dyngen$(EXESUF): dyngen.c +dyngen$(EXESUF): $(SRC_PATH)/dyngen.c $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^ clean: @@ -77,15 +77,15 @@ cscope -b # documentation -%.html: %.texi +%.html: $(SRC_PATH)/%.texi texi2html -monolithic -number $ -qemu.1: qemu-doc.texi - ./texi2pod.pl $ qemu.pod +qemu.1: $(SRC_PATH)/qemu-doc.texi + $(SRC_PATH)/texi2pod.pl $ qemu.pod pod2man --section=1 --center= --release= qemu.pod $@ -qemu-img.1: qemu-img.texi - ./texi2pod.pl $ qemu-img.pod +qemu-img.1: $(SRC_PATH)/qemu-img.texi + $(SRC_PATH)/texi2pod.pl $ qemu-img.pod pod2man --section=1 --center= --release= qemu-img.pod $@ FILE=qemu-$(shell cat VERSION) Index: Makefile.target === RCS file: /sources/qemu/qemu/Makefile.target,v retrieving revision 1.93 diff -u -r1.93 Makefile.target --- Makefile.target 6 Feb 2006 04:11:15 - 1.93 +++ Makefile.target 11 Mar 2006 19:50:53 - @@ -17,7 +17,7 @@ VPATH+=:$(SRC_PATH)/linux-user DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) endif -CFLAGS=-Wall -O2 -g -fno-strict-aliasing +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I.. #CFLAGS+=-Werror LDFLAGS=-g LIBS= Index: configure === RCS file: /sources/qemu/qemu/configure,v retrieving revision 1.84 diff -u -r1.84 configure --- configure 11 Mar 2006 14:51:13 - 1.84 +++ configure 11 Mar 2006 19:50:55 - @@ -136,13 +136,10 @@ fi # find source path -# XXX: we assume an absolute path is given when launching configure, -# except in './configure' case. source_path=${0%configure} -source_path=${source_path%/} +source_path=`cd $source_path; pwd` source_path_used=yes -if test -z $source_path -o $source_path = . ; then -source_path=`pwd` +if [ $source_path = `pwd` ] ; then source_path_used=no fi ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [PATCH] Add support for compiling outside the source tree (try #2)
It seems my first patch didn't go through the list. Anyway, the previous one was missing one modification, so here goes a new one. Original message: The attached patch adds (or, strictly speaking, fixes, as the source tree had already initial support for this) support for compiling QEMU outside the source tree (or in a subdir). As a side effect, it also removes the requirement to call configure with an absolute path. The changes are fairly small and don't affect the normal build. -- Anderson Lizardo Embedded Linux Lab - 10LE Nokia Institute of Technology - INdT Manaus - Brazil Index: Makefile === RCS file: /sources/qemu/qemu/Makefile,v retrieving revision 1.93 diff -u -r1.93 Makefile --- Makefile 11 Mar 2006 14:51:13 - 1.93 +++ Makefile 12 Mar 2006 00:40:06 - @@ -1,6 +1,6 @@ -include config-host.mak -CFLAGS=-Wall -O2 -g -fno-strict-aliasing +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I. ifdef CONFIG_DARWIN CFLAGS+= -mdynamic-no-pic endif @@ -18,10 +18,10 @@ $(MAKE) -C $$d $@ || exit 1 ; \ done -qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c +qemu-img$(EXESUF): $(addprefix $(SRC_PATH)/,qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c) $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) -dyngen$(EXESUF): dyngen.c +dyngen$(EXESUF): $(SRC_PATH)/dyngen.c $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^ clean: @@ -58,7 +58,7 @@ mkdir -p $(mandir)/man1 install qemu.1 qemu-img.1 $(mandir)/man1 mkdir -p $(datadir)/keymaps - install -m 644 $(addprefix keymaps/,$(KEYMAPS)) $(datadir)/keymaps + install -m 644 $(addprefix $(SRC_PATH)/keymaps/,$(KEYMAPS)) $(datadir)/keymaps endif for d in $(TARGET_DIRS); do \ $(MAKE) -C $$d $@ || exit 1 ; \ @@ -77,15 +77,15 @@ cscope -b # documentation -%.html: %.texi +%.html: $(SRC_PATH)/%.texi texi2html -monolithic -number $ -qemu.1: qemu-doc.texi - ./texi2pod.pl $ qemu.pod +qemu.1: $(SRC_PATH)/qemu-doc.texi + $(SRC_PATH)/texi2pod.pl $ qemu.pod pod2man --section=1 --center= --release= qemu.pod $@ -qemu-img.1: qemu-img.texi - ./texi2pod.pl $ qemu-img.pod +qemu-img.1: $(SRC_PATH)/qemu-img.texi + $(SRC_PATH)/texi2pod.pl $ qemu-img.pod pod2man --section=1 --center= --release= qemu-img.pod $@ FILE=qemu-$(shell cat VERSION) Index: Makefile.target === RCS file: /sources/qemu/qemu/Makefile.target,v retrieving revision 1.93 diff -u -r1.93 Makefile.target --- Makefile.target 6 Feb 2006 04:11:15 - 1.93 +++ Makefile.target 12 Mar 2006 00:40:11 - @@ -17,7 +17,7 @@ VPATH+=:$(SRC_PATH)/linux-user DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) endif -CFLAGS=-Wall -O2 -g -fno-strict-aliasing +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I.. #CFLAGS+=-Werror LDFLAGS=-g LIBS= Index: configure === RCS file: /sources/qemu/qemu/configure,v retrieving revision 1.84 diff -u -r1.84 configure --- configure 11 Mar 2006 14:51:13 - 1.84 +++ configure 12 Mar 2006 00:40:16 - @@ -136,13 +136,10 @@ fi # find source path -# XXX: we assume an absolute path is given when launching configure, -# except in './configure' case. source_path=${0%configure} -source_path=${source_path%/} +source_path=`cd $source_path; pwd` source_path_used=yes -if test -z $source_path -o $source_path = . ; then -source_path=`pwd` +if [ $source_path = `pwd` ] ; then source_path_used=no fi ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [PATCH] reduce magic numbers length to 16 bytes (qemu-binfmt-conf.sh)
Hi, Any reason why the magic numbers from qemu-binfmt-conf.sh are not just 16 bytes long as those reported by readelf --file-header? For example: $ readelf --file-header /bin/true | grep Magic: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Using only the first 16 bytes avoids the need to have separate entries for i386 and i486, given that they are emulated by the same program (qemu-i386). The others still need separate entries because of endianess. Regards, -- Anderson Lizardo Embedded Linux Lab - 10LE Nokia Institute of Technology - INdT Manaus - Brazil --- qemu-binfmt-conf.sh.orig 2005-12-19 18:51:53.0 -0400 +++ qemu-binfmt-conf.sh 2006-03-10 22:51:01.0 -0400 @@ -20,20 +20,19 @@ # register the interpreter for each cpu except for the native one if [ $cpu != i386 ] ; then -echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' /proc/sys/fs/binfmt_misc/register -echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' /proc/sys/fs/binfmt_misc/register +echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff:/usr/local/bin/qemu-i386:' /proc/sys/fs/binfmt_misc/register fi if [ $cpu != arm ] ; then -echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:' /proc/sys/fs/binfmt_misc/register -echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-armeb:' /proc/sys/fs/binfmt_misc/register +echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff:/usr/local/bin/qemu-arm:' /proc/sys/fs/binfmt_misc/register +echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff:/usr/local/bin/qemu-armeb:' /proc/sys/fs/binfmt_misc/register fi if [ $cpu != sparc ] ; then -echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sparc:' /proc/sys/fs/binfmt_misc/register +echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff:/usr/local/bin/qemu-sparc:' /proc/sys/fs/binfmt_misc/register fi if [ $cpu != ppc ] ; then -echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-ppc:' /proc/sys/fs/binfmt_misc/register +echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff:/usr/local/bin/qemu-ppc:' /proc/sys/fs/binfmt_misc/register fi if [ $cpu != mips ] ; then -echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips:' /proc/sys/fs/binfmt_misc/register -echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsel:' /proc/sys/fs/binfmt_misc/register +echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff:/usr/local/bin/qemu-mips:' /proc/sys/fs/binfmt_misc/register +echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff:/usr/local/bin/qemu-mipsel:' /proc/sys/fs/binfmt_misc/register fi ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu regression 0.7.2 - 0.8.0 (ARM user emulation)
Hi, I was having some issues with the latest qemu (ARM user emulation), which I tracked down to the following reduced test case: #include stdio.h int main(void) { float a, b; a = 0.1f; b = 0.8f; printf(a b: %d\n, (a b)); return 0; } Compile it with an ARM cross-compiler and run it with qemu-arm. It should print a b: 1 for qemu 0.7.2 and a b: 0 for 0.8.0. Obviously, the first one is right. Tested with the following setup: qemu 0.7.2/0.8.0 arm-linux-gnu-gcc (GCC) 3.4.5 glibc 2.3.5 -- Anderson Lizardo Embedded Linux Lab - 10LE Nokia Institute of Technology - INdT Manaus - Brazil ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel