Using QEMU on Troubleshooting: Difference between revisions
Jump to navigation
Jump to search
(move of Image Configuration with clarification) |
m (Reverted edits by 211.39.150.104 (Talk) to last version by Walter) |
||
(15 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
#REDIRECT [[Emulating the XO/Help and tips]] |
|||
More often than not, technology manages to get us 95% of the way... being the last 5% a mix of magical incantations, rituals and other esoteric activities only clear to the initiated. This page tries to take some of the magic away from the ''sufficiently advanced science'' |
|||
== Image Configuration == |
|||
Some changes are needed to get the image to work correctly in simulation mode: |
|||
* If keyboard and mouse don't work, you need to "modprobe i8042" on the serial console (Ctrl-Alt-3 in QEMU) until it doesn't complain anymore. |
|||
* Configuring X: In some builds X is configured to load the Geode driver by default. You need to modify it to load the frame buffer driver instead. In /etc/X11/xorg.conf, go to the "Device" section and change the Driver setting from "amd" to "fbdev" |
|||
* Setting Framebuffer resolution: the framebuffer is set to 640x480 by default, edit the VGA kernel parameter in /boot/grub/grub.conf from 0x311 to 0x317 to get 1024x768: |
|||
<table border=1> |
|||
<tr><td> </td><td> 640x480 </td><td> 800x600 </td><td> 1024x768 </td><td> 1280x1024 </td></tr> |
|||
<tr><td>256 </td><td> 0x301 </td><td> 0x303 </td><td> 0x305 </td><td> 0x307</td></tr> |
|||
<tr><td>32k </td><td> 0x310 </td><td> 0x313 </td><td> 0x316 </td><td> 0x319</td></tr> |
|||
<tr><td>64k </td><td> 0x311 </td><td> 0x314 </td><td> 0x317 </td><td> 0x31A</td></tr> |
|||
<tr><td>16M </td><td> 0x312 </td><td> 0x315 </td><td> 0x318 </td><td> 0x31B</td></tr> |
|||
</table> |
|||
Note: You will not be able to view etoys properly if you do not change the screen resolution to 0x317 |
|||
* To get networking to be enabled by default via qemu's built-in DHCP, as root change ONBOOT from "no" to "yes". You also must disable the Network manager |
|||
nano /etc/sysconfig/network-scripts/ifcfg-eth0 |
|||
mv /etc/rc5.d/S98NetworkManager /etc/rc5.d/K98NetworkManager |
|||
== Sound == |
|||
Latest images add support of sound. Emulation does not work properly with Tam-Tam, yet, even with kqemu at 2 GHz Pentium4 (performance or insufficient emulation issue?) |
|||
== Keyboard and Mouse == |
|||
A typical case is that their keyboard and mouse don't work. A solution to the problem is: |
|||
#Make sure the the window has the focus (label should say <tt>QEMU - Press Ctrl-Alt to exit grab</tt>). |
|||
#Press <tt>Alt + Ctrl + 1</tt> (or <tt>Alt + Ctrl + 3</tt>) to enter the terminal mode of the OLPC. Notice that QEMu seems to respond better to by pushing first down Ctrl, after Alt and finally the number. |
|||
#Make sure that you're logged in. |
|||
#*If not, just hit <tt>enter</tt> and it'll ask you to. |
|||
#*Login as <tt>root</tt> (no password is required) |
|||
#Type <tt>modprobe i8042</tt> (oddly, you may need to try this multiple times before it works, so ''keep trying!'') |
|||
[[Image:Tty1_ps.PNG]] |
|||
#Press <tt>Alt + Ctrl + 7</tt> to return to the graphical mode of the OLPC. |
|||
#Your keyboard and mouse should be working fine. |
|||
#*Usually the result is a continuous series of 1's will flow (as if the key is stuck) |
|||
#*Just hit any key (to stop it) and delete the offending 1's |
|||
Alternatively you can use the developers console and <tt> su </tt> command. Quote from [[BTest-1_Release_Notes]] |
|||
The terminal (activity) does not appear on the Frame, but can be launched by typing Alt-Shift-F11. |
|||
(F11 is found in the 3rd position from the left in the Volume Slider key.) |
|||
Note that on some newer builds, the terminal window (Memphis) is launched by typing Alt-Shift-F12. |
|||
In even more recent builds, e.g., '''Build 224, Memphis is launched by typing Alt-View_Source or Alt-F12'''. |
|||
See also [[Sugar_Instructions#Terminal_.28linux_prompt.29]] |
|||
== Network == |
|||
Chances are that the network will not be enabled. Following are two possible ways to enable it. |
|||
=== Enabling the Network Alternative #1 === |
|||
When the emulator is starting GRUB boot loader, press a key. |
|||
#Choose then the Qemu line with arrow keys. |
|||
#Press ''E'' |
|||
#Move to the 'Kernel' line and press ''End'' |
|||
#Add ''1'' to end of the line |
|||
#Press ''Enter'' |
|||
#Press ''B'' |
|||
You will be automaticaly log in as superuser in terminal windows in single user mode. |
|||
You can start network and put your local keyboard layout command there like this (using tabulator key to complete the filenames): |
|||
echo ifup eth0: >> /etc/rc.local |
|||
echo loadkeys ''Your_two_letter_country_code'' >> /etc/rc.local |
|||
. /etc/rc.local |
|||
Next time you start the image keyboard layout and network should work automatically. |
|||
You can then change '''XKbLayOut''' in the file ''/etc/X11/xorg.conf'' to your country code with for example '''nano''' text editor by |
|||
nano /etc/X11/xorg.conf |
|||
If you want to use '''nano''' for other system file edits, disable the line wrap by '''Alt-L''' . |
|||
=== Enabling the Network Alternative #2 === |
|||
Make sure the the window has the focus (label should say <tt>QEMU - Press Ctrl-Alt to exit grab</tt>). |
|||
If the following keys do not work try pushing also the Shift key down to exit the Sugar environment. |
|||
If it does not work see the sendkey method of Alternative #3 |
|||
# |
|||
#Press <tt>Alt + Ctrl + 1</tt> to enter the terminal mode of the OLPC. |
|||
#Make sure that you're logged in. |
|||
#*If not, just hit <tt>enter</tt> and it'll ask you to. |
|||
#*Login as <tt>root</tt> (no password is required) |
|||
#Type <tt>dhclient</tt> |
|||
#Press <tt>Alt + Ctrl + 7</tt> to return to the graphical mode of the OLPC. |
|||
#Your browser / network connection should be working fine. |
|||
=== Enabling the Network Alternative #3 === |
|||
The steps below work on QEmu regardless of which operating system you are running. |
|||
'''If you are having trouble getting an internet connection inside QEmu:''' |
|||
Get the image running in QEmu so that you can see the normal view with the XO icon in the middle. |
|||
[[Image:Empty_no_apps_no_frame.png|300px]] |
|||
Make sure your mouse is active in QEmu, then press ctrl+alt+2 together. |
|||
This will bring up a screen like a command line, called the QEmu monitor. |
|||
Type the following: |
|||
sendkey ctrl-alt-f1 |
|||
And press return. |
|||
Then with the keyboard hold down the following keys: '''ctrl+alt+7''' |
|||
Another text based screen will appear, asking you to log-in. Sometimes there can be an extra "1" after the word "Login:", just delete it. Type '''root''' and press return |
|||
Then type: |
|||
dhclient |
|||
or |
|||
ifup eth0: |
|||
You should see the screen fill with text. |
|||
[[Image:QEmu_running_dhclent.png|400px]] |
|||
Some of the numbers have been removed from the screenshot above - they're not important. |
|||
Then hold down the following keys on the keyboard: '''ctrl+alt+2''' |
|||
and type the following: |
|||
sendkey ctrl-alt-f7 |
|||
Then using the keyboard, hold down the following keys: '''ctrl+alt+1''' |
|||
Now open the browser and you should have internet access. |
|||
[[Image:Sugar_browser_with_frame_google_home_page.png|300px]] |
|||
[[Image:OLPC_20070104.png|300px]] |
|||
[[Category:Emulation]] |
|||
[[Category:Feedback]] |
|||
[[Category:OS]] |
|||
[[Category:Developers]] |
Latest revision as of 06:12, 17 December 2008
Redirect to: