Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Official image and QEMU?

Sun Apr 15, 2012 11:04 am

(I seek confirmation and/or clarification on the text below)

When you are running under QEMU, the kernel is specified "externally" (as a command line arg to QEMU - and the file must exist "externally" - i.e., in the host system's file structure) - with the result that the kernel (and any modules associated with that kernel) that is stored inside the "image" are ignored.  They (that kernel and modules) play no part in the booting or running of the booted image.

Further, there is no mechanism for loading modules "from the outside" so the effect of all of this is that the running system (in QEMU) cannot use modules.  Everything that you need must be in the kernel file proper.  The effect of this is, e.g., that Samba doesn't work, because the code for smbfs was not compiled into the kernel.

Normally, this is not a problem, because the modules are only needed for supporting "non-vanilla" hardware - and the machine hardware exposed by QEMU is all very vanilla.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Official image and QEMU?

Sun Apr 15, 2012 11:09 am

Joe: once you've booted, you're totally able to load modules from your chosen rootfs. It's just that the modules included in the RPi image may not work with your arm1176 versatilepb kernel (also, the rpi kernel config doesn't enable all that many modules so may not have what you want anyway). Just compile the modules when you compile your kernel for qemu and put them in /lib/modules on your rootfs.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11739
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Official image and QEMU?

Sun Apr 15, 2012 1:05 pm

Abishur said:


Any program that runs in the emulator should run in the real hardware, although it should faster in the real hardware, unless you've got a really fast PC.


Yes, and you should remember to set the emulator to the right memory size corresponding to the memory split and video capabilities you want to use: 192MB of RAM is default, but 224MB is also possible (if your system doesn't use advanced multimedia), and 128MB should be used if you are emulating a system with the capability to run (for example) XBMC capabilities. Or when using advanced 3D (like in video games).

m4r35n357
Posts: 22
Joined: Fri Jul 06, 2012 4:31 pm

Re: Official image and QEMU?

Sat Jul 07, 2012 3:49 pm

bob_binz wrote:Hmm,
Having re-read through this thread, it seems people have internet access "out of the box".  Is that the case?  It didn't work for me, so I had to muck about.
You are not alone, I don't get networking either (Ubuntu ), I'm not a newbie by any means ;) I can probably get it going manually, but Id be much more interested to know why it isn't working by default, and why there aren't loads of questions about this . . .

m4r35n357
Posts: 22
Joined: Fri Jul 06, 2012 4:31 pm

Re: Official image and QEMU?

Mon Jul 09, 2012 4:36 pm

m4r35n357 wrote: You are not alone, I don't get networking either (Ubuntu ), I'm not a newbie by any means ;) I can probably get it going manually, but Id be much more interested to know why it isn't working by default, and why there aren't loads of questions about this . . .
Yuck, I must remember PING DOES NOT WORK WITH USER MODE NETWORKING IN QEMU! Maybe this will save someone else's sanity at some point (perhaps even mine).

gosaoro
Posts: 1
Joined: Wed Oct 03, 2012 4:14 pm

Re: Official image and QEMU?

Wed Oct 03, 2012 4:21 pm

Hello

I have Raspbian running with Qemu for windows i have succeeded a 800x600 resolution.

How can i to set a 1024x768 resolution?

Regards

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: Official image and QEMU?

Thu Oct 04, 2012 6:27 am

1024x768 works only with Depth 8 (256 colors), it is very ugly (see screenshot) I tried it in the past on windows and Linux as host with qemu 1.1.1, qemu 1.2.0 and now with the latest linaro qemu, still the same. If I change Depth & DefaultDepth back to 16 it switched automatically to 800x600. I think it is a limitation of qemu-system-arm.
Here is my xorg.conf (change the keyboard layout for your country):

Code: Select all

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "de"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
EndSection

Section "Device"
        Identifier      "Configured Video Device"
        Driver  "fbdev"
        Option          "UseFBDev"              "true"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
        DefaultDepth 8
        SubSection "Display"
            Depth 8
            Modes "1024x768" "800x600" "640x480"
        EndSubSection
EndSection
xorg8depth.png
xorg8depth.png (60.38 KiB) Viewed 2721 times

Return to “General discussion”