Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

HOWTO: build qemu from cvs (incl. accelerator)

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
58 posts
  • Previous
  • 1
  • 2
  • 3
  • Next
Author
Message
Debentoo_Gao
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 85
Joined: Fri Nov 21, 2003 2:28 am
Location: Shanghai,China
Contact:
Contact Debentoo_Gao
Website

  • Quote

Post by Debentoo_Gao » Sun Mar 13, 2005 4:02 am

pussi wrote:I just realized that it don't work with me eiter :oops: :oops:

I know it should work as it reads in Qemu acceleration module manual, but for some reason it don't. :(
It's so strange that it works now after I reemerge qemu-cvs :) :) :)
More Love~~More Dream~~More Happiness

Free Your Mind~~Free Your Body~~Free Your Life

http://www.myblue.ws
Top
pussi
l33t
l33t
Posts: 727
Joined: Sat May 08, 2004 9:28 am
Location: Finland

  • Quote

Post by pussi » Sun Mar 13, 2005 9:26 am

Debentoo_Gao wrote:
pussi wrote:I just realized that it don't work with me eiter :oops: :oops:

I know it should work as it reads in Qemu acceleration module manual, but for some reason it don't. :(
It's so strange that it works now after I reemerge qemu-cvs :) :) :)
Yeah, but you have to recompile qemu every time you reboot your system to make it work again. :P
Top
jdoe
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Mon Jun 02, 2003 6:29 pm
Location: Italy - Florence - Empoli
Contact:
Contact jdoe
Website

  • Quote

Post by jdoe » Sun Mar 13, 2005 4:19 pm

works for me, replacing

mknod /dev/kqemu c 250 0

with

mknod /dev/kqemu c 241 0

just ls -l /dev/kqemu after emerged it...

crw-rw-rw- 1 root root 241, 0 Mar 13 16:46 /dev/kqemu

see 241 not 250.

John
me
Top
pussi
l33t
l33t
Posts: 727
Joined: Sat May 08, 2004 9:28 am
Location: Finland

  • Quote

Post by pussi » Sun Mar 13, 2005 5:51 pm

Thanks I'll try that. :)
The manual said 250 so I assumed that it would be correct :P
Top
Debentoo_Gao
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 85
Joined: Fri Nov 21, 2003 2:28 am
Location: Shanghai,China
Contact:
Contact Debentoo_Gao
Website

  • Quote

Post by Debentoo_Gao » Wed Mar 16, 2005 4:14 pm

jdoe wrote:works for me, replacing

mknod /dev/kqemu c 250 0

with

mknod /dev/kqemu c 241 0


just ls -l /dev/kqemu after emerged it...

crw-rw-rw- 1 root root 241, 0 Mar 13 16:46 /dev/kqemu

see 241 not 250.

John
Thanks :) It works now:) :) :)
More Love~~More Dream~~More Happiness

Free Your Mind~~Free Your Body~~Free Your Life

http://www.myblue.ws
Top
destr0yr
Tux's lil' helper
Tux's lil' helper
Posts: 80
Joined: Sat Nov 29, 2003 10:02 am
Location: Kelowna, BC.
Contact:
Contact destr0yr
Website

  • Quote

Post by destr0yr » Thu Mar 17, 2005 8:41 am

... maybe i'm missing something (or just overly tired), but when i run "qemu -user-net -m 384 -hda myimage.img -cdrom /dev/cdrom1 -boot d", not much appears to be happening. my cpu jumps to 99% and it just sits there.. am i supposed to do something? :?:
Top
jdoe
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Mon Jun 02, 2003 6:29 pm
Location: Italy - Florence - Empoli
Contact:
Contact jdoe
Website

  • Quote

Post by jdoe » Thu Mar 17, 2005 11:32 am

now, with recent cvs versions, I have this problem too...
cpu at 100% and nothing happening...
me
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Thu Mar 17, 2005 5:30 pm

I got this:

