[ports/emulators/qemu-devel] Fix BSD User space emulator issue

Norikatsu Shigemura nork at FreeBSD.org
Mon Jul 19 16:32:06 UTC 2010


Hi nox.

	I found a minor issue on qemu-devel.  We can't use BSD User space
	emulator by default.  Because default bsd-type is OpenBSD:-(.

	In this time, we run always qemu-* with -bsd freebsd option, like
	qemu-x86_64 -bsd freebsd /bin/ls.  But following patch fix default
	behavior.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- bsd-user/main.c.orig	2010-05-05 00:27:48.000000000 +0900
+++ bsd-user/main.c	2010-07-19 00:49:30.020088803 +0900
@@ -740,7 +740,7 @@
     int gdbstub_port = 0;
     char **target_environ, **wrk;
     envlist_t *envlist = NULL;
-    bsd_type = target_openbsd;
+    bsd_type = target_freebsd;
 
     if (argc <= 1)
         usage();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	BTW, do you have any idea to support ARM?

	And, JFYI, I tried to test sparc64, i386, x86_64 on FreeBSD/amd64.
	But I confirmed that x86_64 is only OK like following:

$ qemu-x86_64 -bsd freebsd /rescue/ls -lF /
-r--r--r--   1 root  wheel  6196 Jan  3  2010 COPYRIGHT
drwxr-xr-x   2 root  wheel    47 Jul 18 01:49 bin/
drwxr-xr-x   9 root  wheel    36 Jul 18 01:49 boot/
  :

$ make world TARGET_ARCH=sparc64 DESTDIR=/tmp/sparc64
$ qemu-sparc64 -bsd freebsd -L /tmp/sparc64 /tmp/sparc64/rescue/ls -lF /
 (in this case, qemu-sparc64 is cpu eater.)

-- 
Norikatsu Shigemura <nork at FreeBSD.org>


More information about the freebsd-emulation mailing list