emulators/qemu: build fail on current amd64

Daichi GOTO daichi at ongs.co.jp
Thu Feb 12 04:45:19 PST 2009


John Hein wrote:
> Daichi GOTO wrote at 17:54 +0900 on Feb 11, 2009:
>  > Juergen Lock wrote:
>  > > In article <4990EF3E.5090908 at ongs.co.jp> you write:
>  > >> After some days, I have tried to build qemu and kqemu with
>  > >> latest amd64 current system, and I have gottten it success :)
>  > >>
>  > >> FYI, qemu works well but without kqemu.
>  > >>
>  > >> # /usr/local/etc/rc.d/kqemu start
>  > >> kldload: can't load kqemu: Exec format error
>  > >> /usr/local/etc/rc.d/kqemu: WARNING: kqemu module failed to load.
>  > >> #
>  > > 
>  > > Oh?  Is there anything in dmesg, like a missing symbol?  Or did you
>  > > update your world/kernel after building kqemu?  In that case you should
>  > > rebuild your kqemu port...
>  > 
>  > # uname -a
>  > FreeBSD parancell.ongs.co.jp 8.0-CURRENT FreeBSD 8.0-CURRENT #3: Mon Feb  9 14:18:09 JST 2009 
>  > root at parancell.ongs.co.jp:/usr/obj/usr/src/sys/PARANCELL  amd64
>  > # dmesg
>  > (snip)
>  > link_elf_obj: symbol unit2minor undefined
>  > kldload: /boot/modules/kqemu.ko: Unsupported file type
>  > (snip)
> 
> unit2minor was removed recently.
> See recent commit to sys/sys/conf.h
> Any in-tree drivers left that used unit2minor were fixed at the same time.
> 
> For kqemu-kmod, try this...
> 
> --- kqemu-1.3.0pre11/kqemu-freebsd.c.orig	2007-02-06 14:02:00.000000000 -0700
> +++ kqemu-1.3.0pre11/kqemu-freebsd.c	2009-02-11 03:04:50.000000000 -0700
> @@ -296,7 +296,11 @@
>  
>      r = clone_create(&kqemuclones, &kqemu_cdevsw, &unit, dev, 0);
>      if (r) {
> +#if __FreeBSD_version > 800061
> +	*dev = make_dev(&kqemu_cdevsw, unit,
> +#else
>  	*dev = make_dev(&kqemu_cdevsw, unit2minor(unit),
> +#endif
>  	    UID_ROOT, GID_WHEEL, 0660, "kqemu%d", unit);
>  	if (*dev != NULL) {
>  	    dev_ref(*dev);

Adove patch works well :)  Now I can load kqemu and run
qemu with it!  I guess it should be under files dir of
emulators/kqemu-kmod.

And another problem comming X-(
After startup WinXP on qemu+kqemu, at user logs in,
qemu gets Segmentation fault.  It looks like fails
at the same point always.
Any one have any ideas?  Someone have the same situation?

Thanks

-- 
   Daichi GOTO, http://people.freebsd.org/~daichi



More information about the freebsd-emulation mailing list