Code: Select all

 * Copying qemu from /mnt/store/gentoo/distfiles/cvs-src ...
 * CVS module qemu is now in /var/tmp/portage/qemu-cvs-0.0.1/work
>>> Unpacking kqemu-0.6.2-1.tar.gz to /var/tmp/portage/qemu-cvs-0.0.1/work/qemu
patching file kqemu/install.sh
patching file kqemu/kqemu.h
>>> Source unpacked.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-emulation_-_qemu-cvs-0.0.1-30208.log"

mkdir:     /root/.ssh
--------------------------------------------------------------------------------
Top
Boris27
Guru
Guru
User avatar
Posts: 562
Joined: Wed Nov 05, 2003 10:14 pm
Location: Almelo, The Netherlands
Contact:
Contact Boris27
Website

  • Quote

Post by Boris27 » Sun Mar 20, 2005 9:05 pm

Code: Select all

>>> emerge (1 of 1) app-emulation/qemu-cvs-0.0.1 to /
>>> md5 src_uri ;-) kqemu-0.6.2-1.tar.gz
>>> Unpacking source...
 * Fetching CVS module qemu into /usr/portage/distfiles/cvs-src ...
 * Warning: The SSH host key of the remote server will not be verified.
 * A temporary known hosts list will be used.
 * Running  cvs -q -f -z4 -d ":ext:anoncvs@savannah.gnu.org:/cvsroot/qemu" checkout  qemu
Warning: Permanently added 'savannah.gnu.org,199.232.41.3' (RSA) to the list of known hosts.
cvs [checkout aborted]: cannot make directory qemu: Permission denied

!!! ERROR: app-emulation/qemu-cvs-0.0.1 failed.
!!! Function cvs_fetch, Line 447, Exitcode 1
!!! cvs checkout command failed
!!! If you need support, post the topmost build error, NOT this status message.

What gives?

EDIT: Nevermind. Don't mount your distfiles from a samba share... That doesnt work.... :(
we are microsoft, lower your firewalls and surrender your pc's. we will add your biological and technological distinctiveness to our own. your culture will adapt and service us. resistance is futile.
Top
djm
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 690
Joined: Mon Apr 12, 2004 1:00 pm
Location: Wadham College, Oxford

  • Quote

Post by djm » Mon Mar 21, 2005 7:26 pm

this done properly (no offence):

http://dev.gentoo.org/~lu_zero/overlay/qemu.tar.bz2



edit: fixed the url tags
Last edited by djm on Tue Mar 22, 2005 11:11 am, edited 1 time in total.
the forums.gentoo.org poster formally known as metal leper
Top
destr0yr
Tux's lil' helper
Tux's lil' helper
Posts: 80
Joined: Sat Nov 29, 2003 10:02 am
Location: Kelowna, BC.
Contact:
Contact destr0yr
Website

  • Quote

Post by destr0yr » Tue Mar 22, 2005 4:48 am

djm wrote:this done properly (no offence):

[url][http://dev.gentoo.org/~lu_zero/overlay/qemu.tar.bz2/url]
sweet. this actually does something!
Top
pussi
l33t
l33t
Posts: 727
Joined: Sat May 08, 2004 9:28 am
Location: Finland

  • Quote

Post by pussi » Thu Mar 24, 2005 3:14 pm

StringCheesian wrote:I got this:

Code: Select all

 * Copying qemu from /mnt/store/gentoo/distfiles/cvs-src ...
 * CVS module qemu is now in /var/tmp/portage/qemu-cvs-0.0.1/work
>>> Unpacking kqemu-0.6.2-1.tar.gz to /var/tmp/portage/qemu-cvs-0.0.1/work/qemu
patching file kqemu/install.sh
patching file kqemu/kqemu.h
>>> Source unpacked.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-emulation_-_qemu-cvs-0.0.1-30208.log"

mkdir:     /root/.ssh
--------------------------------------------------------------------------------

Code: Select all

mkdir  /root/.ssh
and try again :)
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Fri Mar 25, 2005 1:59 am

djm wrote:this done properly (no offence):

http://dev.gentoo.org/~lu_zero/overlay/qemu.tar.bz2
Doesn't work here:

Code: Select all

/var/tmp/portage/qemu-0.6.2.20050309/temp/ccJPO2ri.s: Assembler messages:
/var/tmp/portage/qemu-0.6.2.20050309/temp/ccJPO2ri.s:45640: Error: unknown pseudo-op: `.l'
/var/tmp/portage/qemu-0.6.2.20050309/temp/ccJPO2ri.s:45640: Error: invalid character (0xfffffffb) in mnemonic
make[1]: *** [translate.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/qemu-0.6.2.20050309/work/qemu/ppc-user'
USE flags: -debug +kqemu +sdl +softmmu
gcc 3.4.3.20050110
binutils 2.15.92.0.2-r6
pussi wrote:

Code: Select all

mkdir  /root/.ssh
and try again :)
Thanks, I'll try the first ebuild again.

EDIT: :cry:

Code: Select all

/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s: Assembler messages:
/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s:30422: Error: bad expression
/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s:30422: Error: junk at end of line, first unrecognized character is `s'
/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s:44531: Error: junk at end of line, first unrecognized character valued 0x16
make[1]: *** [translate.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/ppc-user'
make: *** [all] Error 1
Top
djm
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 690
Joined: Mon Apr 12, 2004 1:00 pm
Location: Wadham College, Oxford

  • Quote

Post by djm » Fri Mar 25, 2005 11:40 am

If you're having trouble with lu_zero's ebuild, then you should go to http://bugs.gentoo.org/show_bug.cgi?id=82885 and report it
the forums.gentoo.org poster formally known as metal leper
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Fri Mar 25, 2005 2:37 pm

djm wrote:If you're having trouble with lu_zero's ebuild, then you should go to http://bugs.gentoo.org/show_bug.cgi?id=82885 and report it
I'm starting to think it might be something wrong with my system.

EDIT: Yep, it was. I reinstalled my system and now it installs and runs fine with lu_zero's ebuild (I haven't tried the first one), but Win98 won't run.
Last edited by StringCheesian on Mon Apr 04, 2005 4:57 am, edited 1 time in total.
Top
zeek
Guru
Guru
User avatar
Posts: 480
Joined: Sat Nov 16, 2002 10:27 pm
Location: Bantayan Island
Contact:
Contact zeek
Website

Re: HOWTO: build qemu from cvs (incl. accelerator)

  • Quote

Post by zeek » Sat Mar 26, 2005 12:17 am

notz wrote:goto to your portage overlay ...
Great instructions!
Top
AngryLlama
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 111
Joined: Thu Sep 30, 2004 12:45 am

Humm.. Won't work

  • Quote

Post by AngryLlama » Sat Apr 02, 2005 4:35 pm

I can't get the qemu-cvs ebuild to work. I am running it in my 32-bit chroot since running the standard ebuild in my 64bit enviroment would cause the emulator to freeze in certain circumstances. I'm not sure what it is.. but in 64bit the Windows 2000 installer throws page faults when I do things like move the window or click next after typing in the cd-key.

Here is what I did:

Code: Select all

wget ftp://notz.homelinux.com/qemu-cvs.tar.gz
tar -xzf qemu-cvs.tar.gz
echo "app-emulation/qemu-cvs ~x86" >> /etc/portage/package.keywords              
echo "app-emulation/qemu-cvs kqemu" >> /etc/portage/package.use                  
emerge qemu-cvs
The emerge proceed for a short time then I get this error:

Code: Select all

make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/x86_64-softmmu'
make -C kqemu
make[1]: Entering directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/kqemu'
make -C /usr/src/linux SUBDIRS=`pwd` modules
make[2]: Entering directory `/usr/src/linux-2.4.28-gentoo-r5'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-includescripts/split-include.c
ACCESS DENIED  open_wr:   /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: cannot open output file scripts/split-include: Permission denied
collect2: ld returned 1 exit status
ACCESS DENIED  unlink:    /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include
make[2]: *** [scripts/split-include] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.28-gentoo-r5'
make[1]: *** [kqemu.o] Error 2
make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/kqemu'
make: *** [all] Error 2

!!! ERROR: app-emulation/qemu-cvs-0.0.1 failed.
!!! Function src_compile, Line 48, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-emulation_-_qemu-cvs-0.0.1-29477.log"

open_wr:   /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include
unlink:    /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include
--------------------------------------------------------------------------------
I don't use my chroot often so it only has 2.4.28 installed; My real system has 2.6.11-gentoo-r3.

When I emerge qemu-cvs in my main 64bit enviroment it compiles fine, /dev/kqemu is created. However, the kqemu module cannot be found anywhere. Any ideas? I added kqemu to my packages.use.

Thanks!
Top
zybl0re
n00b
n00b
Posts: 8
Joined: Sat May 24, 2003 5:38 am
Location: Ottawa, Canada

  • Quote

Post by zybl0re » Sat Apr 16, 2005 12:36 am

Okay, I'm not sure what's going on here, but I'm following the directions of the thread poster exactly (as far as I can tell), but when it get to the emerge step, I get

Code: Select all

tinomen portage # emerge qemu-cvs
Calculating dependencies   
emerge: there are no ebuilds to satisfy "qemu-cvs".
the tar extracted to /usr/local/portage... what's going on? I'm sure this must be some simple little thing I'm overlooking. :(

edit: okay, a dude ssh'd into my machine and helped me out. I needed to add /usr/local/portage to PORTDIR_OVERLAY in make.conf
qemu-cvs is compiling right now. :)
whoa
Top
Fr0d083
n00b
n00b
Posts: 34
Joined: Sun Feb 08, 2004 7:51 am

  • Quote

Post by Fr0d083 » Thu Apr 21, 2005 1:03 am

it seems that the tarball for the ebuild is no longer on the ftp server

does anyone know if it is hosted anywhere else? I checked gentoo-portage and they don't have it either.

I really would like to get this installed so I can dump VMWare.
Top
Fr0d083
n00b
n00b
Posts: 34
Joined: Sun Feb 08, 2004 7:51 am

  • Quote

Post by Fr0d083 » Fri Apr 22, 2005 4:47 pm

bump
Top
djm
Arch/Herd Tester
Arch/Herd Tester
User avatar
Posts: 690
Joined: Mon Apr 12, 2004 1:00 pm
Location: Wadham College, Oxford

  • Quote

Post by djm » Fri Apr 22, 2005 4:58 pm

use the one on http://dev.gentoo.org/~lu_zero that I linked to earlier in the thread
the forums.gentoo.org poster formally known as metal leper
Top
bravecobra
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Thu Dec 26, 2002 8:57 pm
Location: Planet Earth (sometimes)
Contact:
Contact bravecobra
Website

  • Quote

Post by bravecobra » Sat Apr 23, 2005 10:32 pm

The permissions on /dev/kqemu get reset by udev on my machine.

Code: Select all

zeus gentoo-qemu # /etc/init.d/kqemu stop
 * Unloading kqemu module...                                            [ ok ]
zeus gentoo-qemu # /etc/init.d/kqemu start
 * Loading kqemu module...
 * Creating /dev/kqemu...                                                  [ ok ]
zeus gentoo-qemu # ls -al /dev/|grep kqemu
crw-rw-rw-   1 root  root    241,   0 Apr 24 00:17 kqemu
zeus gentoo-qemu # ls -al /dev/|grep kqemu
crw-rw----   1 root  root    250,   0 Apr 24 00:17 kqemu
Even when creating a new device with 241, it gets reset by udev to 250 and has its permissions reset to 0660 (udev uses the default mode 0660 as set in /etc/udev/udev.conf).
So an additional udev permission rule is needed. So I added /etc/udev/permissions.d/10-local.permissions with the following content:

Code: Select all

kqemu:root:root:0666
That kept the permissions of /dev/kqemu on 0666.
Hope this helps the udev users out there.
Brave Cobra
http://www.bravecobra.com
Top
bravecobra
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Thu Dec 26, 2002 8:57 pm
Location: Planet Earth (sometimes)
Contact:
Contact bravecobra
Website

  • Quote

Post by bravecobra » Mon Apr 25, 2005 7:57 am

Following the guide as presented in my blog (http://blog.bravecobra.com/index.php/li ... _with_qemu), I came up with the following startup script. You'll also need the following packages

Code: Select all

#emerge vde iptables
Another requirement would be to enable the tun device in your kernel (vde uses that to setup a private networking device).

Code: Select all

Device drivers -> Networking support -> Network device support  -> [*] Universal TUN/TAP device driver support
When all that is enabled, you can start using the following startup script.

Code: Select all

#!/sbin/runscript

udev() {
   # Create the KQEMU device if using udev
    if [ -a /dev/kqemu ] ; then
        einfo "        /dev/kqemu exists"
    else
        ebegin "        Creating /dev/kqemu"
        mknod /dev/kqemu c 241 0
        chmod 666 /dev/kqemu
    fi
}

start() {
    ebegin "Starting kqemu"
        ebegin "        Loading kqemu module"
            /sbin/modprobe kqemu
            udev
        eend $?
        ebegin "        Starting up virtual network"
            vde_switch -tap tun -daemon
            ifconfig tun 192.168.254.254
            chmod 666 /tmp/vde.ctl
            echo "1" > /proc/sys/net/ipv4/ip_forward
            iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
        eend $?
    eend $?
}

stop() {
    ebegin "Stopping kqeum"
        ebegin "        Unloading kqemu module"
            /sbin/modprobe -r kqemu
        eend $?
        ebegin "        Stopping virtual network"
            killall -9 vde_switch
            rm /tmp/vde.ctl
        eend $?
    eend $?
}
Of course I could start finetuning that by having the virtual TUN ip set in /etc/conf.d/kqemu etc, but you'll get the idea. Don't forget the above udev permissions rule :).
Brave Cobra
http://www.bravecobra.com
Top
bravecobra
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Thu Dec 26, 2002 8:57 pm
Location: Planet Earth (sometimes)
Contact:
Contact bravecobra
Website

  • Quote

Post by bravecobra » Mon Apr 25, 2005 8:13 am

destr0yr wrote:... maybe i'm missing something (or just overly tired), but when i run "qemu -user-net -m 384 -hda myimage.img -cdrom /dev/cdrom1 -boot d", not much appears to be happening. my cpu jumps to 99% and it just sits there.. am i supposed to do something? :?:
Did you emerge with the softmmu flag? Otherwise it's quite normal nothing happens. :)
Brave Cobra
http://www.bravecobra.com
Top
dobh
n00b
n00b
Posts: 10
Joined: Mon Apr 25, 2005 10:18 am
Location: Finland

Security Violation: A file exists that is not in the manifes

  • Quote

Post by dobh » Mon Apr 25, 2005 10:38 am

Hi,

I moved from qemu-cvs to lu_zeros ebuild.

When I try to emerge it, the following error appears:

>>> Downloading http://dev.gentoo.org/~lu_zero/distfile ... 09.tar.bz2
--13:26:37-- http://dev.gentoo.org/%7Elu_zero/distfi ... 09.tar.bz2
=> `/usr/portage/distfiles/qemu-0.6.2.20050309.tar.bz2'
Resolving dev.gentoo.org... 134.68.220.30
Connecting to dev.gentoo.org[134.68.220.30]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 974,674 [application/x-tar]

100%[===============================================================================>] 974,674 426.44K/s

13:26:40 (425.32 KB/s) - `/usr/portage/distfiles/qemu-0.6.2.20050309.tar.bz2' saved [974674/974674]

!!! Security Violation: A file exists that is not in the manifest.
!!! File: files/kqemu-sysfs.patch


What shoud I do?
Top
Post Reply

58 posts
  • Previous
  • 1
  • 2
  • 3
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic