gentoo disk image for QEmu
Hi,
I would generate a Gentoo Linux disk image for QEmu.
This source based Linux distro can be configurated to generate hardware specific binaries through its package management system.
I previously tried with Bochs. Therefore, I wrote some scripts. The main part of the generation was made in a Linux chrooted environment on a real host which was compatible with the emulated host. The disk image generation was blocked by the boot loader installation step.
Are you interested by those generation scripts ?
Jérôme
Hello,
Quoted 9 lines · Jérôme Bouat
I would generate a Gentoo Linux disk image for QEmu.
This source based Linux distro can be configurated to generate hardware specific binaries through its package management system.
I previously tried with Bochs. Therefore, I wrote some scripts. The main part of the generation was made in a Linux chrooted environment on a real host which was compatible with the emulated host. The disk image generation was blocked by the boot loader installation step.
I'm not sure I understand your question. Is the problem that the chrooted environment was unable to install a bootloader for the target system?
I've hacked up a filesystem manipulation tool that is available for download at:
http://www.smallworks.com/~jim/fsimage/
The tool is actually a shell script and a small x86 distribution that together are used to access filesystems independent of root access or host kernel configuration. Needless to say, the tool depends on QEMU. 0.6.1 or newer.
I am not sure if the tool is of interest for you, but maybe it helps.
/ magnus
[Qemu-devel] ESC key problems & keyboard problems
Hi!
I've been using qemu/kqemu in a linux host - very nice work folks, congratulations.
I'm just having a little keyboard problem. Unfortunately, if I don't choose a keyboard layout ("-k pt-br"), the key "/" and "?" is not recognized either in Linux or Windows (its a Brazilian ABNT2 keyboard).
However, when I choose a keyboard map ("-k en-us", for example), the ESC key does not work.
Is anyone having the same problem?
PS: Just a side note, some time ago, there was a similar little bug in kbd, after compiling dri - open source video acceleration drivers - from sources, by which certain keys - especially this "/" and "?" key was not recognized; I noticed the problem after installing a dri video driver from source, and solved it through the quick & dirty solution I described here:
http://sourceforge.net/mailarchive/message.php?msg_id=7263141
More comments about it here:
http://sourceforge.net/mailarchive/message.php?msg_id=7264988
and here:
http://sourceforge.net/mailarchive/message.php?msg_id=7289423
Considering that according to information contained in qemu source files related to the keyboard layouts, same are based on kbd, and as it seems some information may have come from Red Hat 7 or 9.0
(http://fabrice.bellard.free.fr/qemu/qemu-doc.html#TOC42), which uses xfree86 (which dri also used at the time), there may be some connection between the problems and the solution to this little annoyance in qemu may be related (not sure how the keymaps are used in qemu though)...
Another note is that there was no such problem after dri moved to xorg (and its kbd version). Don't know if this has been solved in later xfree86 editions.
Anyway, best regards and congratulations for the excellent work!
Paulo
Re: [Qemu-devel] ESC key problems & keyboard problems
There was a fix in CVS some days ago which made ESC available with keymaps. If you get errors on your console when pressing ESC, you should try a newer CVS snapshot.
Oliver Gerlich
Quoted 37 lines · Paulo R. Dallan
Hi!
I've been using qemu/kqemu in a linux host - very nice work folks, congratulations.
I'm just having a little keyboard problem. Unfortunately, if I don't choose a keyboard layout ("-k pt-br"), the key "/" and "?" is not recognized either in Linux or Windows (its a Brazilian ABNT2 keyboard).
However, when I choose a keyboard map ("-k en-us", for example), the ESC key does not work.
Is anyone having the same problem?
PS: Just a side note, some time ago, there was a similar little bug in kbd, after compiling dri - open source video acceleration drivers - from sources, by which certain keys - especially this "/" and "?" key was not recognized; I noticed the problem after installing a dri video driver from source, and solved it through the quick & dirty solution I described here:
http://sourceforge.net/mailarchive/message.php?msg_id=7263141
More comments about it here:
http://sourceforge.net/mailarchive/message.php?msg_id=7264988
and here:
http://sourceforge.net/mailarchive/message.php?msg_id=7289423
Considering that according to information contained in qemu source files related to the keyboard layouts, same are based on kbd, and as it seems some information may have come from Red Hat 7 or 9.0 (http://fabrice.bellard.free.fr/qemu/qemu-doc.html#TOC42), which uses xfree86 (which dri also used at the time), there may be some connection between the problems and the solution to this little annoyance in qemu may be related (not sure how the keymaps are used in qemu though)...
Another note is that there was no such problem after dri moved to xorg (and its kbd version). Don't know if this has been solved in later xfree86 editions.
Anyway, best regards and congratulations for the excellent work!
Paulo
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ESC key problems & keyboard problems
Hi!
Quoted 5 lines · Oliver Gerlich
There was a fix in CVS some days ago which made ESC available with keymaps. If you get errors on your console when pressing ESC, you should try a newer CVS snapshot.
Oliver Gerlich
Thank you Oliver, I'm going try that... On this aspect, just a note, is there an specific way to *uninstall* a previous version of qemu (the one I have here I compiled from sources), or should I just download/recompile and install over the old files? (I know, it may not be advisable to do this with many applications, but in some others as the files are the same and just replaced, there are not many problems)...
Still regarding the key problem, who would be in charge of the keyboards lay-outs? (In relation to the kbd Brazilian abnt2 keyboard issue I mentioned in my previous e-mail...)
Quoted 40 lines
Quoted 39 lines · Paulo R. Dallan
Hi!
I've been using qemu/kqemu in a linux host - very nice work folks, congratulations.
I'm just having a little keyboard problem. Unfortunately, if I don't choose a keyboard layout ("-k pt-br"), the key "/" and "?" is not recognized either in Linux or Windows (its a Brazilian ABNT2 keyboard).
However, when I choose a keyboard map ("-k en-us", for example), the ESC key does not work.
Is anyone having the same problem?
PS: Just a side note, some time ago, there was a similar little bug in kbd, after compiling dri - open source video acceleration drivers - from sources, by which certain keys - especially this "/" and "?" key was not recognized; I noticed the problem after installing a dri video driver from source, and solved it through the quick & dirty solution I described here:
http://sourceforge.net/mailarchive/message.php?msg_id=7263141
More comments about it here:
http://sourceforge.net/mailarchive/message.php?msg_id=7264988
and here:
http://sourceforge.net/mailarchive/message.php?msg_id=7289423
Considering that according to information contained in qemu source files related to the keyboard layouts, same are based on kbd, and as it seems some information may have come from Red Hat 7 or 9.0
(http://fabrice.bellard.free.fr/qemu/qemu-doc.html#TOC42), which uses xfree86 (which dri also used at the time), there may be some connection between the problems and the solution to this little annoyance in qemu may be related (not sure how the keymaps are used in qemu though)...
Quoted 7 lines
Quoted 7 lines
Another note is that there was no such problem after dri moved to xorg (and its kbd version). Don't know if this has been solved in later xfree86 editions.
Anyway, best regards and congratulations for the excellent work!
Paulo
<snip>
Regards!
Paulo
Re: [Qemu-devel] Still some keyboard problems (was: ESC key problems & keyboard problems)
Hi everyone, Oliver!
Still some keyboard problems: if I don't load any keyboard layout, I still don't get the "/" and "?" keys...
Now, if I load the pt-br layout "-k pt-br", yes, I get both the "/" and "?" key and now the "ESC" is "there"; However, the "accent" keys ("'", "`", "^" and "~" keys) don't work anymore... :(
(Please notice the "accent" keys work when I don't load any keyboard layout...)
PS: The version I'm using is cvs from March 10, 2005, with kqemu.
Is there anyone directly in charge of the keyboards layouts?
Again, congratulations for the good work and best regards!
Paulo
Quoted 65 lines · Paulo R. Dallan
Hi!
Quoted 5 lines · Oliver Gerlich
There was a fix in CVS some days ago which made ESC available with keymaps. If you get errors on your console when pressing ESC, you should try a newer CVS snapshot.
Oliver Gerlich
Thank you Oliver, I'm going try that... On this aspect, just a note, is there an specific way to *uninstall* a previous version of qemu (the one I have here I compiled from sources), or should I just download/recompile and install over the old files? (I know, it may not be advisable to do this with many applications, but in some others as the files are the same and just replaced, there are not many problems)...
Still regarding the key problem, who would be in charge of the keyboards lay-outs? (In relation to the kbd Brazilian abnt2 keyboard issue I mentioned in my previous e-mail...)
Quoted 45 lines
Quoted 44 lines · Paulo R. Dallan
Hi!
I've been using qemu/kqemu in a linux host - very nice work folks, congratulations.
I'm just having a little keyboard problem. Unfortunately, if I don't choose a keyboard layout ("-k pt-br"), the key "/" and "?" is not recognized either in Linux or Windows (its a Brazilian ABNT2 keyboard).
However, when I choose a keyboard map ("-k en-us", for example), the ESC key does not work.
Is anyone having the same problem?
PS: Just a side note, some time ago, there was a similar little bug in kbd, after compiling dri - open source video acceleration drivers - from sources, by which certain keys - especially this "/" and "?" key was not recognized; I noticed the problem after installing a dri video driver from source, and solved it through the quick & dirty solution I described here:
http://sourceforge.net/mailarchive/message.php?msg_id=7263141
More comments about it here:
http://sourceforge.net/mailarchive/message.php?msg_id=7264988
and here:
http://sourceforge.net/mailarchive/message.php?msg_id=7289423
Considering that according to information contained in qemu source files related to the keyboard layouts, same are based on kbd, and as it seems some information may have come from Red Hat 7 or 9.0
(http://fabrice.bellard.free.fr/qemu/qemu-doc.html#TOC42), which uses xfree86 (which dri also used at the time), there may be some connection between the problems and the solution to this little annoyance in qemu may be related (not sure how the keymaps are used in qemu though)...Another note is that there was no such problem after dri moved to xorg (and its kbd version). Don't know if this has been solved in later xfree86 editions.
Anyway, best regards and congratulations for the excellent work!
Here is what did my scripts in order to install the bootloader :
---/sbin/losetup $(loop_device_2) $(disk_image).tmp && \
mount -t proc none $(tree)/proc && \
$(chroot) $(tree) /bin/bash install_grub.sh && \/sbin/losetup -d $(loop_device_2) && \
---
with 'install_grub.sh':
---/usr/sbin/env-update && source /etc/profile &&
echo using this device map for GRUB: &&
echo --- &&
cat dev.map &&
echo --- &&
grub --device-map=dev.map <<END
root (hd0,0)
setup (hd0)
END
---
But it never worked. Could your tool help me ?
Quoted 37 lines · Magnus Damm
Hello,
Quoted 9 lines · Jérôme Bouat
I would generate a Gentoo Linux disk image for QEmu.
This source based Linux distro can be configurated to generate hardware specific binaries through its package management system.
I previously tried with Bochs. Therefore, I wrote some scripts. The main part of the generation was made in a Linux chrooted environment on a real host which was compatible with the emulated host. The disk image generation was blocked by the boot loader installation step.
I'm not sure I understand your question. Is the problem that the chrooted environment was unable to install a bootloader for the target system?
I've hacked up a filesystem manipulation tool that is available for download at:
http://www.smallworks.com/~jim/fsimage/
The tool is actually a shell script and a small x86 distribution that together are used to access filesystems independent of root access or host kernel configuration. Needless to say, the tool depends on QEMU. 0.6.1 or newer.
I am not sure if the tool is of interest for you, but maybe it helps.
/ magnus
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Hello again,
Quoted 21 lines · Jérôme Bouat
Here is what did my scripts in order to install the bootloader :
---/sbin/losetup$(loop_device_2) $(disk_image).tmp && \
mount -t proc none $(tree)/proc && \
$(chroot) $(tree)/bin/bashinstall_grub.sh&& \/sbin/losetup-d $(loop_device_2) && \
---with '
install_grub.sh':
---/usr/sbin/env-update&& source/etc/profile&&
echo using this device map for GRUB: &&
echo --- &&
cat dev.map &&
echo --- &&
grub --device-map=dev.map <<END
root (hd0,0)
setup (hd0)
END
---
Quoted 1 line
But it never worked. Could your tool help me ?
Grub is not included in my tool, so I guess it won't help you in this case. But feel free to add grub and send a patch to me. =)
Have you tried executing the commands one by one to see exectly where things fail? Verify that the chrooted environment has all the required device nodes and libraries.
/ magnus
Re: [Qemu-devel] Still some keyboard problems
In reply to Paulo R. DallanQuoted 6 lines · Paulo R. Dallan
Hi everyone, Oliver!
Still some keyboard problems: if I don't load any keyboard layout, I still don't get the "/" and "?" keys...
Now, if I load the pt-br layout "-k pt-br", yes, I get both the "/" and "?" key and now the "ESC" is "there"; However, the "accent" keys ("'", "`", "^" and "~" keys) don't work anymore... :( (Please notice the "accent" keys work when I don't load any keyboard layout...)
Quoted 8 lines
PS: The version I'm using is cvs from March 10, 2005, with kqemu.
Is there anyone directly in charge of the keyboards layouts?
Again, congratulations for the good work and best regards!
Paulo
Maybe the keymaps don't contain all keys yet, or qemu doesn't support the keys mentioned... In the latter case, you should see messages like "no scancode found for ..." on the console if you press such a key. If no such error appears, the problems is probably in the keymap files which are somewhere under /usr/share/ ... I think :) . In this case, you could experiment with your keymaps and try to add support for your keys - other users would surely appreciate this.
About the key problems if not using a keymap: it looks as if this old method is "obsoleted" by keymap support; IIRC other keyboard improvements (like Windows keys) were only added to keymaps (internally, there's a hardcoded keymap in qemu which is used when no -k option is given; this really looks obsolete :).
Good luck,
Oliver
[Qemu-devel] x86 emulated hardware : which make.conf options ?
In reply to Jérôme BouatI would like to install Gentoo Linux on QEmu.
I want to compile some programs in order to fit QEmu emulated hardware.
Here are the flags I assume to fit emulated hardware :
I choosed -Os to optimize global speed (with emulation). Is it true ?
---
CFLAGS="-Os -fomit-frame-pointer -pipe -march=i386 -mno-mmx -mno-3dnow -mno-sse2"
CXXFLAGS="${CFLAGS}"
---
What do you think about it ?
Thanks,
Jérôme
Re: [Qemu-devel] x86 emulated hardware : which make.conf options ?
Quoted 5 lines · On Fri, 1 Apr 2005, [ISO-8859-1] J�r�me Bouat wrote:
I would like to install Gentoo Linux on QEmu.
I want to compile some programs in order to fit QEmu emulated hardware.Here are the flags I assume to fit emulated hardware :
I choosed -Os to optimize global speed (with emulation). Is it true ?
-Os provides resulting binary size optimizations. If you would like to optimize for speed then you should probably use -O2 (which is general) or -O3 (which is quite code specific and sometimes leads to slowdown)
Cheers,
Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com
Re: [Qemu-devel] x86 emulated hardware : which make.conf options ?
In reply to Jérôme BouatUse the same optimizations you should use in a real Pentium II.
You can also enable SSE and SSE2 (but not Pentium III or Pentium 4), as QEMU emulates them.
Quoted 25 lines · Jérôme Bouat
I would like to install Gentoo Linux on QEmu.
I want to compile some programs in order to fit QEmu emulated hardware.Here are the flags I assume to fit emulated hardware :
I choosed -Os to optimize global speed (with emulation). Is it true ?
---
CFLAGS="-Os -fomit-frame-pointer -pipe -march=i386 -mno-mmx -mno-3dnow -mno-sse2"
CXXFLAGS="${CFLAGS}"
---What do you think about it ?
Thanks,
Jérôme_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] x86 emulated hardware : which make.conf options ?
Quoted 3 lines · Natalia Portillo
Use the same optimizations you should use in a real Pentium II. You can also enable SSE and SSE2 (but not Pentium III or Pentium 4), as QEMU emulates them.
Do you have any facts to substatiate this statement?
The pentium 2, 3, and 4 all support the same core instruction set, the only difference being sse and sse2. From the qemu point of view a pentuim3/4 is just a pentium2 with sse/sse2.
Qemu emulates the x86 instruction set. It does not implement the microarchitecture of a particular implementation. I haven't done any tests, but I'd expect the performance characteristics of qemu are significantly different to those of a real CPU.
-Os optimizes for code size, not speed. This may be faster than -O2 in some cases, but I'd be surprised if that was true in general.
Paul
Re: [Qemu-devel] x86 emulated hardware : which make.conf options ?
Yes, there are a lot of added instructions for P3 and P4, just see the Intel IA-32 manual. For example, there is CMPXCHG16B in P4, but not in P3 nor P2.
Quoted 28 lines · Paul Brook
Quoted 3 lines · Natalia Portillo
Use the same optimizations you should use in a real Pentium II. You can also enable SSE and SSE2 (but not Pentium III or Pentium 4), as QEMU emulates them.
Do you have any facts to substatiate this statement?
The pentium 2, 3, and 4 all support the same core instruction set, the only difference being sse and sse2. From the qemu point of view a pentuim3/4 is just a pentium2 with sse/sse2.
Qemu emulates the x86 instruction set. It does not implement the microarchitecture of a particular implementation. I haven't done any tests, but I'd expect the performance characteristics of qemu are significantly different to those of a real CPU.
-Os optimizes for code size, not speed. This may be faster than -O2 in some
cases, but I'd be surprised if that was true in general.Paul
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel