Instructions to Run Raspberry Pi Fedora 14 Remix in QEMU

As mentioned in my previous post, the Raspberry Pi Foundation has just released the Fedora 14 Remix SD card image that can be installed either via  installer (easiest method) or using dd / windd as with the previous image.

In this blog post, I’ll give the instructions how to run Raspberry Pi Fedora 14 Remix in QEMU using a similar method than the one I used for Debian Squeeze. I tested since in machines with Ubuntu 10.04 LTS and Debian 6.0.4.

  1. Download the image using BitTorrent raspberrypi-fedora-remix-14-r1.img.gz.torrent or via the HTTP link available on Raspberry Pi Download page.
  2. Decompress the image:
  3. Download kernel 3.0.4 image for qemu, if you don’t have it yet.
  4. Since the rootfs is full (in the real board it will be resized to the size of the SD Card), we need to increase the size of the rootfs partition. First create and empty 3G image and format it to ext3:
  5. Find the offset for the rootfs in the SD card image, mount it and copy the files to the new image:

    #file raspberrypi-fedora-remix-14-r1.img
    raspberrypi-fedora-remix-14-r1.img: x86 boot sector; partition 1: ID=0xb, active, starthead 0, startsector 2048, 204800 sectors; partition 2: ID=0x83, starthead 0, startsector 206848, 3246080 sectors, code offset 0xb8
    mkdir mnt
    mkdir mnt2
    sudo mount -o loop,offset=$[206848*512] raspberrypi-fedora-remix-14-r1.img mnt
    sudo mount -o loop rootfs3G.ext3 mnt2
    sudo cp mnt/* mnt2 -a
    sudo umount mnt2
    sudo umount mnt

  6. Build the latest qemu-linaro (Optional) . This fixes the “qemu-system-arm: slirp/arp_table.c:41 ” error for me  (Cf Note 1 at the bottom of this post). Following the instructions at http://www.cnx-software.com/2012/03/08/how-to-build-qemu-system-arm-in-linux/:
  7. Run QEMU as follows:

    qemu-system-arm -M versatilepb -cpu arm1176 -m 192 -hda rootfs3G.ext3 -kernel zImage -append "root=/dev/sda" -serial stdio -redir tcp:2222::22

    There is no password as the first time the image runs, it will ask you to set the root password, create a regular user and set a password for that user, select your timezone, and select whether you wish to boot into graphical or text mode.  The very first time, it will stay in terminal mode even if you selected Graphical mode.  Login as root to access the command line and change the permissions of the temp directory:


    You can now either  reboot your emulator or type “init 5” to start the graphical interface.

    If for some reasons you have no access to the keyboard in the graphical interface, you can always login to qemu via ssh to access the command line:

Once you followed those steps and selected graphical mode, you should see a login screen that looks like the one below.

Raspberry Pi QEMU
Raspberry Pi Fedora 14 Remix in QEMU

Note 1: If you get the following error:

qemu-system-arm: slirp/arp_table.c:41: arp_table_add: Assertion `(ip_addr & (__extension__ ({ register unsigned int __v, __x = (~(0xf << 28)); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ (“bswap %0” : “=r” (__v) : “0” (__x)); __v; }))) != 0′ failed.
Aborted

You can either add “-net none” to make it “work”, but you won’t have network access or try step 6 in the instructions above.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
58 Comments
oldest
newest
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications