Archive

Posts Tagged ‘qemu’

Top 10 Posts of 2012 on CNXSoft Blog

December 31st, 2012 5 comments

This is the last day of the year, so it’s probably a good time to look back and see what interested people on this blog. This has been a banner year for low cost ARM devices and boards starting with the Raspberry Pi, then MK802 and the new mini PCs / HDMI TV dongles / PCs-on-a-stick (whatever you want to call them) that came after, always cheaper and faster. Those low cost devices have in turn made people really interested in ARM Linux, and lots of development on those little devices and boards started.

The top 10 posts of 2012, according to page views, reflect just those trends:

  1. 74 USD AllWinner A10 Android 4.0 Mini PC (May 2012) – MK802 started the whole “low cost mini PCs” craze, and drove the most traffic to this blog this year. People got excited about the price, form factor, and the possibility to run both Android and other Linux based operating systems.
  2. MK802 II Mini PC Now Costs as Much as Raspberry Pi Model B. Let’s Compare Them! (December 2012) – This post features the 2 stars of 2012: the Raspberry Pi and MK802 II HDMI TV donglwe (MK802 with 1GB RAM). As both device can now be bought for $35, and allow you to do very similar things, it’s was time for a head-to-head comparison. I’ve just written about it last week, and it got Slashdotted.
  3. WM8850-MID Android 4.0 Tablet Unboxing and Review (June 2012) – At the time, this Eken W70 clone featuring Wondermedia WM8850 Cortex A9 processor was a real bargain for $72 (including shipping). The firmware has a few issues however, and that’s what drove people to this post: looking for solutions.
  4. AllWinner A10/A1X Processor Resources, Development Board and SDK (December 2011) – This post was written just about one year ago, but traffic was steady all year, as people want to find out how to hack their AllWinner A10 tablets, media players and mini PCs.
  5. Mele A1000: AllWinner A10 (Cortex A8) Based Hackable Android STB (March 2012) – The Mele A1000 was my first Android device, and it got popular thanks to its relatively low cost, available ports (3x USB, SATA, VGA, HDMI…), and serial port which made it ideal for development of U-boot and the kernel. I still think it’s a good platform, but since then low cost development boards such as the Cubieboard has made it a little less attractive, and interest has somewhat faded in the last few months.
  6. Valueplus Tizzbird Stick N1: Android 4.0 HDMI/USB Media Player Dongle (March 2012) -  The Tizzbird Stick N1 was one the first mini PCs, and was showcased at CeBit 2012 several months before MK802. Unfortunately, it took many more months to finalize the design, and the product never took off, as other cheaper Telechips TCC892x based mini PCs appeared on the market. The only reason it got traffic is because I mentioned it in the $74 MK802 post at the top of this list.
  7. Mele A1000 Android 2.3 STB Unboxing and Review (April 2012) – In March, I was still waiting for the Raspberry Pi launch, but I noticed Barry Kauler (Puppy Linux) bought the Mele A1000 to keep him busy while he was also waiting for his Pi, and seeing the development around AllWinner A10, I decided to buy one as well. Apparently, I was not the only one interested as many people came here to read my review of this nice hackable media player.
  8. Mele A2000 Android 2.3 Media Player Powered by AllWinner A10 (April 2012) – The Mele A2000 is the little sister of the Mele A1000, which the same hardware, just a difference casing.
  9. Linaro Android Puts Stock Android To Shame on TI Pandaboard (OMAP4430) (June 2012) – Linaro showcased a demo showing an optimized version of Android could deliver twice the performance of stock Android on a particular benchmark running in Pandaboard. Bero commented on my post with details, and the post quickly became viral as developers wanted to give it a try. It turned out the improvement is actually more like 15 to 20%, but this is enough to double the framerate of this benchmark due to Vsync synchronization. It may also work in real games.
  10. Raspberry Pi Emulator in Ubuntu with Qemu (October 2011) – In 2011 and early 2012, the Raspberry Pi foundation promised much in terms of schedule, but initially failed to deliver, and many people get desperate enough to check the instructions to emulate an ARMv6 device and run Debian in QEMU to get started with development, before the Raspberry Pi hardware is available.

That will be the last post of 2012, so the “hardware team” (pictured below) and I would like to wish you a very happy and prosperous new year 2013, which I’m sure will be as exciting as 2012 for Linux/Android gadgets and boards, and we should see the first big.LITTLE processors and corresponding devices, ever cheaper tablets, smartphones and mini PCs, an interesting Intel vs. ARM fight for mobile devices, a proper XBMC ARM set-top box close to $50, new mobile OSes based on Linux (Tizen, Sailfish OS, Firefox OS…), and more…

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

openSUSE 12.2 for ARM is Now Available for Beagleboard, Pandaboard, Efixa MX and More

November 7th, 2012 No comments

The first stable release of openSUSE for ARM has just been announced. openSUSE 12.2 for ARM is officially available for the Beagleboard, Beagleboard xM, Pandaboard, Pandaboard ES, Versatile Express (QEMU) and the rootfs can be mounted with chroot, but “best effort’ ports have been made for Calxeda Highbank server, i.MX53 Loco development board, CuBox computer, Origen Board and Efika MX smart top.

Work is also apparently being done on a Raspberry Pi port which should be available for the next release.

openSUSE developers explains that almost all of openSUSE builds runs on these platforms (about 5000 packages). Visit “OpenSUSE on your ARM board” for download links and instructions for a specific ARM board. More details are available on the wiki page. openSUSE has limited resources for ARM development, so If you’d like to help with development (e.g. fixing builds), visit ARM distribution howto page to find out how to get involved.

Since I don’t own any of the supported boards, but still want to give it a try, I’ll use the chroot method in a virtual machine running Ubuntu 12.04. There are two images available:

  • JeOS (Just Enough Operating System) image for a minimal system  (openSUSE-12.2-ARM-JeOS-rootfs-*.tbz )
  • XFCE image for a graphical system (openSUSE-12.2-ARM-XFCE-rootfs-*.tbz)

Let’s go for the XFCE image (743 MB):

mkdir -p ~/openSUSE-ARM/rootfs
cd ~/openSUSE-ARM/
wget http://download.opensuse.org/ports/armv7hl/distribution/12.2-untested/appliances/openSUSE-12.2-ARM-XFCE-rootfs.armv7l-1.12.1-Build1.46.1.tbz
sudo tar xvjf *.tbz -C rootfs

after installation, prepare the environment and run chroot:

sudo mount --bind /proc rootfs/proc
sudo mount --bind /sys rootfs/sys
sudo mount --bind /dev rootfs/dev
sudo mount --bind /dev/pts rootfs/dev/pts
sudo cp /etc/resolv.conf rootfs/etc/
sudo cp /usr/bin/qemu-arm-static rootfs/usr/bin/
sudo chroot rootfs

We can now run some commands to show we run openSUSE (zypper is the equivalent of apt-get in SUSE):

VBOXUBUNTU:/> zypper ref
Retrieving repository 'openSUSE-12.2-ARM-Repo-OSS' metadata...
Building repository 'openSUSE-12.2-ARM-Repo-OSS' cache ...................[done]
Retrieving repository 'openSUSE-12.2-ARM-Updates' metadata ..............[error]
Repository 'openSUSE-12.2-ARM-Updates' is invalid.
[|] Valid metadata not found at specified URL(s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'openSUSE-12.2-ARM-Updates' because of the above error.
Some of the repositories have not been refreshed because of an error.
VBOXUBUNTU:/> zypper up
Retrieving repository 'openSUSE-12.2-ARM-Updates' metadata ..............[error]
Repository 'openSUSE-12.2-ARM-Updates' is invalid.
[|] Valid metadata not found at specified URL(s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Disabling repository 'openSUSE-12.2-ARM-Updates' because of the above error.
Loading repository data...
Reading installed packages...

Nothing to do.

VBOXUBUNTU:/> zypper in gcc make SDL-devel
Retrieving repository 'openSUSE-12.2-ARM-Updates' metadata ..............[error]
Repository 'openSUSE-12.2-ARM-Updates' is invalid.
[|] Valid metadata not found at specified URL(s)
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Disabling repository 'openSUSE-12.2-ARM-Updates' because of the above error.
Loading repository data...
Reading installed packages...
'SDL-devel' not found in package names. Trying capabilities.
Resolving package dependencies...
The following NEW packages are going to be installed:
alsa-devel fontconfig-devel font-util freetype2-devel gcc gcc47 gccmakedep
glibc-devel imake libdmx-devel libdrm-devel libdrm_nouveau1 libdrm_omap1
...
Mesa-libGLU-devel Mesa-libIndirectGL1 python-xcb-proto-devel site-config
xbitmaps-devel xcb-util-devel xorg-cf-files xorg-sgml-doctools xorg-x11-devel
xorg-x11-proto-devel xorg-x11-util-devel xtrans zlib-devel

119 new packages to install.
Overall download size: 15.9 MiB. After the operation, additional 78.3 MiB will
be used.
Continue? [y/n/?] (y): y
Retrieving package Mesa-libGLESv1_CM1-8.0.4-20.4.2.armv7hl
(1/119), 28.7 KiB ( 29.5 KiB unpacked)
Retrieving: Mesa-libGLESv1_CM1-8.0.4-20.4.2.armv7hl.rpm ......[done (7.5 KiB/s)]
Retrieving package Mesa-libGLESv2-2-8.0.4-20.4.2.armv7hl
(2/119), 27.4 KiB ( 21.5 KiB unpacked)
Retrieving: Mesa-libGLESv2-2-8.0.4-20.4.2.armv7hl.rpm .......[done (29.0 KiB/s)]
Retrieving package Mesa-libIndirectGL1-8.0.4-20.4.2.armv7hl
(3/119), 766.1 KiB ( 3.0 MiB unpacked)
....
Installing: Mesa-devel-8.0.4-20.4.2 ......................................[done]
Installing: xorg-x11-devel-7.6-37.1.2 ....................................[done]
Installing: libSDL-devel-1.2.15-2.1.2 ....................................[done]

There seems to be some problems with some repositories, but it basically works. I’ve tried to run startx, but it does not work within the chroot (probably because Xorg does not work in QEMU yet). It’s also possible to use the JeOS image (minimal) using QEMU emulating a Cortex A9 or A15 versatile express board.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Linaro 12.09 Release with Kernel 3.6 and Android 4.1.1

September 28th, 2012 No comments

Linaro release 12.09 has just been announced, and includes Linux Kernel 3.6-rc6 and Android Jelly Bean.

This release provides further improvement to Android Jelly Bean, Android benchmark characterization,  an ARMv8 OpenEmbedded image, UEFI bootloader support for Vexpress, origen and pandabords, and some improvement to big.LITTLE and power management.

Here are the highlights of the release:

  • Android
    • All Linaro patches are now available on Jelly Bean.
    • Accelerated graphics is now available on Snowball Jelly Bean build.
    • AndEBench, AndEBench Java, Linpack, CaffeineMark, Antutu 2D and 3D, NBench, Quadrant, I/O Benchmark, Vellamo benchmark hotspot characterization available.
    • An Origen tracking build is available and will be released this cycle as a Linaro Evaluation Build (LEB).
    • Audio works on Origen running Jelly Bean (WAV file only).
    • A Monkeyrunner script to run Streamline has been completed.
    • First rev of the NI PXIe-4154 based power measurement system is created. See http://www.youtube.com/watch?v=9bKyuxLl4iw&feature=plcp
    • In-tree AOSP tests have been automated.
  • Developer Platform
    • Foundation for the ARMv8 OpenEmbedded porting mostly completed, with kernel and a very minimal rootfs already available for internal usage.
    • Kernel and test components were updated for the big.LITTLE project, based on the requirements for the 12.09 cycle.
    • Substantial progress on the Debian/Ubuntu Perl and Python multi-arch/cross-build support, with enough data to be used and supported during the ARMv8 Debian/Ubuntu bootstrap.
    • Hwpacks for Vexpress, Origen and PandaBoard now also include the support for UEFI, which can be selected while flashing the image with linaro-media-tools.
    • Linux Linaro tree updated with the latest kernel development topics provided by Linaro (including big.LITTLE MP), and also against the 3.6-rc6 upstream snapshot.
  • Infrastructure
    • The hardware pack v3 format now implements the “copy_files” directive, a list of files to copy from an optionally named packages to an optionally named destination.
  • Kernel
    • big.LITTLE System
      • Reordering and code cleanup of In-Kernel Switcher (IKS) is done.
      • Inter-Process Interrupt (IPI) for CPU wake-ups is done and the IKS code was adapted to use it.
      • Hierarchical cache flushing code has been submitted, waiting for acknowledgment and acceptance.
  • OCTO
    • Forward porting of existing UEFI port on Origen to latest UEFI release of Linaro.
  • Power Management
    • Version 8 of the big.LITTLE MP integration tree integrated into LLCT and in use in the TC2 builds. It contains:
      • Updated version of task placement patches for the scheduler.
      • Bug fixes to the mainline scheduler.
      • PMU patches for b.L from ARM.
    • Powertop rebased on upstream 2.1 release. Updated on Ubuntu and Android Linaro Evaluation Builds.
  • Toolchain
    • Linaro GCC 4.7 2012.09, updated to GCC 4.7.1+svn191123
      • Adds support for the NEON vext instruction when shuffling.
      • Backports improvements to scheduling transfers between VFP and core registers.
      • Backports support for the UBFX instruction on certain bit extract idioms.
      • PR54252 ICE with too wide alignment assertion on vectorised code – Fixed.
      • PR54212 ICE due to generating a predicated NEON vdup instruction – Fixed.
    • Linaro GCC 4.6 2012.09, updates to 4.6.3+svn191000.
    • Linaro QEMU 1.2.0 2012.09, rebased on upstream’s 1.2.0 release.
    • Linaro Toolchain Binaries 2012.09, updated to latest Linaro GCC 4.7 2012.09 and Linaro GDB 7.5 2012.09
      • gdbserver is stripped.
      • gdbtui is replaced by “gdb –tui”.
  • LAVA
    • Versatile Express TC2 have been deployed in the Validation lab.
    • LAVA deployment tool now supports a non-interactive mode and can be completely automated.
    • LAVA test includes the validation test suite for TI ARM features on Linux.
    • Snowball boards have been added in the Validation lab.
Visit https://wiki.linaro.org/Cycles/1209/Releasefor a list of known issues and further release details about the LEB, Android, Kernel, Graphics, Landing Team,  Platform, Power management and Toolchain (GCC / Qemu) components.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

SYSGO Releases ELinOS 5.2 Industrial Grade Linux

August 22nd, 2012 No comments

SYSGO, a software company for the real-time and embedded markets, has announced the release of ELinOS 5.2, an Industrial Grade Linux distribution, updated to kernel 3.2 and with new features related to scheduling, memory management, file systems, networking and security.

The new 5.2 version brings the following improvements:

  • Integration of new kernel 3.2 to support new features and availability of previous versions of kernels 2.6.33 and 2.6.34, to respond to customers demand.
  • Real-time extension based on Open Source Automation Development Lab (OSADL) implementation (PREEMPT RT) especially designed and tested for industrial needs.
  • Support for latest embedded CPUs including Intel, Freescale QorIQ, ARM Cortex, TI OMAP 4, Freescale i.MX6 and MIPS.
  • SMP (Symmetric multiprocessing) support on all multi-core platforms.
  •  QEMU simulator supported for all architectures.
  • New functionality support in areas of graphics (i.e. AMD Llano Fusion APUs), Wi-Fi (i.e. Intel iwlwifi 105 and 135), SATA (i.e. Intel C600 serial-attached-scsi controller), USB 3.0 (i.e. Ralink RT5370 USB), networking (i.e. several Realtek RTL81xx devices)
  • More recent versions of various tools such as Busybox, DirectFB, X11, GTK, QT, ntfs-3g, coreutils, ffmpeg, jamvm, openssh, openssl, sqlite, upstart, wireless_tools
  • New kernel features:
    • Btrfs faster data scrubbing and automatic defragmentation, unprivileged ICMP_ECHO, wake on WLAN
    • Performance improvements to the writeback throttling, speedups in the slab allocator, a new iSCSI implementation, support for Near-Field Communication chips used to enable mobile payments, bad block management in the generic software RAID layer, file system barriers enabled by default in ext3
    • Support for ext4 block sizes bigger than 4KB and up to 1MB, automatic backup of critical filesystem metadata and tools for manual inspection of the filesystems, support to set upper limits of CPU time, updated TCP that speeds up the recovery of the connection after lost packets
    • New support in the profiling tool “perf top” for live inspection of tasks and libraries and see the annotated assembly code
    • New support in Device Mapper for ‘thin provisioning’ of storage

    ELinOS Architecture Overview

    • Miscellaneous features such as Ext4 SMP scalability, IPset, Pstore: storing crash information across a reboot, complete remove of the “Big Kernel Lock”, automatic process grouping, I/O throttling support, support for PPP over Ipv4, KMS+KDB integration, Intel Intelligent Power Sharing support, improved VM-related desktop responsiveness, transparent spreading of incoming network traffic load across CPUs, memory compaction, ACPI Platform Error Interface support

ELinOS Industrial Grade Linux contains development tools needed for embedded Linux within one package: compiler, linker and debugger as well as Codeo, an Eclipse based integrated development environment, and ELK, a graphical system configurator. ELinOS is a cross development platform for either Linux or Windows host.

ELinOS 5.2 is available now and supports x86, x86_64, PowerPC, ARM, SPARC V8 and MIPS32 architectures. You can access the list of supported BSP for details about supported boards.

This operating systems supports features needed for industrial automation such as  CAN, VME, IPv6, USB 3.0, EtherCAT (upon request)…

The way I understand it Sysgo ELinOS is open source the same way MontaVista Linux is open source, and you have to pay a “support fee” (not sure of the exact name) before accessing the binaries, tools and source code. But the company has an interesting initiative, as you can testdrive ELinOS by connecting to Online Demo server connected to a real target board, using VNC.

You can find more information on ELinOS page.

Via: Embedded Star

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Linaro 12.03 Release with Kernel 3.3-rc3

March 30th, 2012 No comments

Linaro has just released version 12.03 based on Linux Kernel 3.3-rc3 and Android 4.0.3.

Among the key points, hardware video decode in now supported in Origen (Android),  Android runs in A15/A7 platforms, libav AAC optimization provides about 2x performance improvement and QEMU supports Samsung Exynos 4240 and Calxeda Highbank (work done upstream).

Here are the highlights of the release:

  • Android
    • Linaro Android has support for DS-5 version 5.9.
    • Hardware accelerated Multimedia is now integrated on Origen.
    • EEMBC, denbench and coremark have been ported to Android and are running in LAVA.
    • android.net ConnectivityManager unit tests have been built and integrated in all builds.
    • Hardware decode of H264 and MPEG4, 1080P and 30 FPS is enabled on Origen.
    • Origen now has 1080p HDMI Graphics and Video Support.
    • Android runs on A15, A7 and A15/A7 fast models.
    • ARM’s big.LITTLE has been tested running Android using a set of unit tests.
    • Kernels of prebuilt images can now be swapped out easily for most boards.
    • A script, derived from the build itself gets posted to the build page for people to download and run to reproduce the build.
    • Superfluous build specific branches have been removed.
    • Bluetooth and WIFI is working on Snowball.
    • A report on SMP improvement has been created
  • Graphics
    • glmark2
      • Offscreen rendering support using framebuffer objects.
      • New command line switch to allow selection of end-of-frame method,
    • glcompbench
      • New ‘blur’ test.
      • Updated glproxy support.
    • glproxy
      • Enhanced selection of EGL vs. GLX based upon new detection API.
    • Unity3D
      • compiz (core and plugins-main) updated to current trunk revision.
  • Kernel
    • Samsung’s UFS patches merged upstream into 3.4 kernel after intial review and feedback from KWG’s storage team.
    • Pinmux feature complete and device tree bindings almost completed. Member platform support progressing well.
    • Much forward progress in support for eMMC4.5 features, several patches upstreamed.
  • Multimedia
    • Updated pulseaudio / alsa-lib including : Audio jack detection, new UCM configs for imx6, origen, and snowball
    • Initial source code only drop of TinyHal (aka UCM for Android) with support for Panda.
    • libav AAC optimization complete improving software playback more than 2x on a8 but less than 2x on a9.
    • Speex for Android & Linux now includes NEON detection
    • live-build updated to version including : armhf support both native and cross, support for multistrap (and using the linaro overlay as part of the bootstrap), support for build meta information
  • Power Management
    • Landed cpuidle enablement for member platforms
      • Timekeeping code consolidation
      • New cpuidle drivers for u8500 and i.MX
      • Optimisations for exynos cpuidle driver
    • Common struck clock was accepted for 3.4 merge
    • Cpuidle timekeeping consolidation work was accepted for 3.4
    • Working on community feedback on common cpufreq cooling device for thermal management
  • Toolchain
    • The compiler now accounts for register pressure when scheduling instructions. This fixes many of the regressions seen in the past when using the vectoriser and some of the deeper optimisations. The backend now implements the ARM saturation and fixed to floating point instructions. These improvements were found when working on libav with the Multimedia group during Connect.
    • This month saw the upstream release of GCC 4.7.0. Our new work is already focused on Linaro GCC 4.7 with Linaro GCC 4.6 going into maintenance and Linaro GCC 4.5 going end of life. The first Linaro GCC 4.7 release will come out as part of next month’s 2012.04 bundle.
    • QEMU adds support for passing Device Tree blobs to the kernel. Interesting upstream improvements include new Samsung Exynos4210 and Calxeda Highbank models.
    • There is no GDB release for this month. We’re currently investigating first class upstream support for cross debugging Android NDK applications.
  • Validation
    • LAVA can do complex and long computations in the background if necessary.
    • LAVA Dispatcher can now be distributed to other machines using rabbitmq and celery.
    • Groups in LAVA can now be managed in Launchpad.
    • Add support for custom android command to users.
    • There is a lab health page showing every board health status on lava-server.
    • LAVA now supports running access restricted jobs in the scheduler.

Here are the known issues for this release:

  • Add support for rootfs post-processing in linaro-media-create
  • Bluetooth does not work on Origen
  • Suspend does not work on Samsung Origen
  • Origen: device tree not enabled at Ubuntu
  • [regression] No DVI output on the PandaBoard with kernel 3.1.0-1402-linaro-lt-omap
  • [regression] desktop performance at quickstart is a lot worse with 11.11
  • image installation instructions linked from downloads page outdated
  • [regression] playbin can’t play video using sw decode after enabling TI specific patches
  • Can’t install multiple linux-header packages
  • Pressure sensor (Barometer) lacks correct file permissions in sysfs
  • snowball fails to boot 20120316 hwpack & ubuntu desktop
  • iMX6 terribly unstable with 12.03 Ubuntu image
Go to https://wiki.linaro.org/Cycles/1203/Release for further release details about the LEB, Android, Kernel, Graphics, Landing Team,  Platform, Power management and Toolchain (GCC / Qemu) components.
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

How to build qemu-system-arm in Linux

March 8th, 2012 6 comments

Most (all?) Linux distributions have a binary package for qemu-system (including qemu-system-arm) in order to emulate non-x86 targets such as ARM, MIPS, PPC, Alpha and more.

However, in some case you may need to very latest version of qemu-system and it may not be able yet for your distribution.

Here’s how to do to build qemu-system-arm without building all qemu-system-***:

  1. Download the latest stable version of qemu (qemu 1.0.1 at the time this post was written):
    wget http://wiki.qemu.org/download/qemu-1.0.1.tar.gz

    or get the latest source code (development tree) which has the very latest features and bug fixes, but may not work or compile:

    git clone git://git.qemu.org/qemu.git

    or get the latest source code from linaro (which may be more up-to-date for ARM targets):

    git clone git://git.linaro.org/qemu/qemu-linaro.git
  2. Configure qemu to build ARM targets:
    cd qemu
    ./configure --target-list=arm-softmmu,arm-linux-user
  3. Build and install qemu-system-arm:
    make -j 2
    sudo make install
  4. Verify the latest version of qemu-ssytem-arm is installed:
    # qemu-system-arm --version
    QEMU emulator version 1.0,1, Copyright (c) 2003-2008 Fabrice Bellard
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Categories: Linux, Testing Tags: arm, cross-compilation, qemu

Instructions to Run Raspberry Pi Fedora 14 Remix in QEMU

March 8th, 2012 58 comments

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:
    gzip -d raspberrypi-fedora-remix-14-r1.img.gz
  3. Download kernel 3.0.4 image for qemu, if you don’t have it yet.
    wget http://dl.dropbox.com/u/45842273/zImage
  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:
    dd if=/dev/zero of=rootfs3G.ext3 count=6M
    /sbin/mkfs.ext3 rootfs3G.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/:
    git clone git://git.linaro.org/qemu/qemu-linaro.git
    cd qemu-linaro
    ./configure --target-list=arm-softmmu
    make
    sudo make install
  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:

    chmod 777 /tmp

    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:

    ssh -p 2222 root@localhost

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.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter