welcome to the world of…

Looks like a small bulb used to indicate something unusual, like a malfunction.

Emulating Raspberry Pi

Filed under: Uncategorized — Tags: , , , , , , — admin @ 2012-03-04 11:47

My friend asked me if there is any possibility to try Raspberry Pi disk image in MS Windows. What a challenge! It wasn’t any challenge at all since I found almost everything prepared.

First of all you need the disk image and appropriate linux kernel. Then download QEMU for Windows. Unzip the QEMU somewhere. Copy the the disk image debian6-17-02-2012.img and the kernel zImage_3.1.9 into the directory with unpacked QEMU. Then open shell/cmd and run:

bin\qemu-system-arm.exe -M versatilepb -cpu arm1136-r2 -hda debian6-17-02-2012.img
                       -kernel zImage_3.1.9 -m 192 -append "root=/dev/sda2"

Be patient because it could take few minutes to get even to the login phase. Login/password is pi/suse. After you log in run “startx” to enter the graphical environment. That’s it!

Similar procedure is possible for Linux as well. In Ubuntu you need qemu-kvm-extras package which contains qemu-system-arm executable.

13 Comments

  1. […] Co budeme potřebovat: (zde původní návod v angličtině) […]

    Pingback by Emulace Raspberry Pi – zkraťte si čekání | RASPI.cz — 2012-03-04 @ 13:24

  2. Default login
    Username: pi Password: raspberry
    Note changed password!

    Comment by Rickyboy_3000 — 2012-04-17 @ 12:56

  3. I hope, that I will have some time for playing with this.

    Comment by Martin K. — 2012-04-25 @ 10:59

  4. Thanks for the instructions above, I am sending this message from the Midori web browser inside the arm emulation of Qemu just as you described. Also the login was still pi/suse .

    Networking worked straight off.

    cheers

    Comment by andyl — 2012-05-03 @ 21:48

  5. Further to my previous note. I already had tightvnc installed, so that probably helped with the networking coming up straightaway.

    As I have a US keyboard and really wanted the keyboard mapping to work correctly I ran the following:

    dpkg-reconfigure locales
    dpkg-reconfigure console-setup
    dpkg-reconfigure keyboard-configuration.

    I’m not sure that I needed all three of these, I certainly did need the last one, and made sure to select a US keyboard. Now no pound sign where I don’t expect it, and the @ is in the “right” place for the physical keyboard etc.

    Also to change my time zone
    dpkg-reconfigure tzdata

    Hope this helps others as it took me a while to find all of the information, as so many helpful hints expect a fully graphical environment to set these things, and the minimalist things in the image and lxde do not have all these luxuries.

    73

    Comment by andyl — 2012-05-03 @ 22:51

  6. How do I use other screenresolutions then VGA? The x86 version of QEMU can use the VESA standard screen, how can I do the something similar in the ARM version?

    Comment by Jaix Bly — 2012-07-05 @ 09:52

  7. […] bridging the QEMU to the Ubuntu host, which was bridged itself. I stumbled upon a page about emulating a Rasberry Pi within QEMU on Windows. The QEMU download link there was the […]

    Pingback by QEMU on Windows | Nicholas Earwood — 2012-07-06 @ 02:38

  8. Jaix Bly: I tried Xorg vesa driver but no success there.

    Comment by admin — 2012-07-06 @ 11:36

  9. In wait for the real thing this is a really good way to get a feel for how the raspberry pi will work ones they can deliver the hardware. Not to mention to train and test plus make configurations in the image that will be flshed to the sd before it is flashed.
    To make the image more usable I use to resize the image.
    To do so make a copy to the original image recize it and boot the original in the emulator and use geparted to recize the partition in the second HDD within x11 using the following commands:
    Windows
    copy debian6-19-04-2012.img debian6-19-04-2012-conf.img

    qemu-img resize debian6-19-04-2012-conf.img +2G
    (to get 4G image)
    bin\qemu-system-arm.exe -M versatilepb -cpu arm1136-r2 -hda debian6-19-04-2012.img -hdb debian6-19-04-2012-conf.img -kernel zImage_3.1.9 -m 192 -append “root=/dev/sda2”
    (to start the original 2G image with the new 4G image as second HDD not locked and able to recize with gparted)
    startx
    Then start gparted within x11
    Select the second hdd /dev/sdb
    Select the last partitions (linux-swap) and choose menu “Partition – Change size/move” change free size after the partition to zero and click Move.
    Select the middle partition (/dev/sdb2) drag the right arrow to the far right to resize the partition to fill the HDD and click Change size.
    Now click the the right arrow in the icon-bar to apply the changes, selct ok on the “are you sure” question.
    After a lot of time the GParted is done changing the image for you.
    Turn off the image using the powerswitch and select “Shut down”
    change back to the old qemu startup command
    bin\qemu-system-arm.exe -M versatilepb -cpu arm1136-r2 -hda debian6-19-04-2012-conf.img -kernel zImage_3.1.9 -m 192 -append “root=/dev/sda2”
    Boot the image now 4G large.
    Enjoy!

    Comment by Jaix Bly — 2012-07-09 @ 14:07

  10. Jaix Bly: Nice guide, thanks!

    Comment by admin — 2012-07-09 @ 16:24

  11. Ps. If you like it it’s ok by me if you use the guide and make a new page and remove this very long comment to get this page cleaner.
    /Jaix

    Comment by Jaix Bly — 2012-07-09 @ 16:43

  12. Jaix Bly: I’ll keep your comment, tidiness is not necessary here. Feel free to make a new page. Then you can post link here.

    Comment by admin — 2012-07-10 @ 10:32

  13. Excellent guide. Worked like a charm.

    // I am posting this from inside the emulator. Needless to say the networking worked right out of the box.

    Comment by Raja — 2013-01-04 @ 06:08

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.