emulators/qemu: build fail on current amd64
John Hein
jhein at timing.com
Wed Feb 11 02:54:40 PST 2009
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);
More information about the freebsd-emulation
mailing list